A Flask-based web application for managing athletes, their training schedules, meals, supplements, and competitions.
- Features
- Tech Stack
- Project Structure
- Installation
- API Documentation
- Database Schema
- Core Features
- Business Logic
- 🏃♂️ Athlete Management
- Profile tracking
- Statistics monitoring
- Performance metrics
- 📅 Training Schedule
- Create/edit schedules
- Assign trainers
- 🍽️ Meal Planning
- Meal tracking
- Nutritional calculations
- Ingredient management
- 💊 Supplement Management
- Dosage tracking
- Intake scheduling
- 🏆 Competition Tracking
- Event management
- Results recording
- 👥 Staff Management
- Trainer assignments
- Doctor consultations
- Backend: Python 3.12, Flask framework
- Database: MySQL
- ORM: SQLAlchemy
- Architecture: MVC pattern
app/
├── controller/ # Request handlers
├── dao/ # Database operations
├── domain/ # Data models
├── root/ # Route definitions
├── service/ # Business logic
└── config.py # Configuration
- Clone repository
git clone https://github.com/nezeracuk/database-labs-LPNU.git
- Create virtual environment
python -m venv venv
.\venv\Scripts\activate
- Install dependencies
pip install -r app/requirements.txt
- Configure database
# filepath: app/config.py
SQLALCHEMY_DATABASE_URI = "mysql+pymysql://username:password@localhost/dbname"
- Initialize database
python app.py
/athlete
- Athlete CRUD operations/competition
- Competition management/meal
- Meal and nutrition tracking/schedule
- Training schedule management/trainer_doctor
- Staff management/supplement
- Supplement tracking
athlete
- Athlete informationcompetition
- Competition detailsmeal
- Meal recordsschedule
- Training schedulestrainer_doctor
- Staff recordssupplement
- Supplement informationathlete_trainer
- Relationship mappingathlete_statistics
- Performance metrics
- Complete CRUD operations
- Relationship handling
- Data validation
- Energy calculations
- Statistics tracking
- Automated table creation
- Data validation triggers