How debojyotimishra/fit-company works
Project type and purpose
• This is a domain-split, message-driven Python fitness coach system that can run as a monolith (main_monolith.py) or as three separate microservices (fit, coach, stats).
• The README calls it an “AI fitness coach.” The code uses HTTP endpoints, RabbitMQ queues, and per-service databases, all containerized via Docker Compose.
File structure
• Top-level Docker artifacts:
• docker-compose.yml
• coach.Dockerfile, stats.Dockerfile, monolith.Dockerfile
• Entry points:
• main_monolith.py (all-in-one)
• main_coach.py, main_stats.py (service-specific runners)
• Service directories under src:
• src/fit (API layer: Flask/FastAPI blueprints, auth/user/workout endpoints)
• src/coach (queue consumer + fitness coaching logic + DB init scripts)
• src/stats (queue consumer + stats aggregation logic)
• Shared patterns: each service has its own database.py, models_db.py, models_dto.py, and defines its own queue messages in queue_messages.py.
README for additional insights
• System is started via Docker Compose (likely bringing up RabbitMQ, a relational DB, and one or more services).
• Testing is done via a Bruno collection (HTTP client) and K6 for load tests, so the “Fit” service is the public API surface.