Features • Stack • Quick Start • Scripts • Architecture • License
- 🚀 Fastify-first — Keeps the HTTP layer concrete, typed, and easy to replace or extend.
- 🧱 Modular monolith baseline — Starts with explicit
domains,logic,platform, andutilitiesboundaries without forcing premature structure. - 🦾 Strict TypeScript — Uses strict compiler options, path aliases, ESM, and modern Node.js assumptions.
- 🔧 Modern tooling — Ships with Oxfmt, Oxlint, TypeScript checks, esbuild bundling, and Docker helpers.
- 🌱 Starter-friendly — Lightweight scaffolding leaves the first real feature free to define the first real domain.
| Tool | Purpose |
|---|---|
| Fastify | HTTP server and plugin runtime |
| TypeScript | Strict application and config typing |
| esbuild | Production Node.js bundle |
| Oxfmt | Formatting and import organization |
| Oxlint | Fast static linting |
| Pino | Structured logging |
Create a new project from the starter:
npx degit luastoned/fastpi app-name
cd app-name
git init
yarn
yarn devThe development server listens at http://localhost:42000 by default.
| Command | Purpose |
|---|---|
yarn dev |
Start the server with hot reload |
yarn build |
Typecheck and bundle src/app.ts to dist/ |
yarn serve |
Run the bundled output with Node.js |
yarn start |
Run the TypeScript source directly with TSX |
yarn check:all |
Run typecheck, lint, and format check |
yarn typecheck |
Run TypeScript without emitting files |
yarn lint |
Run Oxlint |
yarn lint:fix |
Run Oxlint with fixes |
yarn format |
Format with Oxfmt |
yarn format:check |
Check formatting with Oxfmt |
yarn docker |
Build and run the Docker image locally |
FastPI follows a pragmatic modular-monolith structure:
| Path | Ownership |
|---|---|
src/app.ts |
Process lifecycle, startup, shutdown, errors |
src/config.ts |
Application-facing runtime config |
src/domains/* |
Business capabilities and business rules |
src/logic/* |
Cross-domain workflows once they exist |
src/platform/* |
Fastify transport and future infrastructure |
src/utilities/* |
Technical helpers with no business ownership |
The current starter keeps only src/platform/fastify concrete. Everything else is intentionally lightweight so the first real feature can define the first real domain boundary cleanly.
See docs/architecture.md for growth guardrails and dependency direction.
Build and run the app locally:
yarn dockerThe container exposes FastPI on port 42000.