Application profiles
Each project must select one primary profile. The profile controls which services and checks become necessary.
Profile map
Section titled “Profile map”| Profile | Normal composition | Use it when |
|---|---|---|
| Static site | Astro and Static Assets | The site has no dynamic server route. |
| Static site with APIs | Static Assets, Worker, and Hono | A small set of server routes supports the site. |
| Interactive application | Vite or Astro, React, Worker, and APIs | The browser has substantial client state. |
| Multi-Worker application | Multiple Workers and service bindings | Workloads need separate scale or trust boundaries. |
| Background processing | Worker, Queues, and Workflows where applicable | Work continues outside an HTTP request. |
| Stateful application | Worker and Durable Objects | A named entity needs coordinated state. |
| High-risk application | A suitable profile with stricter controls | The system handles money, regulated data, or destructive actions. |
Common selections
Section titled “Common selections”Use Astro with Static Assets. Add no Worker route unless a feature requires server code.
Use Astro or Vite for the interface. Use Hono for Worker application programming interfaces. Add D1 with Drizzle only when durable relational data is necessary.
Use Queues for buffered work. Use Workflows for durable multi-step work when retry state matters. Keep request handlers short.
Use Durable Objects when one object must serialize access to its state. Do not use them as a default database replacement.
Selection rules
Section titled “Selection rules”- Start with Static Assets.
- Add a Worker only for dynamic work.
- Add one managed service for one clear need.
- Separate Workers only when scale, ownership, or trust requires it.
- Treat high-risk status as an added control layer.
- Review the profile when the data model or trust boundary changes.