Core concepts
Projects
A project is the unit Foundry deploys, bills and scopes keys to. One repository usually maps to one project.
What is a project
A project groups the functions that ship together. It owns their domain, their environment variables, and the keys that can deploy them. Everything under a project shares one rollout history.
One repo, one project
Keep the mapping simple — a single project per repository keeps rollbacks and permissions easy to reason about.
Entrypoints
Foundry looks for exported handlers under api/. Each file becomes its own function with a route derived from its path.
project layout
text
api/ time.ts → /time users/ [id].ts → /users/:id
Linking a folder
Run foundry linkonce inside a folder to associate it with a project. Subsequent deploys don't need any flags.
bash
$ foundry link acme-api ✓ linked ./ to project 'acme-api'
Was this page helpful?
Updated Jul 2026