A reference application for building a full-stack product with Litestar and React. PostgreSQL is the only service it needs.
Installation · Development · Security · Queues & MCP · Deployment
Litestar Fullstack is a working app you can run, read and borrow from. It shows how the first-party Litestar libraries fit together in one project: accounts and teams, several ways to sign in, background jobs, an MCP server, and a React front end that talks to the API through a generated client.
| Area | Built with |
|---|---|
| Web server | Litestar on Granian; routes and jobs are discovered by litestar-autowire |
| Database | PostgreSQL with SQLAlchemy 2 and Advanced Alchemy |
| Sign-in | litestar-security: cookie sessions, two-factor codes, passkeys, GitHub sign-in and personal API keys |
| Background jobs | litestar-queues on PostgreSQL, with live task updates in the browser |
| MCP server | litestar-mcp at /mcp, authenticated with API keys |
| Front end | React 19, TanStack Router and Query, Tailwind CSS, and an API client generated by litestar-vite |
React Email templates sent with litestar-email |
|
| Deployment | Docker, Kubernetes and Railway |
You need uv, Bun and Docker. Python 3.11 or newer works; CI tests 3.12 through 3.15.
make install
cp .env.local.example .env
make start-infra
make build-emails
uv run app database upgrade
uv run app runmake start-infra starts PostgreSQL, a local mail catcher and object storage in Docker. The app is served at http://localhost:8000. Sign up there, or create an account from the terminal; the command asks for the details and whether to make the account an administrator:
uv run app users create-user| Command | What it does |
|---|---|
make install |
Install Python and JavaScript dependencies |
make lint |
Run the linters, type checkers and workflow audit |
make test |
Run the test suite against a throwaway PostgreSQL |
make frontend-check |
Lint and test the React app |
make types |
Regenerate the TypeScript client after changing the API |
make build-emails |
Compile the email templates |
make build-wheel |
Build a wheel with the front end bundled in |
make docs |
Build the documentation |
Jobs run inside the web process by default, so there is nothing extra to start. To run them separately, set QUEUES_PLACEMENT=external and start a worker:
uv run app queues runRun the whole stack (database, migrations, API and worker) with one command:
make start-all-dockerReady-to-use setups live in tools/deploy: Docker images, Kubernetes templates and a Railway script. The deployment guide walks through each.
Issues and pull requests are welcome. See CONTRIBUTING.rst to get set up, and join us on Discord if you want to talk it through first.