A monorepo demonstrating AI-readiness best practices with Svelte and Fastify.
This repository showcases a minimal, production-ready monorepo setup optimized for maximum AI-readiness. It follows the best practices outlined in the AI-Readiness Action integration guide.
ai-readiness-dojo/
├── apps/
│ ├── client/ # Svelte + Vite frontend
│ │ ├── src/
│ │ │ ├── lib/ # Reusable components
│ │ │ ├── App.svelte # Root component
│ │ │ └── main.ts # Entry point
│ │ ├── tests/ # Component tests
│ │ └── package.json
│ │
│ └── server/ # Fastify backend
│ ├── src/
│ │ ├── routes/ # API routes
│ │ └── index.ts # Server entry point
│ ├── tests/ # API tests
│ └── package.json
│
├── .github/ # GitHub configuration (future)
├── pnpm-workspace.yaml # PNPM workspace config
├── package.json # Root package with scripts
├── tsconfig.json # Base TypeScript config
├── .prettierrc.json # Prettier config
├── eslint.config.js # ESLint config
├── vitest.workspace.ts # Vitest workspace config
└── README.md
This repository achieves maximum AI-readiness for JavaScript/TypeScript projects:
# Install all dependencies
pnpm install
# Run client in development mode
pnpm dev:client
# Run server in development mode
pnpm dev:server
# Run both in separate terminals
The client will be available at http://localhost:5173 and the server at http://localhost:3000.
# Build client
pnpm build:client
# Build server
pnpm build:server
# Run all tests
pnpm test
# Run tests with coverage
pnpm test:coverage
# Run tests in watch mode
pnpm test --watch
Coverage reports are generated in coverage/ directory with:
coverage-summary.json - Summary in Jest format (for AI-readiness checks)# Type checking
pnpm type-check
# Linting
pnpm lint
# Format code
pnpm format
# Check formatting
pnpm format:check
# Check for circular dependencies (runs in pre-commit)
pnpm circular:check
# Generate full dependency graphs (runs in pre-push)
pnpm deps:graph
# Check for high coupling (runs in pre-push)
pnpm deps:check-coupling
# Run all dependency checks
pnpm circular:check && pnpm deps:graph && pnpm deps:check-coupling
Reports are generated in docs/dependencies/ directory:
Dependency graphs (committed with code):
client-deps.json - Complete client dependency graphserver-deps.json - Complete server dependency graphCircular dependency reports (NOT persisted):
/tmp/ during checksPre-commit hook:
Coupling warnings:
Use cases:
pnpm dev:client - Start client dev serverpnpm dev:server - Start server dev serverpnpm build:client - Build client for productionpnpm build:server - Build server for productionpnpm test - Run all testspnpm test:coverage - Run tests with coveragepnpm type-check - Type check all packagespnpm lint - Lint all packagespnpm format - Format all filespnpm format:check - Check formattingpnpm circular:check - Check for circular dependenciespnpm circular:check:client - Check client circular dependenciespnpm circular:check:server - Check server circular dependenciespnpm deps:graph - Generate full dependency graphspnpm deps:graph:client - Generate client dependency graphpnpm deps:graph:server - Generate server dependency graphpnpm deps:check-coupling - Analyze coupling and warn about high complexitypnpm dev - Start Vite dev serverpnpm build - Build for productionpnpm preview - Preview production buildpnpm type-check - Type checkpnpm dev - Start server with hot reloadpnpm build - Build TypeScriptpnpm start - Start production serverpnpm type-check - Type checkThe eslint-plugin-boundaries enforces:
This ensures clean separation of concerns and prevents architectural drift.
This repository is ready for AI-readiness checks via GitHub Actions:
package.json - Dependencies and scriptstsconfig.json - TypeScript configuration.prettierrc.json - Prettier configurationeslint.config.js - ESLint configurationpnpm test:coveragepnpm installpnpm test:coveragecoverage/coverage-summary.jsonThis is a demonstration repository. Feel free to use it as a template for your own AI-ready monorepos.
MIT