monorepo-template Svelte Themes

Monorepo Template

Modern full-stack boilerplate: FastAPI + Svelte 5. Production-ready with multi-stage builds.

nokodo logo

Monorepo Template

Modern & production-ready full-stack template that saves you weeks of setup: FastAPI backend + Svelte 5 frontend with containerization, full CI/CD, VS Code support, and AI integrations.

๐Ÿ› ๏ธ Stack

  • Backend: FastAPI (Python 3.13+), SQLAlchemy 2.0+, Pydantic, PostgreSQL 17, Alembic
  • Frontend: Svelte 5, Vite 6, Tailwind 4, TypeScript, native fetch (zero HTTP deps)
  • Type Safety: OpenAPI TypeScript generator (auto-sync backend โ†’ frontend types)
  • Dev: VS Code (tasks, debugger, extensions), Ruff, pytest, AI instructions
  • Deploy: Docker Compose with production configs

โœจ Features

  • ๐Ÿ—๏ธ Production infrastructure: PostgreSQL 17, multi-stage Docker builds, Nginx configs
  • ๐Ÿ”’ End-to-end type safety: Python type hints โ†’ OpenAPI โ†’ auto-generated TypeScript types
  • ๐Ÿค– Full CI/CD pipeline: Automated testing, Docker builds, GHCR publishing, releases
  • ๐Ÿงช Complete test setup: pytest (backend) + Vitest (frontend) with fixtures and full coverage
  • ๐Ÿ“ Modern code standards: EditorConfig, Ruff, ESLint, Prettier pre-configured
  • ๐Ÿ’พ Persistent data storage: Volume-mounted data directory
  • ๐Ÿ› ๏ธ VS Code integration: Tasks, debugger configs, recommended extensions
  • ๐Ÿค– AI agents ready: Premade instructions & prompts with extensible patterns
  • ๐ŸŽฏ Minimal boilerplate: No business logic, just a working foundation
  • ๐Ÿ”ฎ Future-proof stack: Latest stable versions of everything, zero tech debt from day one

๐Ÿš€ Quick Start

1๏ธโƒฃ Create Your Repository

  • Click "Use this template" on GitHub โ†’ Create your repo
  • Clone your new repository locally

2๏ธโƒฃ Customize Project

Rename backend/project_slug/ to your project name and update references. See docs/setup.md for detailed instructions.

3๏ธโƒฃ Start Development

cd .docker
docker compose up -d

Your services:

๐Ÿ’ก VS Code users: Open the workspace to get tasks, debugger configs, and recommended extensions automatically.

4๏ธโƒฃ Deploy to Production

CI/CD automatically builds and pushes Docker images to GitHub Container Registry (GHCR) on every commit. Images are tagged as:

  • ghcr.io/your-org/your-repo:latest โ†’ production branch
  • ghcr.io/your-org/your-repo:dev โ†’ dev branch
  • ghcr.io/your-org/your-repo:v1.2.3 โ†’ releases

Deploy with Docker:

# Pull pre-built images and deploy
docker compose pull
docker compose up -d

๐Ÿ’ก Tip: See docs/setup.md for full deployment instructions and environment configuration.

๐Ÿ“ Structure

backend/
โ”œโ”€โ”€ api/                   # FastAPI application
โ”‚   โ”œโ”€โ”€ api/v1/endpoints/  # Route handlers
โ”‚   โ”œโ”€โ”€ core/              # Config, database
โ”‚   โ”œโ”€โ”€ models/            # SQLAlchemy ORM
โ”‚   โ”œโ”€โ”€ schemas/           # Pydantic validation
โ”‚   โ”œโ”€โ”€ tests/             # API & ORM tests
โ”‚   โ””โ”€โ”€ alembic/           # Database migrations
โ”œโ”€โ”€ project_slug/          # SDK/service layer (rename me!)
โ”‚   โ””โ”€โ”€ tests/             # SDK unit tests (optional)
โ”œโ”€โ”€ tests/                 # E2E integration tests
โ””โ”€โ”€ data/                  # Data storage (volume mounted)

frontend/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ lib/               # Components
โ”‚   โ””โ”€โ”€ main.ts            # Entry point
โ””โ”€โ”€ nginx.conf             # Production server

.docker/                   # Docker configs
โ”œโ”€โ”€ Dockerfile.backend     # Backend build
โ”œโ”€โ”€ Dockerfile.frontend    # Frontend build
โ”œโ”€โ”€ docker-compose.yml     # Production
โ””โ”€โ”€ docker-compose.dev.yml # Development

.github/                   # CI/CD, Dependabot, CODEOWNERS
.vscode/                   # Editor config, tasks, debugger
tools/release_please/      # Release automation config

๐Ÿ—๏ธ Architecture

Backend:

  • api/: FastAPI app, routes, ORM, database setup
  • project_slug/: Business logic SDK that can be packaged separately for pip distribution
  • Testing: 3 tiers (API tests in api/tests/, SDK tests in project_slug/tests/, E2E in tests/)
  • URLs: /v1/users (no /api prefix - deploy on api.yourdomain.com)

Frontend:

  • Native fetch - Zero HTTP library dependencies, uses web standards
  • OpenAPI types - Auto-generated TypeScript types from FastAPI schema
  • Type safety - Backend changes = compile errors in frontend if incompatible

๐Ÿ“„ License

BSD 3-Clause - See LICENSE for details.

Top categories

Loading Svelte Themes