docs/ts/primitives/overview.md
Encore.ts gives you the core set of infrastructure primitives that backend applications reach for 99% of the time: SQL databases, Pub/Sub, object storage, caches, cron jobs, and secrets. You declare them directly in your TypeScript code as typed objects and use them through their methods.
When you run your application locally, encore run starts a matching local implementation of each primitive (real Postgres, a local Pub/Sub broker, local object storage, and so on).
For cloud environments you have two options:
Encrore's set of infrastructure primitives are intended to create an efficient development workflow, especially using AI coding agents. Almost any backend problem can be solved by composing this small, well-understood set of building blocks, so humans and agents don't need to evaluate dozens of competing libraries or assemble bespoke infrastructure for each task. Instead, you pick from a stable, typed vocabulary that maps directly to production cloud resources. The infrastructure building blocks capture the semantics of the infrastructure resources used, which means you can reason about the full stack from a single source of truth.
These are the structural primitives that organize your code.
For more advanced API styles, see Raw Endpoints, Streaming APIs, GraphQL, and Static Assets.
Encore reads your primitive declarations to build an infrastructure model of your application. That model is what drives both local development and cloud provisioning, so the resources you use in production are the ones your code asked for, nothing more, nothing less.
To see the cloud resources Encore creates from these primitives, see Infrastructure on AWS and GCP.