Project Structure¶
This document describes the directory layout of the platform monorepo.
Root Layout¶
platform/
├── docs/ # Technical documentation (this directory)
│ └── platform/ # Per-module documentation for platform modules
├── modules/ # All npm workspace packages
│ ├── platform/ # Foundational platform modules
│ │ ├── console/ # Developer console (subscriptions, services inspector)
│ │ ├── core/ # Base UI components, Application shell, Express setup
│ │ ├── doc/ # Document storage and reactive data layer
│ │ ├── metaltura/ # Visual workspace & class-diagram editor
│ │ ├── schema/ # Zod-based schema, pub/sub layer, form generation
│ │ ├── security/ # Authentication & authorization
│ │ └── socket/ # WebSocket transport (Socket.io)
│ └── application/ # Business / domain modules
│ ├── app/ # Root entry point — wires all modules together
│ ├── beneva/ # Beneva insurance domain module
│ ├── chat/ # Chat and messaging
│ ├── kitchen/ # Kitchen / workspace management
│ └── members/ # Team member management
├── test/ # Shared Jest utilities and mocks
│ └── __mocks__/ # Style and file mocks for Jest
├── .env # Environment variables (not committed)
├── .eslintrc.json # ESLint configuration
├── .prettierrc # Prettier formatter configuration
├── Dockerfile # Docker build for the server
├── docker-compose.yml # Docker Compose for local development
├── jest.config.ts # Jest test runner configuration
├── monorepo.md # Legacy architecture notes (French)
├── package.json # Root npm workspace config & all third-party deps
├── tsconfig.json # Root TypeScript configuration
├── tsconfig.base.json # Additional shared TypeScript options
├── tsconfig.jest.json # TypeScript config used by ts-jest
└── vite.config.ts # Vite client build configuration
Internal Module Structure¶
Every module — whether platform or application — follows the same three-context layout:
modules/<category>/<name>/
├── package.json # Module manifest with exports & inter-module deps
├── tsconfig.json # Extends root tsconfig, includes src/**/*
└── src/
├── client/ # React components, hooks — browser only
│ └── index.ts # Barrel export (public API for client consumers)
├── server/ # Express handlers, DB access — Node.js only
│ └── index.ts # Barrel export (public API for server consumers)
└── common/ # Shared types, entities, utilities
└── index.ts # Barrel export (public API for both contexts)
Rules:
- Only client/, server/, and common/ are allowed at the first level of src/.
- If a context is not needed, its folder is simply absent (e.g., @platform/application has no server/).
- Sub-directories inside a context are free (components/, hooks/, services/, …).
- Cross-module imports must target the context barrel (@platform/<name>/client), never internal files.
- Intra-module imports use relative paths.
Categories¶
| Category | Location | Purpose |
|---|---|---|
| Platform | modules/platform/ |
Foundational infrastructure: no dependency on application modules |
| Application | modules/application/ |
Domain / business logic built on top of platform modules |
See workspaces.md for how modules are linked together and platform-modules.md for a summary of every platform module.