Svelte_FastAPI_Boilerplate Svelte Themes

Svelte_fastapi_boilerplate

SvelteKit + FastAPI Boilerplate

Monorepo fullstack boilerplate — SvelteKit frontend, FastAPI backend, PostgreSQL (raw SQL, no ORM), Docker Compose.

Quick Start

cp .env.example .env
make up

Commands

make up              # Start all services
make down            # Stop all services
make build           # Rebuild images
make logs            # Tail logs
make migrate         # Run migrations
make migration       # Create new migration
make rollback        # Rollback last migration
make test-backend    # Run backend tests
make lint-backend    # Lint + format backend
make psql            # Open psql shell
make fresh           # Nuke volumes and restart

Project Structure

backend/            FastAPI + asyncpg + Alembic
  app/api/          Route handlers
  app/core/         Config, DB pool, JWT security
  app/queries/      Raw SQL files
  migrations/       Alembic raw SQL migrations
  tests/

frontend/           SvelteKit 2 + Svelte 5 + TypeScript
  src/lib/          API client, shared utils
  src/routes/       Pages (home, login)

docker-compose.yml  Dev environment (hot-reload)
.github/workflows/  CI pipeline

Tech

FastAPI, asyncpg, Alembic, JWT (python-jose), pydantic-settings, SvelteKit, Vite, PostgreSQL 16, Docker Compose, GitHub Actions.

Top categories

Loading Svelte Themes