Skip to content

Latest commit

Β 

History

History
111 lines (85 loc) Β· 3.37 KB

File metadata and controls

111 lines (85 loc) Β· 3.37 KB

FitHub πŸ‹οΈβ€β™‚οΈ

A comprehensive fitness and nutrition tracking API built with Django REST Framework, featuring goal management, meal tracking, and body measurements.

πŸ“š Documentation

πŸš€ Quick Start

Prerequisites

  • Python 3.13+
  • PostgreSQL 16+
  • uv (recommended package manager)

Installation

# 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 runserver

API available at: http://localhost:8000/
Interactive docs: http://localhost:8000/api/docs/

πŸ› οΈ Tech Stack

  • 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

πŸ§ͺ Testing

make test-fast    # Quick SQLite tests
make test         # Full PostgreSQL tests
make test-ci      # CI-style tests with coverage

πŸ”§ Development

make format       # Format code
make lint         # Check code quality
make security     # Security checks
make migrate      # Run migrations

πŸ“ Project Structure

fithub/
β”œβ”€β”€ 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

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests (make test)
  5. Commit and push
  6. Open a Pull Request

See Development Guide for detailed guidelines.

🎯 Features

  • 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

πŸ†˜ Support

  • Issues: Create an issue in the repository
  • API Docs: http://localhost:8000/api/docs/
  • Documentation: See the docs/ directory

πŸ“„ License

MIT License - see LICENSE file for details.