HYH-GYM

HYH-GYM Flask Website

๐Ÿ‹๏ธ About the Project

HYH-GYM is a full-featured, responsive web application built with Flask (Python), HTML, CSS, and JavaScript, designed for gym users and administrators. It offers workout information, membership details, user interaction features, and admin functionality with secure authentication using Flask-Login. The application combines usability and design with practical tools like nutrition calculators and a workout info hub.


๐ŸŒŸ Key Features


๐Ÿงฑ Project Structure

HYH-GYM/
โ”‚โ”€โ”€ run.py                   # Flask application
โ”‚
โ”œโ”€โ”€ templates/              # Jinja2 templates
โ”‚   โ”‚โ”€โ”€ index.html          # Main homepage
โ”‚   โ”‚โ”€โ”€ membership.html     # Membership plans and payments
โ”‚   โ”‚โ”€โ”€ cardio.html         # Cardio workouts info
โ”‚   โ”‚โ”€โ”€ resistance.html     # Resistance training info
โ”‚   โ”‚โ”€โ”€ admin.html          # Admin dashboard (for adding classes, viewing users)
โ”‚   โ”‚โ”€โ”€ nutrition.html      # BMI & water intake calculator
โ”‚   โ”‚โ”€โ”€ about.html          # About us page
โ”‚   โ”‚โ”€โ”€ contact.html        # Contact and locations
โ”‚   โ”‚โ”€โ”€ shop.html           # Shop page (coming soon)
โ”‚   โ”‚โ”€โ”€ base.html           # Base template with navigation
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ security/           # Authentication templates
โ”‚       โ”‚โ”€โ”€ login.html      # Login page
โ”‚       โ””โ”€โ”€ register.html   # Registration page
โ”‚
โ”œโ”€โ”€ static/                 # Static files
    โ”‚โ”€โ”€ css/
    โ”‚   โ””โ”€โ”€ style.css       # All site styling
    โ”‚โ”€โ”€ js/
    โ”‚   โ””โ”€โ”€ script.js       # All site interactivity
    โ”‚โ”€โ”€ images/             # All images used in the website
    โ””โ”€โ”€ videos/             # Video files used on pages

๐Ÿ› ๏ธ Tech Stack


๐Ÿš€ How to Run Locally

  1. Clone the repo:
    git clone https://github.com/husseinelsaadii/HYH-GYM.git
    cd HYH-GYM
    
  2. Create a virtual environment:
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies:
    pip install -r requirements.txt
    
  4. Initialize the database:
    python app.py
    
  5. Open your browser and navigate to:
    http://localhost:5000
    

๐Ÿ“ฆ Dependencies

Flask==2.3.3
Flask-Login==0.6.3
Flask-SQLAlchemy==3.0.5
Werkzeug==2.3.7

๐Ÿ”’ Security Features


๐Ÿ—„๏ธ Database Schema

Users Table:

Classes Table:


๐Ÿ”ฎ Future Enhancements


๐Ÿ‘จโ€๐Ÿ’ป Developed By


๐Ÿ“ฉ Feedback

Weโ€™d love to hear your thoughts!
๐Ÿ‘‰ Click here to rate our website


๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.