Skip to content
tcoder14Public

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Gym

Smart Gym is a web-based Gym Management System built with PHP and MySQL. It provides three role-based portals — Admin, Trainer, and Member — for managing gym memberships, workout and diet plans, attendance, billing, and in-app messaging between trainers and members.

Features

Admin

  • Secure admin login (admin.php) and dashboard (admin_dashboard.php)
  • Add new members and trainers (add_member.php, add_trainer.php)
  • View and manage member and trainer lists (view_members.php, view_trainers.php)
  • View detailed member/trainer profiles (member_detail.php, trainer_detail.php)
  • Generate member bills/invoices (generate_bill.php)
  • View reports and analytics (reports.php)
  • Send email notifications (admin_email.php)

Trainer

  • Trainer registration and login (trainer_register.php, trainer_login.php)
  • Trainer dashboard and profile management (trainer_dashboard.php, trainer_profile.php)
  • Chat and inbox for communicating with members (trainer_chat.php, trainer_inbox.php)
  • Assign workout and diet plans to members (assign_plans.php, manage_workouts.php, manage_diets.php)

Member

  • Member registration and login (member_register.php, member_login.php)
  • Member dashboard and profile management (member_dashboard.php, member_profile.php)
  • Track attendance (member_attendance.php)
  • BMI calculator (member_bmi.php)
  • View assigned workout/diet plans (view_my_plans.php)
  • Make/view payments (member_payment.php)
  • Chat and inbox for communicating with trainers (member_chat.php, member_inbox.php)

General

  • Landing page (index.html, index.php)
  • Centralized database connection (db.php)
  • Shared stylesheet (style.css)
  • Session logout (logout.php)

Tech Stack

  • Backend: PHP (procedural, mysqli extension)
  • Database: MySQL / MariaDB
  • Frontend: HTML, CSS
  • Server environment: Apache (e.g. via XAMPP/WAMP/MAMP)

Prerequisites

  • PHP 7.4+ with the mysqli extension enabled
  • MySQL or MariaDB
  • A local server stack such as XAMPP, WAMP, or MAMP (recommended for easy setup)

Installation & Setup

  1. Clone the repository

    git clone https://github.com/tcoder14/Smart-Gym.git
  2. Move the project into your server's web root For example, with XAMPP:

    mv Smart-Gym /path/to/xampp/htdocs/
  3. Create the database Create a MySQL database named gym_project (matching the name configured in db.php):

    CREATE DATABASE gym_project;

    Note: This repository does not currently include a .sql schema file. You'll need to create the tables required by the application (members, trainers, admins, plans, attendance, payments, messages, etc.) based on the fields referenced in the PHP files, or export your working schema and add it to the project as gym_project.sql for others to import.

  4. Configure the database connection db.php is set up for a default local environment:

    $host = "localhost";
    $username = "root";
    $password = "";
    $dbname = "gym_project";

    Update these values to match your own MySQL credentials if different.

  5. Start Apache and MySQL from your XAMPP/WAMP/MAMP control panel.

  6. Open the app in your browser

    http://localhost/Smart-Gym/index.php
    

Usage

  • Visit the landing page and choose to log in or register as a Member or Trainer.
  • Admins log in separately via the admin portal to manage members, trainers, plans, billing, and reports.
  • Members and trainers can message each other through the built-in chat/inbox system.

Security Notes

  • The included db.php uses a blank root password, which is standard for local development only. Do not use these credentials in a production deployment.
  • Consider moving credentials to environment variables and adding input sanitization/prepared statements throughout if deploying beyond local/academic use.

Project Structure

Smart-Gym/
├── admin.php                 # Admin login
├── admin_dashboard.php       # Admin dashboard
├── admin_email.php           # Admin email notifications
├── add_member.php            # Add new member
├── add_trainer.php           # Add new trainer
├── assign_plans.php          # Assign workout/diet plans
├── db.php                    # Database connection
├── generate_bill.php         # Billing/invoice generation
├── index.html / index.php    # Landing page
├── logout.php                # Session logout
├── manage_diets.php          # Diet plan management
├── manage_workouts.php       # Workout plan management
├── member_*.php              # Member portal (auth, dashboard, chat, BMI, attendance, payments, etc.)
├── trainer_*.php             # Trainer portal (auth, dashboard, chat, profile)
├── reports.php                # Reporting
├── view_members.php          # List of members
├── view_trainers.php         # List of trainers
├── style.css                 # Stylesheet

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages