How yunusshaikh29/white-board works
Overall Monorepo Structure
• Inside this container, create two distinct sections: one for “Apps” and another for “Packages.”
Main Components
a. Apps:
b. Packages:
• packages/backend-common: Contains shared backend utilities and common logic that might be used by the HTTP and WebSocket services.
• packages/common: Provides shared types and utilities used throughout the monorepo.
• packages/db: Contains all database related code, including the Prisma schema and migrations. It interfaces with your database.
• packages/eslint-config & packages/typescript-config: These provide standard linting and TypeScript configuration across the projects.
• packages/ui: A shared UI component library that the whiteboard app (and potentially other front-end projects) can reuse. It also includes a turbo generators folder to assist with generating UI components.
Relationships & Data Flow
• Whiteboard App depending on the shared UI components (packages/ui) as well as any common utilities (packages/common).
Architectural Patterns & Design Principles
• Separation of concerns: backend (HTTP/WS) vs. frontend (Whiteboard App).
• Modular and reusable nature of the monorepo approach, where shared packages provide common functionality across all services.
• An annotation that points out the use of TypeScript across the board, along with support for code linting (ESLint) and formatting (Prettier).
• Mention that the project uses Turborepo’s caching and task running mechanisms (shown by files like turbo.json, pnpm-workspace.yaml) to optimize builds and development workflows.
Additional Details
• Don’t forget to note the presence of both front-end and back-end functionality; in this case, the whiteboard app shows full Next.js routing (pages, layouts, components) while the HTTP and WebSocket apps provide backend services.
• A section noting build and development support (e.g., use of PNPM for package management, Turborepo for task running) as part of the overall system design.