How wuvictor-95/boards works
Based on our analysis of the provided file tree and README, Boards is a collaborative, event-driven, full-stack web application built using a microservices architecture. It consists of two primary backend services (backend-core and backend-notification), a frontend web client built with Next.js and Tailwind CSS, and a number of supporting infrastructure components (PostgreSQL, Redis for real-time pub/sub, RabbitMQ, and Kubernetes for orchestration).
Main Components
• Frontend Service: Represent the web client developed with Next.js, Tailwind CSS, and React DnD. This is the user interface where users create and interact with boards.
• Backend-core Service: This is the core API which handles user authentication, board/post management, and real-time communication via WebSockets (using Gorilla WebSockets) and uses routing (Chi Router). It also contains the DB layer (PostgreSQL) with migrations (“golang-migrate” and sqlc for SQL).
• Backend-notification Service: A separate microservice responsible for handling notifications. It leverages RabbitMQ tasks and integrates with email systems, along with interacting with the boards and other event sources.
• Real-Time Communication: This includes two key parts:
• Redis Pub/Sub: Used to synchronize data across client connections.
• WebSockets: For real-time events like creating, moving, or editing posts.
Relationships and Interactions
• That backend-core directly interacts with the PostgreSQL database (for CRUD operations), and that it employs Redis Pub/Sub and WebSocket events to push real-time updates back to the Frontend.
• Backend-notification should be shown as a consumer of task requests (triggered from the backend-core) – these tasks might involve sending emails, posting notifications, or handling board events – queued via RabbitMQ.
• Additionally, indicate that both backend services use shared libraries/components (e.g., logger, security, and AMQP wrappers) when integrating with infrastructure services.
• That container orchestration is managed by Kubernetes, which deploys all services and maintains configurations (as seen in the kubernetes directory).
Important Architectural Patterns and Design Principles
• Microservices pattern: Separate responsibilities between core application logic and notifications.
• Event-driven communication: Emphasize the use of RabbitMQ and Redis for asynchronous communication and real-time synchronization.
• Clean architecture: With separation between API routes (controllers), business logic (services), and data access layers (repositories/models).
• Containerization and orchestration: Use Docker images for building the services and Kubernetes for scaling, managing deployments, and networking.
Technologies, Frameworks, and Libraries
• Frontend: Next.js 13, Tailwind CSS, React DnD.
• Backend: Go (Golang), Chi Router, Gorilla WebSockets, JWT authentication, PostgreSQL (with pgx), sqlc, and golang-migrate.
• Infrastructure: Docker, Kubernetes (YAML configs for deployments and services), RabbitMQ, Redis.
• Additional Utilities: AMQP wrappers, logger and validator packages.
Additional Notes
• Since the project has extensive documentation and blog posts related to WebSockets and event processing, consider highlighting the event flow (publish/subscribe model) for real-time updates.
• Mention any test/mock modules (visible in the file tree) to underline that the design supports unit testing and integration testing.