PeremohaSports is a backend application written in TypeScript for managing the data and business logic of a sports club. It provides structured RESTful API endpoints that allow tracking clients, memberships, payments, gym locations, trainers, rooms, scheduling, and attendance. The relational database is fully normalized up to the third normal form (3NF), ensuring data consistency and eliminating redundancy. All business processes are thoroughly described in the documentation, which also includes diagrams.
- Secure user authentication with OTP and role-based access control
- Full CRUD for clients, trainers, memberships, and sessions
- Payment processing and integration
- Management of gyms, rooms, trainers, and class scheduling
- Attendance tracking and session capacity enforcement
- Storing and linking trainer qualifications
- Relational database normalized to 3NF for data integrity
- Data validation powered by Zod for robust runtime guarantees
- Fully containerized with Docker for simplified setup and deployment
- Separate environments for development and testing
- Business processes and relationships are documented; PlantUML diagrams available in the repo
The documentation for the project can be found in the docs directory. This documentation covers all aspects of data modeling, business processes, and the theoretical and practical foundations of the backend. Note: This documentation applies to the modeling and planning. The server/ directory contains separate documentation and may differ from the primary project structure.
It includes:
- requirements.md - functional and data requirements of the system, business rules, description of entities, attributes, relationships.
- ddl.md - overview of the PostgreSQL database schema, including entity definitions, attributes, relationships, keys, and constraints.
- otlp.md - explains the Online Transaction Processing (OLTP) aspects: CRUD operations and typical SQL queries for day-to-day interactions with the data. Example queries and result screenshots included.
- olap.md - describes the Online Analytical Processing (OLAP) aspects: complex queries for data analysis, reporting, and decision-making. Example queries and result screenshots included.
- migration-notes.md - details the database migration process using Prisma Migrate, including steps taken, challenges faced, and solutions implemented.
- interfaces.ts - documents the TypeScript interfaces used in the backend application, detailing their structure and purpose.
For server-specific details, see documentation inside the
server/folder.
The project includes a comprehensive set of diagrams that describe the database structure, system behavior, and business processes. All diagrams were created using Draw.io and PlantUML and are stored in the diagrams/ directory.
- ERD (Chen notation)
- ERD (Crow’s Foot notation)
- ERD (PlantUML)
- Use Case Diagram (Draw.io)
- Use Case Diagram (PlantUML)
- Use Case Traceability Matrix
- Sequence Diagram (Draw.io)
- Sequence Diagram (PlantUML)
- Activity Diagram (Draw.io)
- Activity Diagram (PlantUML)
- BPMN Diagram (Draw.io)
- Component Diagram (Draw.io)
- Component Diagram (PlantUML)
For questions or help open an issue or contact the maintainers listed in the repository. Feel free to send pull requests for contribution! We welcome implementation of frontend or enhancements to the backend :)