A comprehensive fitness and nutrition tracking API built with Django REST Framework, featuring goal management, meal tracking, and body measurements.
- 🏗️ Architecture - System design, dependencies, and data models
- 🔌 API Reference - Complete API documentation with examples
- 👨💻 Development Guide - Setup, workflow, and contribution guidelines
- 🚀 Deployment - Production deployment and CI/CD
- 📊 ER Diagram - Database schema visualization
- 🏗️ C4 Deployment - C4-style deployment architecture diagrams
- 🔄 CI Pipeline - Detailed CI/CD pipeline architecture and flow
- Python 3.13+
- PostgreSQL 16+
- uv (recommended package manager)
# Clone and setup
git clone <repository-url>
cd fithub
uv sync --extra test
# Database setup
createdb fithub
uv run manage.py migrate
uv run manage.py createsuperuser
# Start server
uv run manage.py runserverAPI available at: http://localhost:8000/
Interactive docs: http://localhost:8000/api/docs/
- Backend: Django 5.2.7 + Django REST Framework 3.16.1
- Database: PostgreSQL 16
- Authentication: JWT (primary) + Session + Token
- Testing: pytest + testcontainers + factory-boy
- Code Quality: black, isort, flake8, bandit, pre-commit hooks
- Package Management: uv
- Deployment: Docker + GitHub Actions CI/CD
make test-fast # Quick SQLite tests
make test # Full PostgreSQL tests
make test-ci # CI-style tests with coveragemake format # Format code
make lint # Check code quality
make security # Security checks
make migrate # Run migrationsfithub/
├── docs/ # Comprehensive documentation
├── nutrition/ # Nutrition tracking app
├── goals/ # Goals management app
├── authentication/ # Authentication endpoints
├── .github/workflows/ # CI/CD pipeline
├── Makefile # Development commands
└── pyproject.toml # Dependencies and config
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests (
make test) - Commit and push
- Open a Pull Request
See Development Guide for detailed guidelines.
- Nutrition Tracking: Meals, ingredients, and nutritional data
- Goal Management: Fitness goals with progress tracking
- Body Measurements: Composition tracking over time
- RESTful API: Complete CRUD with filtering and pagination
- Authentication: JWT, session, and token authentication
- Documentation: Auto-generated OpenAPI/Swagger docs
- Testing: Comprehensive test suite with containers
- CI/CD: Automated testing, security, and deployment
- Issues: Create an issue in the repository
- API Docs:
http://localhost:8000/api/docs/ - Documentation: See the docs/ directory
MIT License - see LICENSE file for details.