CCH (Cyclo Club Horizon) is a comprehensive API for managing cycling time trial competitions. The application provides robust functionality for managing teams, cyclists, competitions, stages, and race results.
- Language: Java
- Framework: Spring (IoC, MVC)
- ORM: Hibernate
- Testing: JUnit, Mockito
- XML Configuration
- Annotation-based Configuration
- Java-based Configuration
The API supports comprehensive CRUD operations for:
- Teams
- Cyclists
- Competitions
- Stages
- General Results
- Results
- Utilizes Hibernate SessionFactory
- Implements generic DAO for common database interactions
- Manages transactions via Hibernate and Spring
src/
├── main/
│ ├── java/
│ │ └── net/axel/
│ │ ├── config/ # Spring and application configurations
│ │ ├── controllers/ # REST API controllers
│ │ ├── domains/ # Domain models and DTOs
│ │ │ ├── dtos/ # Data Transfer Objects
│ │ │ │ ├── competitions/
│ │ │ │ ├── cyclists/
│ │ │ │ ├── generalResults/
│ │ │ │ ├── results/
│ │ │ │ ├── stages/
│ │ │ │ └── teams/
│ │ │ ├── embeddeds/ # Embedded value objects
│ │ │ ├── entities/ # JPA entity classes
│ │ │ └── enums/ # Enumeration types
│ │ ├── exceptions/ # Custom exception classes
│ │ ├── mappers/ # Object mapping utilities
│ │ ├── repositories/ # Data Access Objects (DAOs)
│ │ └── services/ # Business logic layer
│ │ ├── implementations/ # Service implementation classes
│ │ └── interfaces/ # Service interfaces
│ └── webapp/ # Web application resources
└── test/
└── java/
└── net/axel/
└── services/
└── implementations/ # Unit tests for service implementations
- Java 22
- Maven
- Tomcat
- PostgreSQL
- Clone the repository
- Configure database connection in
config/PersistenceConfig
- Run Maven dependency installation
- Build the project
- Deploy to Tomcat
GET /api/v1/teams
: List all teamsGET /api/v1/teams/{id}
: Get specific teamPOST /api/v1/teams
: Create teamPUT /api/v1/teams/{id}
: Update teamDELETE /api/v1/teams/{id}
: Delete team
- Cyclists
- Competitions
- Stages
- General Results
- Stage Results
mvn test
- Unit tests with JUnit
- Mockito for mocking dependencies
- Test-Driven Development (TDD) approach
- JPA
- Hibernate
- Spring IoC
- Spring MVC
- JUnit
- Mockito
- Tomcat
- ModelMapper/MapStruct
- Postman (API Testing)
- Test-Driven Development (TDD)
- Dependency Injection
- RESTful API Design
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Cyclo Club Horizon - abdelhakazrour3@gmail.com
Project Link: https://github.com/Mr-AXEL01/CCH