How pt-hieu/lettutor-crm works
• Apollo – the main backend service (using NestJS as indicated by the configuration and module structure) handling core CRM business logic like actions, user management, auth, deals, feeds, files, logs, notifications, etc.
• Artemis – the frontend web application (built with Next.js/React, as seen from pages, components, and style configurations) providing the user interface.
• Hades – the migration service that manages database schema changes through migration scripts.
• Poseidon – a CMS (Content Management System) which likely handles content-related admin functions for the CRM.
• Athena – the infrastructure provisioning layer built with Terraform where AWS resources (VPCs, EC2 instances, ALBs, etc.) are defined.
• Additional microservices such as Ares and Zeus – both built with NestJS (they include nest-cli.json, .env, and similar structures) likely provide supporting functionalities (e.g., AWS operations in Ares, event handling or JWT-based logic in Zeus).
Main Components
• Backend API (Apollo): Include its sub-modules like Auth, Action, Deal-Stage, Feed, File, Log, Mail, Module, Note, Notification, Role, Task, User, etc.
• Frontend (Artemis): Represent pages (login, settings, report, task, etc.) and components, indicating the client-side UI.
• CMS (Poseidon): Highlight its API endpoints, admin configuration, and content management modules.
• Migration (Hades): Show its role in running DB migrations, with connections to the database.
• Additional services (Ares, Zeus): Represent these as auxiliary backend services that interact with the main application, maybe focusing on specialized tasks (like AWS integrations or specific event handling).
Establish Relationships and Interactions
• The Frontend (Artemis) communicates via HTTP/REST (or potentially GraphQL) with the Backend (Apollo) and CMS (Poseidon).
• Apollo and potentially other backend services (Ares, Zeus) interact with a shared database (or multiple databases) and external services (like mail and file storage).
• Hades (Migration) connects to the same database used by these services to ensure the schema is current.
• Athena (Terraform) represents the infrastructure layer that provisions and manages the cloud resources required to host these services.
• CI/CD integration: Show that GitHub workflows (stored in .github/workflows) trigger builds, tests, and deploys for these services using Dockerfiles and docker-compose files in the docker directory.
Architectural Patterns and Technologies
• Microservices architecture and the clear separation of concerns:
• Backend services follow the NestJS framework and an MVC-like module structure.
• The Frontend is built using a framework (likely Next.js based on file naming and page structure), incorporating component-based design.
• Infrastructure as Code is managed by Terraform (Athena) for automated cloud resource setup.
Final Checklist
• Be detailed: Break down internal modules where useful (for example, list out the key modules in Apollo or the major pages/components in Artemis) to provide a clear technical overview.
• Both logical (service interactions, API calls, data migrations) and infrastructural elements (deployment pipelines, infrastructure provisioning via Terraform).