A full-featured monorepo using Turborepo + SvelteKit 2 with domain-driven design.
# Prerequisites: Node.js >= 18, npm >= 10, Docker/Podman
git clone [email protected]:thebrianbug/svelte-turbo-starter.git
cd svelte-turbo-starter
npm install
npm run dev
# Start development
npm run dev
npm run build # Build all
npm run lint # Lint/format
# Testing
npm test # Run all tests
npm run test:e2e # E2E only
# Database
npm run docker:up # Start PostgreSQL
npm run docker:down # Stop PostgreSQL
.
โโโ apps/
โ โโโ docs/ # Documentation
โ โโโ web/ # Main app
โโโ packages/
โโโ bll/ # Business logic
โโโ db/ # Database layer
โโโ ui/ # Shared UI
โโโ config/ # Tooling configs
Models (db/src/models/
)
Services (bll/src/domains/
)
Repositories (db/src/repositories/
)
DB Layer (db/
)
BLL Layer (bll/
)
Shared Layer (shared/
)
*/tests/integration/
)*.test.ts
)apps/*/tests/
)npm run build
npm run preview # Preview the built applications
The project uses TypeScript for static type checking:
npm run check
to verify types across all projectstypescript-config
packagetsconfig.json
that extends the shared configWhen using AI coding assistants like GitHub Copilot or Claude, provide this system context for optimal code generation:
Tech Stack:
- Frontend: Svelte 5 (Svelte 5 syntax only) + TypeScript, Vite v6, TailwindCSS v3
- Backend: PostgreSQL with Docker/Podman, Drizzle ORM
- Architecture: Domain-driven design, Modular structure (UI, BLL, DB layers)
- Testing: Vitest for unit/integration, Playwright for E2E
- Quality: TypeScript v5, ESLint (security, promise, sonar, unicorn plugins), Prettier with Svelte plugin
- Node.js >=18, NPM 10
Testing Notes:
- ts-mockito is used for mocking in unit tests
- Follow TDD principles: write tests first, then implementation
- Place unit tests next to source files with .test.ts extension
- E2E tests go in the tests/ directory of each app
Note: See the scripts for additional utility scripts to help with LLM.
This project is licensed under the MIT License - see the LICENSE file for details.
npm install
npm run test