How lukaszfabia/chatterbox works
Project type and purpose
• This is a microservices‐based full-stack chat application (“Chatterbox”) that implements a simplified CQRS pattern and event-driven architecture.
• It consists of five back-end services (Auth, Profile, Notification, Chat, Status), a Next.js front-end, an Nginx reverse proxy, and uses Docker/Docker-Compose for local orchestration and Terraform/AWS for deployment.
File structure
• Top-level directories:
• auth_service (Python + FastAPI + PostgreSQL + Alembic)
• profile_service (Go + PostgreSQL)
• notification_service (Go + PostgreSQL + SMTP)
• chat_service (Node.js/TypeScript + Express + MongoDB + WebSocket)
• status_service (Node.js/TypeScript + Express + Redis + WebSocket)
• frontend (Next.js + React + REST + WebSocket)
• nginx (reverse proxy)
• aws (Terraform modules)
• docker-compose.yml (local orchestration)
• Each service follows a clear layering: domain, application (commands/events/queries), infrastructure (DB, messaging, REST, WS), and a top-level entrypoint (main.go or app.ts / main.py).
README for additional insights
• Services communicate via RabbitMQ as the event bus.
• Real-time interactions use WebSockets.
• Databases: PostgreSQL for Auth/Profile/Notification, MongoDB for Chat, Redis for Status.
• External integrations: SMTP (email), Google SSO, Google Cloud (optional), AWS ECR/Terraform for container registry & infra.
Be detailed but focused
• Microservice, its datastore, and its interactions on the bus.
• Nginx as the single entry point for HTTP traffic.
• This level of granularity ensures stakeholders see both high-level flow and critical architectural elements.