Architecture for Newcomers
Last Verified: February 2026This is a simplified overview of the Equa platform architecture, designed to help new engineers understand how the system is organized and where to find things. For deeper technical detail, see the forthcoming Phase 1 Architecture documentation.
System Diagram
Frontend Modules
equa-web organizes features into 24 modules underequa-web/src/modules/. Each module typically contains its own components, services, and (in some cases) Redux store slices.
Source:
equa-web/src/modules/ directory listing
Backend Modules
equa-server uses Yarn workspaces with 20 modules underequa-server/modules/. Each module is a separate package with its own package.json, src/ directory, and TypeScript config.
Source:
equa-server/modules/ directory listing
Key Data Flows
Authentication Flow
Source:equa-server/modules/auth/src/ for authentication logic; session-based auth using Express sessions
Cap Table CRUD
- User interacts with the cap table UI (
equa-web/src/modules/captable/) - Frontend calls REST endpoints (
POST /v1/captable/...) - equa-server’s
apimodule routes to thecaptablemodule captablemodule usespersistencemodule to read/write TypeORM entities- Data stored in PostgreSQL
equa-server/modules/captable/ for business logic, equa-server/modules/persistence/src/entity/ for entity definitions
File Upload
- User selects file in frontend
- Frontend sends multipart upload to
POST /v1/files/upload file-storagemodule processes the upload- File stored in AWS S3 or Google Cloud Storage (configured via
STORAGE_TYPEenv var) - Database record created linking the file to its owner entity
equa-server/modules/file-storage/
Equanaut AI Chat
- User opens chat in
equa-web/src/modules/equanaut/ - Frontend connects to equabot-gateway via WebSocket (port 18789)
- Gateway routes the message to Claude API
- Response streamed back through WebSocket to frontend
equabot-gateway/src/gateway/ for protocol handling
Where Does X Live?
Path Aliases (equa-web)
equa-web uses TypeScript path aliases so you don’t need long relative imports. These are defined inequa-web/tsconfig.json:
Source:
equa-web/tsconfig.json paths configuration
Architecture Patterns
equa-server uses these key patterns:- Modular monolith: Each domain is a separate Yarn workspace package, but they deploy as a single process
- vineyard-lawn: A custom REST framework that provides endpoint decorators, validation, and routing on top of Express
- Repository pattern: Data access goes through the
persistencemodule rather than calling TypeORM directly from business logic - Service layer: Business logic lives in module
src/directories, HTTP concerns in theapimodule endpoints
- Module pattern: Features are self-contained under
src/modules/with their own components, services, and routes - Redux (legacy): Older modules use Redux for state management; newer code prefers React hooks and local state
- styled-components: CSS-in-JS for component-scoped styling with a global ThemeProvider