Fit Company Application
An event-driven fitness and billing platform migrating from a legacy Flask monolith to distributed microservices. Orchestrates payment transactions and premium upgrades via RabbitMQ event streams.
System Architecture
Data Flows & Communication
System Architecture & Communications Diagram
Interactive Scenario Simulator
Select a scenario to trigger and view simulated backend logs & database traces.
DevOps
Strangler Fig Decoupling
Incrementally isolated monolithic fit domains into specialized coach, billing, and stats microservices while keeping the platform live.
Event-Driven Messaging
Configured RabbitMQ with durable queues and direct exchange patterns to guarantee reliable delivery of plan activation triggers.
Multi-Database Isolation
Migrated the single database model to four independent PostgreSQL databases to prevent direct database coupling between domains.
Run Infrastructure Locally
You can easily spin up the complete containerized stack in your local terminal.
git clone https://github.com/everleepham/fit-company.git
cd fit-company
docker-compose up -dEngineering Challenges & Design Decisions
Monolith Migration Sync
Problem
Synchronizing subscription statuses back to the core monolith database asynchronously without creating circular HTTP dependencies.
Engineering Solution
Implemented an event consumer (BillQueueConsumer) in the monolith. When payment updates the subscription, the billing service publishes a plan-activated message, decoupling the services.
Key Achievements & Metrics
- Monolith features successfully extracted into 4 containerized Flask microservices.
- Created an asynchronous billing pipeline using RabbitMQ with reliable message delivery guarantees.
- Successfully isolated databases by running 4 independent PostgreSQL instances on Docker Compose.