This service offers a REST API designed to support the functionality of a module portal, where 'module' is referred to as 'course' in the user interface. By querying the API endpoint, users can retrieve comprehensive details about courses, including descriptions, prerequisites, and user comments.
Users have the ability to:
- Search for modules using criteria such as module name, semester, and the range of ratings.
- Post and modify comments on individual modules.
- Rate modules based on their experience.
- Suggest prerequisites for any given module
- src
- main
- java
- de.tutum.moduleservice
- configuration
- Constants.java
- GrpcConfiguration.java
- controller
- CommentController.java
- ModuleController.java
- RatingController.java
- dto
- filter
- ModuleFilter.java
- Specification.java
- CommentDTO.java
- ModuleInfoDTO.java
- filter
- model
- CommentEntity.java
- ModuleEntity.java
- PrerequisiteEntity.java
- RatingEntity.java
- UpDownEntity.java
- repository
- CommentRepository.java
- ModuleRepository.java
- PrerequisiteRepository.java
- RatingRepository.java
- UpDownRepository.java
- service
- AuthService.java
- AuthServiceImpl.java
- AuthServiceNoopImpl.java
- CommentService.java
- CommentServiceImpl.java
- ModuleService.java
- ModuleServiceImpl.java
- RatingService.java
- RatingServiceImpl.java
- ModuleServiceApplication.java
- configuration
- de.tutum.moduleservice
- resources
- db.migration
- V1__init.sql
- application.yaml
- application-test.yml -test
- de.tutum.moduleservice.controller
- CommentControllerTest
- ModuleControllerTest
- RatingControllerTest
- resources
- data.sql
- db.migration
- java
- main
Explanation for selected folders:
- configuration folder:
- Constants: A file that provides dummy values and constants used for testing module service and for interacting with auth services.
- GrpcConfiguration: A Java configuration class that sets up a gRPC client for role management service.
- controller folder :REST controllers, managing CRUD operations for modules and comments.
- dto :
- filter: A file that provides the specification needed to get modules based on the user's requirements(e.g. rating range, semester).
- CommentDTO: A class that defines information from comments that would be transferred between services.
- ModuleDTO: A class that defines information from modules that would be transferred between services.
- model: Entities defined for module service.
- repository: JpaRepository is used in data access layer implementation.
- service:Implementation details of the business logic.
- db.migration:
- V1__init.sql: A file that defines the database Schema
- Java + Gradle
- Spring Boot 3.X
- Flyway Migration
- Exposes HTTP Endpoints (offers/ratings)
- gRPC Client (communication with AuthSerice)
This service uses the AuthSerice in order to manage permissions for the authorization by an external tool (can be deactivated via environmental variable AUTHSERVICE_ENABLE=false).
These endpoints are not secured against unauthorized usage by default!
The docker-compose.yaml includes a minimal setup
For an extensive local setup check out the Deployment repository and execute setup-k3d.sh
The api-docs.yaml file contains OpenAPI Doc.
On commit to main a new version will be build and pushed to the internal container repository.
- default: the
latesttag will be used - tagged commit: if a commit is tagged, the tag will be used as version in addition to the default behaviour
The GitLab CI templates used are located in the CICD.Templates repository.