How cozero/engineering-hiring-challenge works
Project type and purpose
• This is a full-stack, monorepo-based application composed of three packages:
• @cozero/client – a React + Vite SPA that renders a metrics dashboard.
• @cozero/server – a NestJS REST API that connects to Postgres via Prisma.
• @cozero/lib – a shared TypeScript library supplying common types/utilities to both client and server.
• Its purpose is to display and manage “metrics” data stored in Postgres, with Docker Compose providing local orchestration.
File structure
• Top-level artifacts: docker-compose.yml (spins up Postgres and server), initdb.sql (seed data), workspace package.json, TypeScript configs.
• packages/client: React entry (index.html, index.tsx), config (vite.config.ts, Tailwind, PostCSS), UI components under src/components.
• packages/server: Nest CLI config, Prisma folder with schema & migrations, Nest modules under src/modules (e.g. reports, ping), main bootstrap in main.ts.
• packages/lib: Common code in src/index.ts with separate CJS/MJS outputs.
• Tests: Jest unit and e2e setups in both client and server.
README for additional insights
• Describes startup (Docker Compose, db:migrate, yarn bootstrap, separate dev servers).
• Architecture summary: highlights the three libraries and their roles.
• Emphasizes scalability, quality, and potential to add dependencies or improvements.