{"id":49958703,"url":"https://github.com/render-examples/full-stack-fastapi-template","last_synced_at":"2026-05-18T01:09:33.301Z","repository":{"id":356654722,"uuid":"1233418900","full_name":"render-examples/full-stack-fastapi-template","owner":"render-examples","description":"Full-stack FastAPI + React template configured for deployment on Render","archived":false,"fork":false,"pushed_at":"2026-05-09T03:34:39.000Z","size":2078,"stargazers_count":0,"open_issues_count":18,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-09T05:35:42.481Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/render-examples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["tiangolo"]}},"created_at":"2026-05-09T00:05:46.000Z","updated_at":"2026-05-09T03:34:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/render-examples/full-stack-fastapi-template","commit_stats":null,"previous_names":["render-examples/full-stack-fastapi-template"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/render-examples/full-stack-fastapi-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/render-examples%2Ffull-stack-fastapi-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/render-examples%2Ffull-stack-fastapi-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/render-examples%2Ffull-stack-fastapi-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/render-examples%2Ffull-stack-fastapi-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/render-examples","download_url":"https://codeload.github.com/render-examples/full-stack-fastapi-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/render-examples%2Ffull-stack-fastapi-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33161411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"ssl_error","status_checked_at":"2026-05-17T22:39:10.741Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-18T01:09:31.868Z","updated_at":"2026-05-18T01:09:33.291Z","avatar_url":"https://github.com/render-examples.png","language":"TypeScript","funding_links":["https://github.com/sponsors/tiangolo"],"categories":[],"sub_categories":[],"readme":"# Full Stack FastAPI Template\n\n\u003ca href=\"https://github.com/fastapi/full-stack-fastapi-template/actions?query=workflow%3A%22Test+Docker+Compose%22\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/fastapi/full-stack-fastapi-template/workflows/Test%20Docker%20Compose/badge.svg\" alt=\"Test Docker Compose\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/fastapi/full-stack-fastapi-template/actions?query=workflow%3A%22Test+Backend%22\" target=\"_blank\"\u003e\u003cimg src=\"https://github.com/fastapi/full-stack-fastapi-template/workflows/Test%20Backend/badge.svg\" alt=\"Test Backend\"\u003e\u003c/a\u003e\n\u003ca href=\"https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/full-stack-fastapi-template\" target=\"_blank\"\u003e\u003cimg src=\"https://coverage-badge.samuelcolvin.workers.dev/fastapi/full-stack-fastapi-template.svg\" alt=\"Coverage\"\u003e\u003c/a\u003e\n\n## Deploy to Render\n\n[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/render-examples/full-stack-fastapi-template)\n\nOne click provisions the full stack on [Render](https://render.com) using the [`render.yaml`](./render.yaml) Blueprint at the repo root: a Dockerized FastAPI web service, a Vite/Bun static site for the frontend, a managed Postgres database, and a shared `fastapi-env` environment-variable group that both services pull from.\n\n### Setup after clicking the button\n\n1. **Fill in the placeholder values in the `fastapi-env` env group** (Dashboard → Env Groups → `fastapi-env`):\n   - `FIRST_SUPERUSER` — admin email, e.g. `admin@yourdomain.com`\n   - `FIRST_SUPERUSER_PASSWORD` — generate one with `python -c \"import secrets; print(secrets.token_urlsafe(32))\"`\n   - `DOMAIN` — your custom domain, or any placeholder if you'll use the `.onrender.com` URLs\n   - Optional: `SMTP_HOST` / `SMTP_USER` / `SMTP_PASSWORD` / `EMAILS_FROM_EMAIL` (if you want password-reset emails) and `SENTRY_DSN` (if using Sentry)\n\n   `SECRET_KEY`, all `POSTGRES_*` vars, `ENVIRONMENT`, `PROJECT_NAME`, `STACK_NAME`, and the `SMTP_TLS/SSL/PORT` defaults are all set automatically — no action needed.\n\n   \u003e **Note:** the `POSTGRES_*` vars are wired directly to the `fastapi-backend` service via `fromDatabase` references (Render's env groups don't support database links), so they won't show up on the `fastapi-env` group page. You'll find them under `fastapi-backend` → Environment in the Dashboard, alongside the inherited group vars. They all end up in the same `os.environ` at runtime — the split is purely a Dashboard organizational thing.\n\n2. **Wait for both services to finish deploying** so they're assigned `.onrender.com` URLs.\n\n3. **Go back to the `fastapi-env` env group and fill in the cross-service URLs** (these can only be set after the first deploy, since they depend on the assigned hostnames). All three live in the env group, but they're consumed by different services:\n   - `VITE_API_URL` → set to the **backend** URL, e.g. `https://fastapi-backend-XXXX.onrender.com`. *Read by the **frontend** service at build time — baked into the bundle.*\n   - `FRONTEND_HOST` → set to the **frontend** URL, e.g. `https://fastapi-frontend-XXXX.onrender.com`. *Read by the **backend** service at runtime — auto-appended to the CORS allowlist.*\n   - `BACKEND_CORS_ORIGINS` → comma-separated list of additional allowed origins (you can usually leave this empty since `FRONTEND_HOST` already covers the frontend). *Read by the **backend** service at runtime.*\n\n4. **Trigger a manual rebuild of the frontend** (Dashboard → `fastapi-frontend` → Manual Deploy → Clear build cache \u0026 deploy). `VITE_API_URL` is baked into the bundle at build time, so an existing build won't pick up the new value until rebuilt.\n\n## Technology Stack and Features\n\n- [**FastAPI**](https://fastapi.tiangolo.com) for the Python backend API.\n  - [SQLModel](https://sqlmodel.tiangolo.com) for the Python SQL database interactions (ORM).\n  - [Pydantic](https://docs.pydantic.dev), used by FastAPI, for the data validation and settings management.\n  - [PostgreSQL](https://www.postgresql.org) as the SQL database.\n- [React](https://react.dev) for the frontend.\n  - Using TypeScript, hooks, [Vite](https://vitejs.dev), and other parts of a modern frontend stack.\n  - [Tailwind CSS](https://tailwindcss.com) and [shadcn/ui](https://ui.shadcn.com) for the frontend components.\n  - An automatically generated frontend client.\n  - [Playwright](https://playwright.dev) for End-to-End testing.\n  - Dark mode support.\n- [Docker Compose](https://www.docker.com) for development and production.\n- Secure password hashing by default.\n- JWT (JSON Web Token) authentication.\n- Email based password recovery.\n- [Mailcatcher](https://mailcatcher.me) for local email testing during development.\n- Tests with [Pytest](https://pytest.org).\n- [Traefik](https://traefik.io) as a reverse proxy / load balancer.\n- Deployment instructions using Docker Compose, including how to set up a frontend Traefik proxy to handle automatic HTTPS certificates.\n- CI (continuous integration) and CD (continuous deployment) based on GitHub Actions.\n\n### Dashboard Login\n\n[![API docs](img/login.png)](https://github.com/fastapi/full-stack-fastapi-template)\n\n### Dashboard - Admin\n\n[![API docs](img/dashboard.png)](https://github.com/fastapi/full-stack-fastapi-template)\n\n### Dashboard - Items\n\n[![API docs](img/dashboard-items.png)](https://github.com/fastapi/full-stack-fastapi-template)\n\n### Dashboard - Dark Mode\n\n[![API docs](img/dashboard-dark.png)](https://github.com/fastapi/full-stack-fastapi-template)\n\n### Interactive API Documentation\n\n[![API docs](img/docs.png)](https://github.com/fastapi/full-stack-fastapi-template)\n\n## How To Use It\n\nYou can **just fork or clone** this repository and use it as is.\n\n✨ It just works. ✨\n\n### How to Use a Private Repository\n\nIf you want to have a private repository, GitHub won't allow you to simply fork it as it doesn't allow changing the visibility of forks.\n\nBut you can do the following:\n\n- Create a new GitHub repo, for example `my-full-stack`.\n- Clone this repository manually, set the name with the name of the project you want to use, for example `my-full-stack`:\n\n```bash\ngit clone git@github.com:fastapi/full-stack-fastapi-template.git my-full-stack\n```\n\n- Enter into the new directory:\n\n```bash\ncd my-full-stack\n```\n\n- Set the new origin to your new repository, copy it from the GitHub interface, for example:\n\n```bash\ngit remote set-url origin git@github.com:octocat/my-full-stack.git\n```\n\n- Add this repo as another \"remote\" to allow you to get updates later:\n\n```bash\ngit remote add upstream git@github.com:fastapi/full-stack-fastapi-template.git\n```\n\n- Push the code to your new repository:\n\n```bash\ngit push -u origin master\n```\n\n### Update From the Original Template\n\nAfter cloning the repository, and after doing changes, you might want to get the latest changes from this original template.\n\n- Make sure you added the original repository as a remote, you can check it with:\n\n```bash\ngit remote -v\n\norigin    git@github.com:octocat/my-full-stack.git (fetch)\norigin    git@github.com:octocat/my-full-stack.git (push)\nupstream    git@github.com:fastapi/full-stack-fastapi-template.git (fetch)\nupstream    git@github.com:fastapi/full-stack-fastapi-template.git (push)\n```\n\n- Pull the latest changes without merging:\n\n```bash\ngit pull --no-commit upstream master\n```\n\nThis will download the latest changes from this template without committing them, that way you can check everything is right before committing.\n\n- If there are conflicts, solve them in your editor.\n\n- Once you are done, commit the changes:\n\n```bash\ngit merge --continue\n```\n\n### Configure\n\nYou can then update configs in the `.env` files to customize your configurations.\n\nBefore deploying it, make sure you change at least the values for:\n\n- `SECRET_KEY`\n- `FIRST_SUPERUSER_PASSWORD`\n- `POSTGRES_PASSWORD`\n\nYou can (and should) pass these as environment variables from secrets.\n\nRead the [deployment.md](./deployment.md) docs for more details.\n\n### Generate Secret Keys\n\nSome environment variables in the `.env` file have a default value of `changethis`.\n\nYou have to change them with a secret key, to generate secret keys you can run the following command:\n\n```bash\npython -c \"import secrets; print(secrets.token_urlsafe(32))\"\n```\n\nCopy the content and use that as password / secret key. And run that again to generate another secure key.\n\n## How To Use It - Alternative With Copier\n\nThis repository also supports generating a new project using [Copier](https://copier.readthedocs.io).\n\nIt will copy all the files, ask you configuration questions, and update the `.env` files with your answers.\n\n### Install Copier\n\nYou can install Copier with:\n\n```bash\npip install copier\n```\n\nOr better, if you have [`pipx`](https://pipx.pypa.io/), you can run it with:\n\n```bash\npipx install copier\n```\n\n**Note**: If you have `pipx`, installing copier is optional, you could run it directly.\n\n### Generate a Project With Copier\n\nDecide a name for your new project's directory, you will use it below. For example, `my-awesome-project`.\n\nGo to the directory that will be the parent of your project, and run the command with your project's name:\n\n```bash\ncopier copy https://github.com/fastapi/full-stack-fastapi-template my-awesome-project --trust\n```\n\nIf you have `pipx` and you didn't install `copier`, you can run it directly:\n\n```bash\npipx run copier copy https://github.com/fastapi/full-stack-fastapi-template my-awesome-project --trust\n```\n\n**Note** the `--trust` option is necessary to be able to execute a [post-creation script](https://github.com/fastapi/full-stack-fastapi-template/blob/master/.copier/update_dotenv.py) that updates your `.env` files.\n\n### Input Variables\n\nCopier will ask you for some data, you might want to have at hand before generating the project.\n\nBut don't worry, you can just update any of that in the `.env` files afterwards.\n\nThe input variables, with their default values (some auto generated) are:\n\n- `project_name`: (default: `\"FastAPI Project\"`) The name of the project, shown to API users (in .env).\n- `stack_name`: (default: `\"fastapi-project\"`) The name of the stack used for Docker Compose labels and project name (no spaces, no periods) (in .env).\n- `secret_key`: (default: `\"changethis\"`) The secret key for the project, used for security, stored in .env, you can generate one with the method above.\n- `first_superuser`: (default: `\"admin@example.com\"`) The email of the first superuser (in .env).\n- `first_superuser_password`: (default: `\"changethis\"`) The password of the first superuser (in .env).\n- `smtp_host`: (default: \"\") The SMTP server host to send emails, you can set it later in .env.\n- `smtp_user`: (default: \"\") The SMTP server user to send emails, you can set it later in .env.\n- `smtp_password`: (default: \"\") The SMTP server password to send emails, you can set it later in .env.\n- `emails_from_email`: (default: `\"info@example.com\"`) The email account to send emails from, you can set it later in .env.\n- `postgres_password`: (default: `\"changethis\"`) The password for the PostgreSQL database, stored in .env, you can generate one with the method above.\n- `sentry_dsn`: (default: \"\") The DSN for Sentry, if you are using it, you can set it later in .env.\n\n## Backend Development\n\nBackend docs: [backend/README.md](./backend/README.md).\n\n## Frontend Development\n\nFrontend docs: [frontend/README.md](./frontend/README.md).\n\n## Deployment\n\nDeployment docs: [deployment.md](./deployment.md).\n\n## Development\n\nGeneral development docs: [development.md](./development.md).\n\nThis includes using Docker Compose, custom local domains, `.env` configurations, etc.\n\n## Release Notes\n\nCheck the file [release-notes.md](./release-notes.md).\n\n## License\n\nThe Full Stack FastAPI Template is licensed under the terms of the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frender-examples%2Ffull-stack-fastapi-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frender-examples%2Ffull-stack-fastapi-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frender-examples%2Ffull-stack-fastapi-template/lists"}