This project is a web-based information system designed to manage users and bookings for a gym. It includes two subsystems: one for gym staff (administrators) and one for gym users (members).
- Introduction
- System Description
- Administrative Subsystem
- User Subsystem
- Implementation
- Technologies
- Database
- Web Services
- Installation Guide
- Usage Guide
- Admin Usage
- User Usage
- Gantt Chart
- Sources
- Contributors
- License
The goal of this project is to create a network-centric information system for managing users and bookings at a gym. It provides efficient and effective management of gym activities, ensuring a pleasant user experience for all interested parties.
The system consists of two main subsystems:
- User Registration Management: Approve or reject user registration requests.
- User Management: CRUD operations on user data including name, surname, country, city, address, email, username, and password.
- Gym Components Management: Manage gym trainers and available programs (e.g., pilates, crossfit, pool).
- Announcements/Offers Management: Post and manage announcements and offers visible to registered users.
- Program Schedule Management: Configure the schedule for each exercise including day, time, trainer, and available spots.
- News/Announcements: View gym announcements and offers.
- Gym Services Navigation: Browse and book gym services and view booking history.
- User Registration: Register by filling out a form with basic personal details and wait for admin approval.
The system is developed using JavaScript with Node.js. The main components include:
- Express: Web application framework for Node.js.
- Express-Session: Middleware for session management.
- MongoDB Atlas: Cloud-based NoSQL database service.
- EJS: View engine for generating dynamic HTML pages.
- CSS: Used for styling and layout.
The database is hosted on MongoDB Atlas and includes collections such as 'users', 'trainers', and 'programs'. The database can be accessed via the following link: MongoDB Atlas.
-
Login Service:
- Endpoint:
/login
- Method: HTTP POST
- Parameters:
username
,password
- Endpoint:
-
Registration Service:
- Endpoint:
/signup
- Method: HTTP POST
- Parameters:
username
,password
,email
,fullname
, etc.
- Endpoint:
-
Dashboard Service:
- Endpoint:
/dashboard
- Method: HTTP GET
- Parameters: Uses session object to retrieve user information
- Endpoint:
-
Admin Actions:
- Endpoint:
/admin-action
- Method: HTTP POST
- Parameters:
userId
,action
- Endpoint:
-
User Deletion:
- Endpoint:
/admin-dashboard/delete-user
- Method: HTTP POST
- Parameters:
userId
- Endpoint:
-
Add Announcement:
- Endpoint:
/admin-dashboard/add-announcement
- Method: HTTP POST
- Parameters:
announcement-text
- Endpoint:
-
Reservation Management:
- Endpoint:
/make-reservation
- Method: HTTP POST
- Parameters:
scheduleId
,userId
- Endpoint:
-
Logout Service:
- Endpoint:
/logout
- Method: HTTP POST
- Parameters: None
- Endpoint:
- Operating System: Windows, Linux, or macOS
- Python: Download Python
- Node.js: Download Node.js
- Navigate to the project directory:
cd <project-directory>
- Install the required dependencies:
npm install
- Run the application:
node app.js
The application will be accessible at http://localhost:5500
.
- Login:
- Navigate to
http://localhost:5500
. - Login with admin credentials:
- Username: mixalis
- Password: mixalis123
- Navigate to
- Manage Users:
- Approve or reject registration requests.
- Edit or delete user details.
- Manage Announcements:
- Post, edit, or delete announcements.
- Manage Programs:
- Configure the schedule for each exercise.
- Edit or delete program details.
- Registration:
- Navigate to
http://localhost:5500
. - Click on "Sign Up" and fill in the registration form.
- Wait for admin approval.
- Navigate to
- Booking Services:
- Once logged in, browse available services and schedule.
- Book services and view your booking history.
- Logout:
- Click the logout button located at the top left of the webpage to log out.