Lab 15: Capstone — Enterprise Platform
Overview
Step 1: Platform Architecture
platform/
├── src/
│ ├── telemetry/
│ │ └── sdk.ts # OTel setup
│ ├── db/
│ │ ├── schema.ts # Drizzle schema + type exports
│ │ └── index.ts # Database connection
│ ├── domain/
│ │ ├── types.ts # Domain types + branded types
│ │ ├── schemas.ts # Zod schemas → OpenAPI
│ │ └── errors.ts # Tagged error types
│ ├── services/
│ │ ├── UserService.ts # Effect-TS service with DI
│ │ └── OrderService.ts # fp-ts ReaderTaskEither
│ ├── graphql/
│ │ ├── builder.ts # Pothos builder
│ │ └── schema.ts # Schema definition
│ └── server.ts # GraphQL Yoga server
└── tests/
├── types.test-d.ts # Type-level tests
└── services.test.ts # Vitest + fast-checkStep 2: Domain Types + Branded Types
Step 3: Zod Schemas → OpenAPI
Step 4: Effect-TS Service with DI
Step 5: fp-ts ReaderTaskEither Pipeline
Step 6: Pothos GraphQL Schema
Step 7: Vitest Type Tests + Property-Based
Step 8: Capstone — Full Integration Verification
Summary
Component
Technology
Status
Last updated
