GitHub Hot Board

GitHub Hot Board · Repository archive

4anklee/fastapi-fullstack-template

No translatable description yet — one arrives as the harvest finds it.

TypeScript

Data at October 284anklee

Best

#200

Underappreciated Gems

100

Total stars

0

Total forks

2

Days on boards (30d)

License: MITLast push: October 23Open issues: 6Collected since 2026-10-25; unknown = not yet harvested

README

FastAPI Full-Stack Template

A FastAPI backend, React SPA, and PostgreSQL database with authentication, user administration, password recovery, and an example items workflow.

Architecture

  • Production: one Docker container runs FastAPI and serves the built React frontend on any Docker-capable host. Supabase hosts PostgreSQL; your hosting platform or reverse proxy handles the public domain and HTTPS.
  • Development: run FastAPI and Vite locally against your local PostgreSQL database. Vite proxies /api to FastAPI on port 8000.
  • Backend: SQLModel, Pydantic, Alembic, Pytest, ty, and Ruff.
  • Frontend: TypeScript, TanStack Router and Query, Tailwind CSS, HeroUI, Gravity UI icons, Playwright, and Biome.
  • CI: backend tests, browser tests, and a combined Docker image smoke test. Dependabot checks backend and frontend dependencies daily.

Local setup

Install Python 3.14, uv, Node.js 24, and PostgreSQL. Enable Corepack for the pnpm version pinned in package.json:

corepack enable
cp .env.example .env

Start your local PostgreSQL server and create an app database, for example with createdb app. Edit POSTGRES_* in .env to match its host, database, username, and password. On Homebrew installations, the initial PostgreSQL username is usually your macOS username.

Initialize and run the backend:

cd backend
uv sync
uv run bash scripts/prestart.sh
uv run fastapi dev app/main.py

The prestart script applies migrations and creates the first administrator from FIRST_SUPERUSER and FIRST_SUPERUSER_PASSWORD in .env.

In another terminal, from the repository root:

pnpm install --frozen-lockfile
pnpm dev

Open http://localhost:5173 and sign in with your configured administrator. API documentation is at http://localhost:8000/docs.

Checks and tests

Create a separate local test database with createdb app_test, then run:

bash scripts/test.sh
cd backend
uv run bash scripts/lint.sh

The root test script selects app_test (or POSTGRES_TEST_DB), applies migrations, and runs backend tests with coverage. It uses your configured PostgreSQL connection.

See development.md for Playwright, local email capture, and running the built SPA. Run pnpm lint to check and fix frontend lint and formatting.

Deploy with Docker

Follow deployment.md to build the image, set Supabase credentials, run migrations, and configure your public URL and health check. Build from the repository root using backend/Dockerfile; the image includes the frontend automatically.

Make it your own

  1. Set the project name and administrator credentials in your environment.
  2. Set APP_NAME and APP_DESCRIPTION in frontend/src/config.ts to customize the app branding and page titles. Update the initial title in frontend/index.html, the logo in frontend/src/components/common/logo.tsx, and the package name in the root package.json.
  3. Adapt backend models in backend/app/models/, services in backend/app/services/, and endpoints in backend/app/api/routes/.
  4. Create Alembic migrations for database changes and regenerate the TypeScript client after API changes with bash scripts/generate-client.sh.

License

MIT.

Current rankings

  • 200

    Underappreciated Gems

    100 stars · 0 fork · Total stars (ascending)

    Underrated →

Momentum, past 30 days

Cumulative stars

Rank movement

Put your badge on the README · 4anklee/fastapi-fullstack-template[![Put your badge on the README](https://git.vaiox.xyz/api/badge/4anklee/fastapi-fullstack-template.svg)](https://git.vaiox.xyz/en/repo/4anklee/fastapi-fullstack-template)

Badge · 任何仓库都可以挂 —— 未上榜的仓库显示灰章,上完榜会自动点亮。

<a href="https://git.vaiox.xyz/en/repo/4anklee/fastapi-fullstack-template"><img src="https://git.vaiox.xyz/api/badge/4anklee/fastapi-fullstack-template.svg" alt="Put your badge on the README" height="20"></a>

← Back to boards

GitHub Hot BoardTime MachineDiscover联系我们 · Contact