This project aims to create a reservation management application based on a microservices architecture.
The application will handle reservations for resources, with each reservation associated with
a single resource.
A resource is defined by its ID, name, and type (MATERIEL_INFO, MATERIEL_AUDIO_VISUEL).
A reservation is defined by its ID, name, context, date, and duration, and is made by a person.
A person is defined by their ID, name, email, and function.
The application consists of two functional microservices:
- Resources-Service: Manages resources.
- Reservation-Service: Manages reservations made by people.
The technical microservices to be implemented are:
- Service Gateway: Based on Spring Cloud Gateway.
- Service Discovery: Based on Eureka Server.
- Service Configuration: Based on Spring Cloud Config.
For the application,
- A web frontend will be developed using the
Angular framework
. - Security will be based on OAuth2 and OIDC with
Keycloak
as the identity provider. - Microservices will generate RESTful web service documentation using the OpenAPI Specification
Swagger
. - Circuit breakers based on
Resilience4J
will be used for fault tolerance.
Technical architecture for the project, including the microservices and their interactions. Identify the technologies and tools used for each component.
Create a Maven project that includes the following microservices:
resources-service
C:.
│ .gitignore
│ Dockerfile
│ HELP.md
│ mvnw
│ mvnw.cmd
│ pom.xml
│
├───src
│ ├───main
│ │ ├───java
│ │ │ └───dev
│ │ │ └───moudni
│ │ │ └───resourcesservice
│ │ │ │ ResourcesServiceApplication.java
│ │ │ │
│ │ │ ├───dtos
│ │ │ │ ResourceRequestDTO.java
│ │ │ │ ResourceResponseDTO.java
│ │ │ │
│ │ │ ├───entites
│ │ │ │ Resource.java
│ │ │ │
│ │ │ ├───enums
│ │ │ │ ResourceType.java
│ │ │ │
│ │ │ ├───exceptions
│ │ │ │ ResourceNotFoundException.java
│ │ │ │
│ │ │ ├───mappers
│ │ │ │ ResourceMapper.java
│ │ │ │
│ │ │ ├───repository
│ │ │ │ ResourceRepository.java
│ │ │ │
│ │ │ ├───security
│ │ │ │ JwtAuthConverter.java
│ │ │ │ SecurityConfiguration.java
│ │ │ │
│ │ │ ├───service
│ │ │ │ ResourceService.java
│ │ │ │ ResourceServiceImpl.java
│ │ │ │
│ │ │ └───web
│ │ │ ResourceController.java
│ │ │
│ │ └───resources
│ │ │ application.properties
│ │ │
│ │ ├───static
│ │ └───templates
│
reservation-service
C:.
│ .gitignore
│ Dockerfile
│ HELP.md
│ mvnw
│ mvnw.cmd
│ pom.xml
│
├───src
│ ├───main
│ │ ├───java
│ │ │ └───dev
│ │ │ └───moudni
│ │ │ └───reservationservice
│ │ │ │ ReservationServiceApplication.java
│ │ │ │
│ │ │ ├───entites
│ │ │ │ Person.java
│ │ │ │ Reservation.java
│ │ │ │
│ │ │ ├───enums
│ │ │ │ ResourceType.java
│ │ │ │
│ │ │ ├───feign
│ │ │ │ FeignInterceptor.java
│ │ │ │ ResourceFeign.java
│ │ │ │
│ │ │ ├───model
│ │ │ │ Resource.java
│ │ │ │
│ │ │ ├───repository
│ │ │ │ PersonRepository.java
│ │ │ │ ReservationRepository.java
│ │ │ │
│ │ │ ├───security
│ │ │ │ JwtAuthConverter.java
│ │ │ │ SecurityConfiguration.java
│ │ │ │
│ │ │ └───web
│ │ │ PersonController.java
│ │ │ ReservationController.java
│ │ │
│ │ └───resources
│ │ │ application.properties
│ │ │
│ │ ├───static
│ │ └───templates
gateway-service
C:.
│ .gitignore
│ Dockerfile
│ HELP.md
│ mvnw
│ mvnw.cmd
│ pom.xml
│
├───src
│ ├───main
│ │ ├───java
│ │ │ └───dev
│ │ │ └───moudni
│ │ │ └───gatewayservice
│ │ │ GatewayServiceApplication.java
│ │ │
│ │ └───resources
│ │ application.properties
│ │ application.yml
discovery-service
C:.
│ .gitignore
│ Dockerfile
│ HELP.md
│ mvnw
│ mvnw.cmd
│ pom.xml
│
├───src
│ ├───main
│ │ ├───java
│ │ │ └───dev
│ │ │ └───moudni
│ │ │ └───discoveryservice
│ │ │ DiscoveryServiceApplication.java
│ │ │
│ │ └───resources
│ │ application.properties
config-service
C:.
│ .gitignore
│ Dockerfile
│ HELP.md
│ mvnw
│ mvnw.cmd
│ pom.xml
│
├───src
│ ├───main
│ │ ├───java
│ │ │ └───dev
│ │ │ └───moudni
│ │ │ └───configurationservice
│ │ │ ConfigurationServiceApplication.java
│ │ │
│ │ └───resources
│ │ application.properties
angular-front-app
Develop and test the following microservices:
- Discovery Service:
- Gateway Service:
- Config Service:
config git repository
: https://github.com/el-moudni-hicham/exam-config-git-repo
Develop and test the resources-service
microservice, including:
- Entities
- DAO (Data Access Object)
- Service
- DTO (Data Transfer Object)
- Mapper
- RestController
- H2 Database
- Endpoints Tests
- Swagger
Develop and test the reservation-service
microservice, including:
- Entities
- DAO
- Service
- DTO
- Mapper
- RestController
- Rest client using Open Feign
- H2 Database
- Endpoints Tests
- Resilience4J
- Swagger
Develop a simple web frontend for the application using the Angular framework.
- Login Page :
- Dashboard Reservations
- Display Reservator Infos
- Display Resource Infos
- Display Resource Infos in case of fault tolerance
- Reservators
- Resources
Secure the application with Keycloak for authentication.
Deploy the application using Docker and Docker Compose.
Now frontend app is accessible in port 8083
instead of 4200