How elyseemb/prep_website_abdz works
Project Type and Purpose
• This is a monorepo full-stack CRM/ERP management system built with a Domain-Driven Design (DDD) architecture.
• It combines two AdonisJS backends (“main” core app and “cms” content app) with React/Inertia frontends, shared React components, RPC utilities, UnoCSS tooling, and Ansible/Docker deployment scripts.
High-Level Architecture Overview
• Apps (services):
– main: Core DDD application (controllers, domain entities, repositories, services) exposing HTTP APIs via AdonisJS + Inertia.
– cms: Content management system with rich editor (TipTap) and file uploads (FilePond).
• Packages (shared libraries):
– design-system: React UI components + Storybook.
– rpc: Typed RPC client powered by Tuyau.
– tooling: Shared UnoCSS configuration.
• Infrastructure & Tools:
– PostgreSQL DB.
– Reverse proxy (Nginx).
– Container orchestrator (Docker Compose).
– Deployment automation (Ansible playbooks).
– Monitoring (GoAccess logs).
Main Components
a. Frontends
– React/Inertia apps for “main” and “cms”, importing design-system and rpc packages.
– Storybook (design-system) for local component development.
b. Backends
– AdonisJS servers (main and cms) running in separate containers or processes.
– Domain modules (articles, collections, auth, customers, taxonomies, comments, lessons).
c. Data Stores and External Services
– PostgreSQL instance.
– File storage endpoint (S3 or local volume) used by cms.
– Email or third-party services if any.
d. Shared Packages and Tooling
– design-system (npm workspace).
– rpc client.
– UnoCSS config.
e. Deployment & Infrastructure
– Docker Compose network.
– Nginx reverse proxy.
– Ansible control node invoking playbooks for app, DB, Nginx, Node setup.
– Monitoring/metrics (GoAccess).
Relationships and Data Flows
• User browser → Inertia frontend → HTTP → AdonisJS controllers
• Controllers → Services → Repositories → PostgreSQL
• Frontend code imports design-system for UI, rpc for remote calls.
• cms uploads → FilePond → Storage volume or S3.
• Inter-service RPC (if any) via rpc client/tuyau.
• Ansible orchestrates Docker images (backend, frontend static server, DB, Nginx).
Architectural Patterns and Design Principles
• Domain-Driven Design: domain, builder, transformer, repository, value objects.
• MVC (AdonisJS controllers/models) on the backend.
• Inertia.js layer to unify server-side routing with React views.
• Monorepo with pnpm workspaces for code sharing.
• Infrastructure as code: Docker + Ansible.