Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adam-bouafia/l-aquila-smart-roads-sose
Repository for the Project of Software Oriented (A.A. 2023-2024) held at the University of L'Aquila @UnivAQ by Prof. Marco Autili and Doc. Gianluca Filippone.
https://github.com/adam-bouafia/l-aquila-smart-roads-sose
angular discovery-service docker eureka feign gateway-api graphql grpc h2-database microservice openapi postman rest-api soap springboot swagger
Last synced: about 1 month ago
JSON representation
Repository for the Project of Software Oriented (A.A. 2023-2024) held at the University of L'Aquila @UnivAQ by Prof. Marco Autili and Doc. Gianluca Filippone.
- Host: GitHub
- URL: https://github.com/adam-bouafia/l-aquila-smart-roads-sose
- Owner: adam-bouafia
- License: other
- Created: 2024-07-23T14:18:27.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-24T05:04:22.000Z (4 months ago)
- Last Synced: 2024-10-10T03:23:07.252Z (about 1 month ago)
- Topics: angular, discovery-service, docker, eureka, feign, gateway-api, graphql, grpc, h2-database, microservice, openapi, postman, rest-api, soap, springboot, swagger
- Language: CSS
- Homepage:
- Size: 24.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# L'Aquila Smart Road Plateform
```
For the Project of Software Oriented at @Univaq:It's built using Spring Boot and Angular, designed as a monitor violation detection system. Its primary goal is to monitor vehicules violations.
The backend is implemented with Spring Boot, while the frontend utilizes Angular and Bootstrap for the user interface.
Beyond standard data querying and modification, the system allows for the submission of speeding violations, resulting in an offense record. Additionally, it enables vehicle owners to view their own violations, giving them easy access to their offense history.
```
# Frontend with Angular## Video Demonstration
https://github.com/user-attachments/assets/9307b89d-045d-457d-b22a-9f3ff03d31f3
## Application Sceenshots
Login Page
Dashboard Statistics
Monitors Page
Add New Monitor
Vehicles and their Owners Page
Amends Page
Show PDF
# Table of Contents
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Technologies Used](#technologies-used)
- [Technical Architecture](#technical-architecture)
- [Class Diagram](#class-diagram)
- [Backend Services](#backend-services)
- [Vehicule Service](#Vehicule-service)
- [Monitor Prosumer](#Monitor-Prosumer)
- [Amend Prosumer](#amend-prosumer)
- [Eureka Discovery Service](#eureka-discovery-service)
- [Gateway Service](#gateway-service)
- [Data Generator Service](#data-generator-service)
- [Frontend with Angular](#frontend-with-angular)
- [License](#license)## Getting Started
### Prerequisites
Before running this application, you need to have the following software installed on your system :```java
- Java Development Kit (JDK) version 11 or later
- Node.js version 14 or later
- Angular CLI version 13 or later
- Docker
```### Installation
Follow these steps to install and run the application :1. Clone the repository :
```
git clone https://github.com/adam-bouafia/L-Aquila-Smart-Roads.git
```
2. Navigate to the backend directory and run the following command to start the each Spring Boot project :
```
./mvnw spring-boot:run
```
3. Navigate to the frontend directory and run the following command to install the required packages :
```
npm install
```
4. After the packages are installed, run the following command to start the Angular application :
```
ng serve
```
5. Open your browser and navigate to `http://localhost:4200` to access the application.## Technologies Used
The following technologies and frameworks are used in this application:- Spring Boot
- Spring Cloud
- Eureka Descovery
- Angular
- Bootstrap
- MySQL
- Docker## Functionalities
The application allows performing the following operations:
- Submit a speeding violation.
- View violations of a vehicle owner.
- Modify and view monitor data.
- Modify and view vehicle and owner data.
- Modify and view amend data.## Technical Architecture
![Architecture](https://github.com/user-attachments/assets/f93f0b69-af53-4741-aa9a-cc6d76366021)
## Class Diagram
![Class Diagram](https://github.com/user-attachments/assets/48e3bd84-9ae0-4ce9-9365-5a07a27f4704)
## Backend Services
The backend contains 5 services :
### Vehicule Service
```
Registration microservice manages vehicles owned by owners. Each vehicle belongs to a single owner.
An owner is defined by their ID, name, date of birth, email.
A vehicle is defined by its ID, Vehicule number, brand, fiscal power, and model
```
- Service Structure├───src
│ ├───main
│ │ ├───java
│ │ │ └───univaq
│ │ │ └───disim
└───sose
│ │ │ └───Vehiculeservice
│ │ │ │ VehiculeServiceApplication.java
│ │ │ │
│ │ │ ├───entites
│ │ │ │ Owner.java
│ │ │ │ OwnerRequest.java
│ │ │ │ Vehicle.java
│ │ │ │
│ │ │ ├───repositories
│ │ │ │ OwnerRepository.java
│ │ │ │ VehicleRepository.java
│ │ │ │
│ │ │ └───web
│ │ │ ├───graphql
│ │ │ │ OwnerGraphqlController.java
│ │ │ │ VehicleGraphqlController.java
│ │ │ │
│ │ │ ├───grpc
│ │ │ │ │ GrpcConfig.java
│ │ │ │ │ OwnerGrpcService.java
│ │ │ │ │
│ │ │ │ └───stub
│ │ │ │ OwnerGrpcServiceGrpc.java
│ │ │ │ OwnerService.java
│ │ │ │
│ │ │ ├───rest
│ │ │ │ OwnerRestController.java
│ │ │ │ VehicleRestController.java
│ │ │ │
│ │ │ └───soap
│ │ │ CXFSoapWebServiceConfig.java
│ │ │ OwnerSoapController.java
│ │ │ OwnerSoapService.java
│ │ │
│ │ └───resources
│ │ │ application.properties
│ │ │ owner-service.proto
│ │ │ xsd-schema.xsd
│ │ │
│ │ ├───graphql
│ │ │ schema.graphqls
│ │ │
│ │ ├───static
│ │ └───templates
- Web services integration REST, GraphQL, SOAP et GRPC :
> a. REST :Tests with `Postman`
All Vehicles
Find Vehicle By Id
Delete Vehicle
Update Vehicle
> b. GraphQL :
All Vehicles with specific attributes
> c. SOAP :
Tests with `SoapUI`
All Owners
> d. GRPC :
Tests with `BloomRPC`
All Owners
Find Owner By Id
####
### Monitor Prosumer
```
Monitor microservice responsible for managing monitors handles monitor entities defined
by their ID, maximum speed limit, and coordinates (longitude and latitude)
```
- Service Structure
├───src
│ ├───main
│ │ ├───java
│ │ │ └───univaq
│ │ │ └───disim
└───sose
│ │ │ └───monitorprosumer
│ │ │ │ MonitorProsumerApplication.java
│ │ │ │
│ │ │ ├───entites
│ │ │ │ Monitor.java
│ │ │ │
│ │ │ ├───feign
│ │ │ │ amendRestClient.java
│ │ │ │
│ │ │ ├───models
│ │ │ │ amend.java
│ │ │ │ NewData.java
│ │ │ │
│ │ │ ├───repositories
│ │ │ │ MonitorRepository.java
│ │ │ │
│ │ │ └───web
│ │ │ MonitorRestController.java
│ │ │
│ │ └───resources
│ │ │ application.properties
│ │ │ Monitor-Prosumer.proto
│ │ │
│ │ ├───static
│ │ └───templates![UI Monitors](https://github.com/user-attachments/assets/afd8a52b-70f9-4e3b-a4af-4b7b5c77355c)
![UI New Monitor](https://github.com/user-attachments/assets/c9ada194-fed3-42b8-b745-c517a846ff4c)
### Amend Prosumer
```
amend microservice responsible for managing violations handles each violation, which is defined
by its ID, date, the monitor number that detected the offense, the vehicle Vehicule number,
the vehicle's speed, the monitor's maximum speed limit, and the fine amount.
```
- Service Structure
├───src
│ ├───main
│ │ ├───java
│ │ │ └───univaq
│ │ │ └───disim
└───sose
│ │ │ └───amendservice
│ │ │ │ amendServiceApplication.java
│ │ │ │
│ │ │ ├───entites
│ │ │ │ amend.java
│ │ │ │
│ │ │ ├───feign
│ │ │ │ MonitorRestClient.java
│ │ │ │ VehicleRestClient.java
│ │ │ │
│ │ │ ├───models
│ │ │ │ NewData.java
│ │ │ │ Owner.java
│ │ │ │ Monitor.java
│ │ │ │ Vehicle.java
│ │ │ │
│ │ │ ├───repositories
│ │ │ │ amendRepository.java
│ │ │ │
│ │ │ └───web
│ │ │ amendRestController.java
│ │ │
│ │ └───resources
│ │ │ application.properties
│ │ │
│ │ ├───static
│ │ └───templates![UI Amends](https://github.com/user-attachments/assets/771ddf2c-8faf-42c5-82b3-86b762e94fd2)
### Eureka Discovery Service
```
server-side component in the Netflix OSS stack that allows services to register
and discover each other in a microservices architecture.
```
- Service Structure
├───src
│ ├───main
│ │ ├───java
│ │ │ └───univaq
│ │ │ └───disim
└───sose
│ │ │ └───eurekadiscovery
│ │ │ EurekaDiscoveryApplication.java
│ │ │
│ │ └───resources
│ │ application.properties
│ │
│ └───test
│ └───java
│ └───univaq
│ └───disim
└───sose
│ └───eurekadiscovery
│ EurekaDiscoveryApplicationTests.java
│![Eureka](https://github.com/user-attachments/assets/3b760cb8-ae61-4684-8d3f-8af9ec68824b)
### Gateway Service
```
Spring Cloud Gateway It provides a centralized entry point for routing and filtering requests
to microservices in a distributed system, enabling dynamic and scalable routing based on various criteria.
```
- Service Structure
├───src
│ ├───main
│ │ ├───java
│ │ │ └───univaq
│ │ │ └───disim
└───sose
│ │ │ └───gateway
│ │ │ GatewayApplication.java
│ │ │
│ │ └───resources
│ │ application.properties
│ │ application.yml### Data Generator Service
```
A Java application that simulates a monitor system generating random speeding violations
and sending them to the Monitor-Prosumer.
```- Service Structure
├───src
│ ├───main
│ │ ├───java
│ │ │ └───univaq
│ │ │ └───disim
└───sose
│ │ │ └───monitorroad
│ │ │ │ MonitorDetectionService.java
│ │ │ │ MonitorRoadApplication.java
│ │ │ │
│ │ │ └───models
│ │ │ NewData.java
│ │ │ Monitor.java
│ │ │ Vehicle.java
│ │ │
│ │ └───resources
│ │ │ application.properties
│ │ │
│ │ ├───static
│ │ └───templates* Test
roject example"
![Data Generator Service Example](https://github.com/user-attachments/assets/6d757349-0f3d-4dd6-a622-665f04ef41ca)
## License
This project is licensed under the GPL-3.0 license - see the LICENSE file for details.