GitHub Hot Board

GitHub Hot Board · Hồ sơ kho lưu trữ

4anklee/fastapi-fullstack-template

Chưa có mô tả ngôn ngữ này — sẽ tự xuất hiện.

TypeScript

Dữ liệu tại October 284anklee

Thứ hạng tốt nhất

#188

Kho Báu Bị Lãng Quên

100

Tổng sao

0

Tổng fork

2

Số ngày có mặt (30 ngày)

Giấy phép: MITPush gần nhất: October 23Issue mở (gồm PR): 6Thu thập từ 2026-10-25; chưa rõ = chưa thu thập được

Tài liệu dự án

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.

Thứ hạng hiện tại

  • 188

    Kho Báu Bị Lãng Quên

    100 sao · 0 fork · Tổng Star (tăng dần)

    Lãng quên →

Diễn biến 30 ngày

Tổng số sao

Diễn biến thứ hạng

Gắn huy hiệu vào README của bạn · 4anklee/fastapi-fullstack-template[![Gắn huy hiệu vào README của bạn](https://git.vaiox.xyz/api/badge/4anklee/fastapi-fullstack-template.svg)](https://git.vaiox.xyz/vi/repo/4anklee/fastapi-fullstack-template)

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

<a href="https://git.vaiox.xyz/vi/repo/4anklee/fastapi-fullstack-template"><img src="https://git.vaiox.xyz/api/badge/4anklee/fastapi-fullstack-template.svg" alt="Gắn huy hiệu vào README của bạn" height="20"></a>

← Về bảng xếp hạng

GitHub Hot BoardCỗ Máy Thời GianKhám phá联系我们 · Contact