លំហសិក្សាធិការកម្ពុជា លំហសិក្សាធិការកម្ពុជា V1.0
ចូល ចុះឈ្មោះ

Gym Membership management System

អ្នកចូលរួម
គ្រូណែនាំ: សេក សុជាតិ
មូលសង្ខេប / Abstract

Many small and medium-sized gyms still manage members using paper forms, spreadsheets, and manual payment records. These methods can take time, cause data entry mistakes, and make it difficult for staff to know whether a member is active or has expired. This project proposes a Gym Membership Management System to make these tasks easier and more organized. The system will be a web application developed using Python, Flask, and MySQL, with Object-Oriented Programming principles. It will provide separate access for Admin, Staff, Trainer, and Member users. Admin and Staff can manage members, membership plans, payments, and attendance. Trainers can view assigned members and training sessions, while Members can view their own membership, payment, and attendance information. The system will also provide search, filtering, expiry status, and simple reports such as daily revenue and membership status. The application will use a four-layer structure: Model, Repository, Service, and Route. Development will follow five two-week sprints, with testing performed during development. The expected result is a working prototype that reduces manual work, keeps records organized, improves membership checking, and provides a clear way to manage gym information in one system.

ពាក្យគន្លឹះ

                                               

                   Project GYM Membership Management

Advanced OOP with Python

Python + Flask + MySQL

Course: Object-Oriented Programming II

1.    Problem Statement

Many small and medium-sized gyms still manage members using paper forms, spreadsheets, and manual payment records. Staff may need to check payment records and membership dates manually. This can cause duplicate records, incorrect information, and slow check-in processes.

As the number of members increases, managing these records becomes more difficult. A centralized system can store member information, membership plans, payments, and attendance in one place. It can also make it easier to check membership status and identify memberships that are about to expire.

Therefore, this project aims to develop a Gym Membership Management System that reduces manual work, improves record accuracy, and makes common gym management tasks faster and easier.

2. Objectives

General Objective

To develop a web-based Gym Membership Management System using Python, Flask, MySQL, and Object-Oriented Programming to manage members, memberships, payments, attendance, and basic gym reports.

Specific Objectives

  •        Create a secure login system with four roles: Admin, Staff, Trainer, and        Member.
  •        Design the system using OOP and a simple layered architecture with Model, Repository,                   Service, and Route layers.
  •        Provide CRUD functions for member profiles and membership plans.
  •        Record payments, check membership expiry, and support membership renewal.
  •        Provide attendance tracking, search and filtering, and simple reports such as daily revenue and         membership status.

3. Research / Development Questions

  •      How can OOP and the Model, Repository, Service, and Route layers keep the system organized        and easy to maintain?
  •     What database structure and rules are needed to prevent duplicate member records and incorrect        payment records?
  •     How can the system make membership checking and renewal easier than a manual process?
  •     What basic features are needed to help gym staff manage members, payments, attendance, and          reports?
4. Scope and Limitation

4.1 Scope

  •         Member registration and profile management.
  •        Membership plan creation, update, viewing, and deletion.
  •        Membership enrollment and renewal with Active, Expiring, and Expired status.
  •        Payment recording and verification for cash and bank/QR payments.
  •        Attendance check-in and check-in history.
  •        Training session information for trainers and assigned members.
  •        Search and filtering by member name, membership plan, and status.
  •        Simple reports for membership status, expiring memberships, and daily revenue.
  •        Role-based access for Admin, Staff, Trainer, and Member.

4.2 Limitations

  •           Automatic payment-gateway confirmation is not included in the prototype.
  •        NFC and biometric hardware are not included.
  •        Only one gym branch is supported.
  •        No native mobile application will be developed; the system will be a responsive web                         application.
  •        Advanced class scheduling is outside the core system and may be added only if there is enough         time.
5. Target Users and Stakeholders

 Role Main Responsibility
 Admin Manages users, membership plans, payments, reports, and overall system information.
 Staff Registers members, manages memberships, records payments, and handles attendance.
 Trainer View assigned members and manages basic training session information.
 Member View their own profile, membership status, payment history, and attendance history
 Gym Owner Use reports to monitor memberships, revenue, and gym performance.


6. Proposed System Features

Module Description
 Authentication&Authorization Login/logout ,password hashing ,sessions and role based access.
 Member Management Create, view, update, and delete member profiles.
 Membership Plan Management CRUD for plan name, duration, and price.
 Membership Enrollment& Renewal Assign plans, calculate expiry dates, and identify expiring or expired memberships.
 Payment Recording& Verification Record amount and method and verify payment Records.
 Attendance Check in Record check in time and allow check in only when memberships is active.
 Training Sessions Trainers can view assigned members and manage basic training session information.
 Search& Filter Search members and filter by plan or membership status
 Reporting Dashboard Show daily revenue, active memberships, and expiring/expired memberships.


7. OOP Design Plan

The system will use Object-Oriented Programming so each class has a clear responsibility. Admin, Staff, Trainer, and Member inherit common features from User. Services use repositories to separate business logic from database access.

7.1 Domain / Model Classes

 Class Responsibility
 User Base class for system accounts and common user information.
 Admin Manages users, membership plans, payments ,and reports
 Staff Manages memberships, payments and attendance.
 Trainer Views assigned members and manages training sessions.
 Member Views personal membership, payments , and attendance.
 Membership Plan Defines a gym package, including name, duration, and price.
 Membership Represents a member's enrollment in a membership plan, including plan, including dates and status.
 Payment  Represents a payment for a membership, including amount, date, method, and status
 Attendance Represents a member check in record
 Training Session Represents a schedule training session between a trainer and a member.

7.2 Service Classes

 Service Responsibility
 Auth-Service Login, password checking, sessions, and role checks.
 User-Service Creates accounts, updates profiles, and manages account status.
 Membership-Service Creates and renews memberships and calculates status.
 Payment-Service Records and verifies payments and creates revenue summaries
 Attendance-Service Records check in and checks active membership.
 Training-Service Manages trainer assignments and training sessions.

7.3 Repository Classes

 Repository Responsibility
 User-Repository Reads and changes user data.
 MembershipPlan-Repository CRUD for membership plans.
 Membership-Repository CRUD for memberships and finds expiring/expired memberships.
 Payment-Repository CRUD for  payments and calculates revenue totals
 Attendance-Repository Creates and reads attendance records.
 TrainingScedule-Repository Creates and reads training session record

7.4 OOP Principles

 

  •          Encapsulation: Classes control their own data and methods.
  •        Inheritance: Admin, Staff, Trainer, and Member inherit common features from User.
  •        Polymorphism: Different roles can provide role-specific behavior.
  •        Abstraction: User defines common behavior without exposing unnecessary details.

  7.5Class Relationship

Figure 1. Simplified OOP class diagram showing domain, service, and repository layers

8. System Architecture

The system will use a four-layer architecture. The browser sends a request to a Flask route. The route calls a service for business logic. The service uses a repository to access MySQL.

The system will use a four-layer architecture. The browser sends a request to a Flask route. The route calls a service for business logic. The service uses a repository to access MySQL.





Figure 2. System architecture: Browser → Flask routes → Services → Repositories → MySQL.

8.1 Technology Stack

 Layer Purpose
 Browser/HTML/CSS Provides the user interface
 Flask Routes Receives requests and returns pages or responses
 Service Handles business rules and validation
 Repositories Handles MySQL database operations
 MySQL Store system data permanently
 Python OOP Provides classes and OOP principles.

9. Database Plan

Figure 3. Draft entity-relationship diagram (ERD) for the Gym membership sytem database.

9.1 Main Tables

 Table Main Columns Purpose
 roles role_id (PK), role_nameStores ADMIN,STAFF,TRAINER, and MEMBER.
 users user_id (PK), full_name, email, password_hash, role_id (FK), status Stores user accounts. Email is unique
 membership plans plan_id (PK), plan_name, duration_months, price Stores gym membership plans
 memberships membership_id (PK), member_id (FK), plan_id (FK), start_date, end_date, status Connects a Member to a Membership Plans
 payments payment_id (PK), membership_id (FK), amount, payment_date, method, status Stores membership payments
 attendance attendance_id (PK), member_id (FK), check_in_time Stores member check ins
 training schedule schedule_id (PK), trainer_id (FK), member_id (FK), session_date, session_time, status Stores training sessions

Main Relationships

  •           One role can belong to many users.
  •        One member can have many memberships over time.
  •        One membership plan can be used by many memberships.
  •        One membership can have one or more payments.
  •        One member can have many attendance records.
  •        One trainer can have many training sessions, and one member can attend many training                      sessions.
10. Methodology and Timeline

 The project will use an Agile-Scrum approach divided into five two-week sprints. At the end of each sprint, the team will review the work, test the main features, and fix important problems.

10.1 Timeline

 Period Main Tasks
 Week1 Requirements, research, OOP design, architecture, ERD, database schema, and project setup.
 Week2 Users, roles, authentication, authorization, and member profiles.
 Week3 Membership plans, memberships, expiry status, and renewal
 Week4 Payments, attendance, training sessions, search, filtering, and reports
 Week5-6 Integration, testing, bug fixing, security checks, documentation, screenshots, and final demo.

10.2 Testing Approach

  •         Use pytest for important model and service logic.
  •       Manually test login, role access, CRUD, payments, attendance, search, and reports.
  •       Test that routes, services, repositories, and MySQL work together.
  •       Use fictional data for final testing and demonstration
11. Expected Results

  •            A working Gym Membership Management web application using Python, Flask, and MySQL.
  •        Separate access for Admin, Staff, Trainer, and Member.
  •        CRUD functions for member profiles and membership plans.
  •        Payment recording, verification, and membership renewal.
  •        Attendance check-in and basic training session management.
  •        Search, filtering, and simple reports.
  •        A tested four-layer OOP structure.
  •        Project documentation, screenshots, testing evidence, and a final demonstration.

12. Risk and Ethics

12.1 Risk and Mitigation
 Risk Impact Mitigation
 Large project scope May be difficult to finish. Keep only core features and move extra ideas to future work.
 Unequal group contribution Some members may not understand the whole project. Use code reviews and make sure each member understands the main layers.
 Testing takes too long Bugs may remain until the deadline. Test features during development.
 Late database changes Can cause integration problems. Review the ERD before implementing repositories.
 Team member unavailable Tasks may be delayed. Document work and share the project through Git.

12.2 Data Privacy and Security

  •          Member personal information should only be visible to authorized users.
  •        Passwords must be hashed and never stored as plain text.
  •        Role-based authorization must prevent access outside a user's role.
  •        Payment records should only be visible to authorized users.
  •        Only fictional data should be used for testing and demonstration.

13. References

[1] A. D. Rahma, V. K. Bakti, and A. Basit, “Biometric Based Personal Identification for Cashless Payment Systems in Gym Memberships,” SISFO: Jurnal Ilmiah Sistem Informasi, vol. 10, no. 2, pp. 458–470, Oct. 2026.

[2] R. Trisudarmo, A. Ramdhani, D. Mardiyanti, and N. A. Permatasari, “Web-Based Gym Membership System with Semi-Automated QRIS Verification Developed Through Agile-Scrum,” Nusantara Journal of Artificial Intelligence and Information Systems, vol. 2, no. 1, pp. 17–26, Jun. 2026.

[3] S. Chokhandre, A. Raut, R. Chhatre, and S. Tarekar, “Gym Management System,” International Journal of Scientific Research and Technology, vol. 2, no. 1, pp. 74–76, 2025.

[4] D. J. C. Sihombing, “Development of Membership Management Application for Fitness Center using Extreme Programming Methodology,” Jurnal Ekonomi, vol. 13, no. 2, pp. 736–744, 2024.








Gym_MembershipPresentation.pdf
PDF ឯកសារ
ទាញយក អាន
ចែករំលែក
រក្សាទុក
មតិយោបល់ 0
ចូលគណនី ដើម្បីបញ្ចេញមតិ