cloudflare / cloudflare/templates
[Template Proposal] Edge Content Intelligence Worker (KV caching, multi-consumer)
- Dominant language
- TypeScript
- Stars
- 2.1k
- Forks
- 1k
- Avg merge
- 17h 44m
- Merged PRs (30d)
- 10
Description
## Summary
Proposing a new template: **Edge Content Intelligence Worker** - a cache-first edge service that replaces client-side enrichment for ads, analytics, and personalization.
## What This Template Demonstrates
This template showcases several Cloudflare-native patterns:
| Pattern | Implementation |
|---------|----------------|
| **KV-native caching** | Content profiles cached in Cloudflare KV for global, low-latency retrieval |
| **Pre-warm + invalidate flows** | Cache on content publish, invalidate on update |
| **Multiple downstream consumers** | Single analysis serves ads (GAM/OpenRTB), analytics (GA4), and internal services |
| **First-party execution** | Runs on your domain, no client-side JS dependency |
| **Cacheable, deterministic outputs** | Same URL always produces same profile |
## Architecture
```
Request
|
Cloudflare Worker
|
Content Analysis (cached)
|
+-------------+---------------+---------------+
| Ad Server | Analytics | Internal ML |
| (GAM/PBS) | (GA/BI) | / Personal. |
+-------------+---------------+---------------+
```
**One analysis → Many consumers**
## Why This Fits the Templates Collection
1. **Real workload** - Solves actual production problem (client-side JS sprawl)
2. 2. **Cloudflare-native** - Uses KV, Workers, edge execution model
3. 3. **Privacy-first** - No cookies, no PII, first-party only
4. 4. **Multi-binding example** - KV + Secrets + fetch
## Links
- **Source**: https://github.com/mixpeek/connectors/tree/main/cloudflare-workers
- - **Documentation**: https://mixpeek.com/connectors/cloudflare-workers
## Positioning
> "Replacing client-side enrichment with a cache-first edge service"
This is **not** positioned as:
- An SDK or product integration
- - Adtech targeting
- - - User-level tracking
It's positioned as:
- Shared infrastructure pattern
- - Edge-native architecture example
- - - Cache-first design reference
## Next Steps
Happy to:
1. Adapt the template to match your `package.json` requirements
2. 2. Add Playwright E2E tests
3. 3. Trim to minimum example if preferred
Let me know if this would be a good fit!
Contributor guide
Assessment
This issue has not been assessed yet.