From e1ade01b63cff5f9295855f1279895f33af5f3b7 Mon Sep 17 00:00:00 2001 From: Oliver Kaup Date: Fri, 19 Dec 2025 10:04:12 +0000 Subject: [PATCH] readme updated key design decisions --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e4045e4..d2a4638 100644 --- a/README.md +++ b/README.md @@ -12,15 +12,13 @@ Backend (Fastify) → OpenAPI Spec → Generated API Client → Frontend (SolidJ ### Key Design Decisions -1. **OpenAPI-First API Design**: The backend uses Fastify with `@fastify/swagger` to automatically generate OpenAPI specifications from TypeScript schemas. +1. **Schema-First API Design**: Backend schemas (TypeBox/Zod) are the single source of truth. The OpenAPI specification is automatically generated from these schemas and actual route definitions using Fastify's `@fastify/swagger`, ensuring the API contract always reflects the actual backend implementation. 2. **Automatic Client Generation**: The `api-client-backend` package uses `@hey-api/openapi-ts` to generate a fully typed API client from the OpenAPI spec, ensuring type safety across the stack. 3. **Turborepo Watch Mode**: Development workflow uses Turborepo's watch feature to orchestrate the entire pipeline automatically - when you change an API schema, the OpenAPI spec is regenerated, the client is regenerated, and the frontend picks up changes via HMR. -4. **PNPM Workspace**: All packages are managed in a monorepo with workspace protocol for instant local dependency updates. - -5. **Environment-Based Configuration**: Frontend uses Vite's environment variable system (`VITE_*` prefix) for runtime configuration. +4. **Bare Metal Development**: Apps and packages run directly on the host machine (not containerized) for faster iteration, better debugging, and native tool integration. Only external dependencies like PostgreSQL run in Docker containers via `docker-compose`. ## What's inside?