ποΈ Control Hub Back
The core Backend API and Infrastructure provider for the FirstBreath platform. Built with AdonisJS (Node.js), it manages the primary database (MySQL), caching (Redis), and real-time Websocket communications.
π Architectureβ
This subsystem acts as the central hub:
- API Server (
AdonisJS): REST API for Frontend and Mobile apps. - Websockets: Real-time events (alerts, status updates) to clients.
- Infrastructure:
- MySQL: Main relational database for the entire platform.
- Redis: Message broker and cache (used by Vision services for pub/sub).
π Getting Startedβ
Prerequisitesβ
- Node.js & Yarn
- Docker & Docker Compose
Installationβ
-
Clone the repository:
git clone git@github.com:FirstBreath/Control-Hub-Back.git
cd Control-Hub-Back -
Run with Docker (Recommended):
docker-compose up --buildThis launches:
- MySQL
- Redis
- AdonisJS API
- CloudBeaver (DB GUI)
π οΈ Deployment (Dokploy)β
Configured for Dokploy via docker-compose.dokploy.yml.
- Network: Connects to
monitor-net(external) for monitoring integration. - Database: Both MySQL and Redis are exposed to the internal Docker network so other stacks (Vision, Monitoring) can access them.