Guide · Open source
How to use full-stack-fastapi-template: setup, stack and tips
Updated · written with AI from the project's own documentation and checked against our catalogue data
full-stack-fastapi-template is an open-source starter project from the fastapi organization. It gives you a working web application with a Python FastAPI backend, a React and TypeScript frontend, PostgreSQL, and Docker Compose already connected. This guide explains what you get, how to create your own copy, and where to look next so you can start customizing it.
Quick start
- 1Create your copy. Click Use this template on the GitHub page to make a new repository you own.
- 2Clone the repository. Run git clone on your copy or on the original repository to get the files locally.
- 3Install Docker. Docker is the listed prerequisite for running the local services.
- 4Read development.md. Check the Docker Compose services and .env configuration described there.
- 5Explore the backend. Open backend/README.md to see the FastAPI, SQLModel and PostgreSQL setup.
- 6Explore the frontend. Open frontend/README.md to see the React, Vite and Tailwind CSS setup.
- 7Choose a deployment path. Use deployment.md for FastAPI Cloud or deployment-docker-compose.md for self-hosting.
What does the template include?
The template combines a Python backend with a TypeScript frontend. On the backend, FastAPI serves the API, SQLModel handles database interactions as an ORM, Pydantic handles data validation and settings, and PostgreSQL is the SQL database. On the frontend, React uses TypeScript, hooks and Vite, styled with Tailwind CSS and shadcn/ui components.
The README also lists built-in features: JWT (JSON Web Token) authentication, secure password hashing by default, email-based password recovery, an admin dashboard, dark mode, and an interactive API documentation page. Tests use Pytest on the backend and Playwright for end-to-end tests.
- Backend: FastAPI, SQLModel, Pydantic, PostgreSQL
- Frontend: React, TypeScript, Vite, Tailwind CSS, shadcn/ui
- Deployment: Docker Compose with Traefik as a reverse proxy and automatic HTTPS, or FastAPI Cloud
- Email: React Email templates and Mailpit for local email testing
Create your own copy of the template
The README says to click the Use this template button at the top of the GitHub page to create a new repository. This gives you your own copy to change, rather than editing the original project.
If you prefer to work from a clone, the README lists this command: git clone https://github.com/fastapi/full-stack-fastapi-template
git clone https://github.com/fastapi/full-stack-fastapi-templateRun the project with Docker Compose
The README lists Docker Compose for local services and self-hosted deployment, and the test workflow is named Test Docker Compose. The project's development guide covers the Docker Compose services and .env configuration. Read development.md in the repository for the exact steps, because the README excerpt does not list the run commands.
Docker is the only prerequisite named for getting the local services running.
- Install Docker before you start.
- Read development.md for the Docker Compose services and .env configuration.
- Use Mailpit to view password recovery emails locally during development.
Work on the backend and frontend
The backend and frontend each have their own README. The backend guide is at backend/README.md, and the frontend guide is at frontend/README.md. The development guide covers the local FastAPI and Vite workflow.
The frontend client is generated automatically, so the React code can call the FastAPI endpoints without you writing the client by hand.
- Backend docs: backend/README.md
- Frontend docs: frontend/README.md
- Development workflow: development.md
Deploy the app
The README describes two deployment paths. FastAPI Cloud is covered in deployment.md. Self-hosted deployment with Docker Compose, including Traefik for automatic HTTPS, is covered in deployment-docker-compose.md.
- FastAPI Cloud: deployment.md
- Self-hosted with Docker Compose: deployment-docker-compose.md
What people use it for
- Starting a new full-stack web app with a Python backend and React frontend
- Adding JWT login, password recovery and an admin area to a project without building them from scratch
- Learning how a FastAPI API and a React frontend fit together in one project
- Self-hosting an app with Docker Compose and Traefik for automatic HTTPS
Frequently asked questions
Is full-stack-fastapi-template free to use?
Yes. The README states the project is licensed under the MIT license. Check the LICENSE file in the repository for the full terms.
What do I need to install before using it?
The listed prerequisite is Docker. The project also uses Python for the backend and Node.js for the frontend, and the setup assumes some familiarity with these tools.
How do I create my own copy of the template?
Click the Use this template button at the top of the GitHub page to create a new repository. You can also run git clone https://github.com/fastapi/full-stack-fastapi-template to get the files.
Does it include user login?
Yes. The README lists JWT (JSON Web Token) authentication, secure password hashing by default, and email-based password recovery.
Can I use it without knowing Docker or PostgreSQL?
It is not a good fit for that. The project is a starting codebase that assumes familiarity with Docker, PostgreSQL and Node.js, so you will need to learn these to customize it.
Can it be used for projects that are not Python or TypeScript?
No. Both halves of the stack are required: the backend is Python with FastAPI, and the frontend is TypeScript with React.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
full-stack-fastapi-template suits developers who already know FastAPI or want to learn how a FastAPI and React project fits together, and teams that want login, an admin area and Docker setup already wired up. It is not suited to people who want a finished product or no-code tool, or to anyone unfamiliar with Docker, PostgreSQL and Node.js. Choose another starting point if you need a non-Python backend or a ready-made application.
Install options & downloads