Skip to content

pietropeerani/gym-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏋️‍♂️ Gym Manager

A Dockerized PHP + MariaDB web application for managing gym operations, including attendance tracking, course enrollment, user management, and trainer management.


🚀 Features

👥 User & Trainer Management

  • Create, update, and delete user profiles
  • Manage trainers and assign them to courses
  • Role-based access (admin, trainer, member)

📚 Course Management

  • Create and schedule courses
  • Member registration for classes
  • Track available seats and course status

🕒 Attendance Tracking

  • Daily check-in tracking
  • Attendance history for each member
  • Exportable reports

🧱 Dockerized Architecture

  • PHP application in a dedicated container
  • MariaDB database container
  • phpMyAdmin interface for database access
  • Automatic initialization via .env variables

🛠️ Tech Stack

  • PHP
  • MariaDB
  • phpMyAdmin
  • Docker & Docker Compose

🔐 Environment Configuration

Create a .env file in the root directory. Below is the development configuration, which enables an admin login with username admin and password admin.

.env Example

DEV_MODE=true

# Admin credentials (development only!)
ADMIN_USERNAME=admin
ADMIN_HASH_PASSWORD='$2y$10$ePCfbB0tefjoqMwNDzVjROr0ehFvqO5FYG60KwrosI.qtz7rqendW'

⚠️ Security Warning

Do NOT use these credentials in production.

For production:

DEV_MODE=false

To generate a secure password hash:

php -r "echo password_hash('YourSecurePassword', PASSWORD_DEFAULT) . PHP_EOL;"

🐳 Getting Started with Docker

1. Requirements

Ensure you have:

  • Docker
  • Docker Compose

2. Clone the Repository

git clone https://github.com/pietropeerani/gym-manager.git
cd gym-manager

3. Start the Services

docker-compose up -d

🌐 Accessing the Application

Once the containers are running:

Service URL
Web App Preview http://localhost:8080
phpMyAdmin http://localhost:8081

These ports can be customized in your docker-compose.yml.


🧪 Development

Rebuild after code changes:

docker-compose up -d --build

View logs:

docker-compose logs -f

🗄️ Database Initialization

Place SQL scripts in:

/src/db/setup.sql

They will be executed automatically at first startup.


📜 License

This project is licensed under the MIT License.

About

Gym Management System

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages