# Flare > A fullstack framework that generates a database table, REST API, validators, typed client and admin dashboard from one resource descriptor. Apps run on Cloudflare Workers (vinext, D1, Drizzle) or on Next.js (Vercel, Postgres, Prisma) — the descriptors, generated code and dashboard are the same on both. Install: `pnpm create flare-framework myapp` (add `-- --stack next` for the Next.js stack). Agent skill: `npx skills add MUKE-coder/flare-framework@flare` — the rules, the CLI and the field grammar, packaged for a coding agent. ## What Flare is The pitch, who it suits, and what it believes. - [Philosophy](https://flare-docs.codetotech.com/about/philosophy/): Six things Flare believes, what each one costs, and where the line is between what it generates and what is yours. - [The pitch](https://flare-docs.codetotech.com/about/pitch/): What Flare does, in one page, with the numbers. - [Who Flare is for](https://flare-docs.codetotech.com/about/who-its-for/): The people and projects Flare suits, the ones it doesn't, and how to tell which you are in about a minute. ## Start here - [Flare, the fullstack framework for Cloudflare and Next.js](https://flare-docs.codetotech.com/): Describe a resource once. Flare writes the table, the API, the validation and the admin screens, with auth, storage and billing wired, then ships it to Cloudflare Workers or to Vercel from the same description. - [Setting up Cloudflare](https://flare-docs.codetotech.com/start/cloudflare-setup/): Everything you need on a Cloudflare account before deploying a Flare app, and what gets created for you. - [Installation](https://flare-docs.codetotech.com/start/installation/): Prerequisites and every way to install the Flare CLI. - [Project structure](https://flare-docs.codetotech.com/start/project-structure/): What flare create scaffolds, and where generated code lands. - [Quickstart](https://flare-docs.codetotech.com/start/quickstart/): Scaffold, generate, and deploy a live CRUD app in about five minutes. - [Choosing a stack](https://flare-docs.codetotech.com/start/stacks/): Cloudflare Workers with D1 and Drizzle, or Next.js on Vercel with Postgres and Prisma — compared side by side, with the same resource built on both. ## Core concepts - [How Flare is built](https://flare-docs.codetotech.com/concepts/architecture/): The descriptor, the generator, the engine and the two stacks — what each layer does, and where the seams are. - [The codegen overwrite contract](https://flare-docs.codetotech.com/concepts/codegen-contract/): What survives a re-run of gen resource, and what doesn't. - [Field type grammar](https://flare-docs.codetotech.com/concepts/field-grammar/): The --fields string flare gen resource parses. - [Every file in a Flare app](https://flare-docs.codetotech.com/concepts/file-structure/): What flare create writes, what each folder is for, which files are yours, which are generated, and which you can delete. - [What gen resource emits](https://flare-docs.codetotech.com/concepts/generated-files/): The full file list behind one flare gen resource command. - [Nothing is hidden](https://flare-docs.codetotech.com/concepts/no-magic/): Flare copies the code that runs your endpoints into your app, the way shadcn/ui copies a component. Where it lives, how it works, and how to change it. - [The resource descriptor](https://flare-docs.codetotech.com/concepts/resource-descriptor/): The single source of truth every generated file is derived from. - [Drift & sync-types](https://flare-docs.codetotech.com/concepts/sync-types/): Detecting and repairing hand-edited generated files. ## Guides - [API reference (OpenAPI)](https://flare-docs.codetotech.com/guides/api-reference/): Every app documents its own REST API: an OpenAPI 3.1 document and a Scalar reference page, generated from your resources and policies. - [API routes and handlers](https://flare-docs.codetotech.com/guides/api-routes/): What flare gen resource writes for each HTTP method, the query parameters, the status codes, and how to handle CORS. - [Authentication](https://flare-docs.codetotech.com/guides/auth/): Passwords, magic links, email codes, passkeys, two-factor and social sign-in, with every screen built. - [Billing (Stripe)](https://flare-docs.codetotech.com/guides/billing/): Subscriptions, plan changes, cancellation and one-time purchases with Stripe. - [Building Flare apps with AI](https://flare-docs.codetotech.com/guides/build-with-ai/): An agent skill, a machine-readable docs index, and a prompt you can paste into any coding agent. - [Caching](https://flare-docs.codetotech.com/guides/caching/): The KV data cache, on by default, invalidated automatically. - [What it costs](https://flare-docs.codetotech.com/guides/costs/): What a real Flare app costs to run on Cloudflare, with measured numbers from the example shop rather than estimates. - [CRUD, end to end: a shop](https://flare-docs.codetotech.com/guides/crud-example/): Six resources, every endpoint, the code behind them and the requests that exercise them — taken from a working app. - [The dashboard](https://flare-docs.codetotech.com/guides/dashboard/): One signed-in area: resources, stats, tables with import and export, forms in a sheet, account, security and observability. - [File uploads](https://flare-docs.codetotech.com/guides/file-uploads/): Images, PDFs, spreadsheets, archives and anything else — how to declare each, what the form does, and where the bytes go. - [Email (Resend)](https://flare-docs.codetotech.com/guides/mail/): Transactional email over Resend's REST API, no SDK. - [Migrations & seeds](https://flare-docs.codetotech.com/guides/migrations-and-seeds/): Applying, rolling back, and seeding D1 through Wrangler. - [Realtime](https://flare-docs.codetotech.com/guides/realtime/): Live channels on Durable Objects: server publishes, presence, per-channel authorization and automatic reconnection. - [Relationships](https://flare-docs.codetotech.com/guides/relationships/): One-to-many, one-to-one and many-to-many — how to write each, what the schema becomes, and how each one appears in a form. - [Roles & policies](https://flare-docs.codetotech.com/guides/roles-and-policies/): Resource-level permissions enforced server-side, not just in the UI. - [Security](https://flare-docs.codetotech.com/guides/security/): Ban lists, rate limits, abuse detection and a security dashboard, at the Worker and (optionally) the zone edge. - [Self-hosting](https://flare-docs.codetotech.com/guides/self-hosting/): What self-hosting a Flare app really involves, which parts are portable, and when it is worth it. - [File storage (R2)](https://flare-docs.codetotech.com/guides/storage/): Signed uploads and reads, content sniffing, and per-field scoping. - [Themes](https://flare-docs.codetotech.com/guides/themes/): Six looks for the whole app: sign-in, dashboard, admin and home page. Pick one at create time, switch any time. - [Sharing your local app](https://flare-docs.codetotech.com/guides/tunnels/): A public HTTPS URL for your local server with one flag, through Cloudflare Quick Tunnels. No account, DNS or open ports. - [Where your code goes](https://flare-docs.codetotech.com/guides/your-code/): The seams: logic on the resource, endpoints of your own, computed values, and what regeneration will and won't overwrite. ## The Cloudflare stack Workers, D1 and Drizzle. - [Deploying to Cloudflare](https://flare-docs.codetotech.com/guides/deployment/): What flare deploy does beyond vinext-cloudflare deploy, and how to control it. - [Drizzle cheat sheet](https://flare-docs.codetotech.com/guides/drizzle-cheatsheet/): Create, read, update and delete with Drizzle ORM on D1, the way a Flare app is set up. - [Coming from Prisma](https://flare-docs.codetotech.com/guides/prisma-to-drizzle/): Everything you do with Prisma, and how to do it with Drizzle in a Flare app. ## The Next.js stack Next.js on Vercel, Postgres and Prisma. - [Deploying to Vercel](https://flare-docs.codetotech.com/guides/vercel-deployment/): Deploying a Flare app on the Next.js stack, what the platform owns, and the two things it will not do for you. ## Tutorials - [Tutorial: a drive](https://flare-docs.codetotech.com/tutorials/drive/): Folders inside folders, files dropped in by the pile, and a delete that takes a folder's contents with it. - [Tutorial: a catalogue on Next.js](https://flare-docs.codetotech.com/tutorials/next-shop/): Build a Flare app on the Next.js stack with Postgres and Prisma, and add ranked full-text search over a catalogue of 300,000 products. - [Tutorial: a shop with a till](https://flare-docs.codetotech.com/tutorials/shop/): Build and deploy a shop that sells both boxed goods and downloads, with a point of sale for walk-in customers. ## Reference - [The demo app](https://flare-docs.codetotech.com/examples/demo/): A small CRM covering every guide in these docs, in one app. - [Changelog](https://flare-docs.codetotech.com/reference/changelog/): Every released version of Flare, what changed in it, and what you have to do about it. - [CLI reference](https://flare-docs.codetotech.com/reference/cli/): Every flare command, flag by flag. ## Everything else - [Page not found](https://flare-docs.codetotech.com/404/)