GithubHelp home page GithubHelp logo

el-moudni-hicham / radar-violation-detection-system Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 10.42 MB

This is a web-based application built using Spring Boot and Angular. It is a radar violation detection system.

License: GNU General Public License v3.0

Java 34.26% TypeScript 23.70% HTML 34.27% JavaScript 7.73% CSS 0.04%
angular bootstrap eureka-discovery-service graphql grpc java rest-api soap spring-boot spring-cloud-gateway

radar-violation-detection-system's Introduction

Radar Violation Detection System

This is a web-based application built using Spring Boot and Angular. It is a radar violation detection
system It aims to detect and track radar violations, providing real-time notifications and reporting
reporting for efficient traffic management.
The backend is built using Spring Boot , while the frontend is built using Angular with Bootstrap for
the user interface.

In addition to the standard operations of data querying and modification, the system allow for
the submission of a speeding violation, resulting in an offense record. Furthermore, it should enable
vehicle owners to view their own violations, providing them with easy access to their offense history.

Table of Contents

Getting Started

Prerequisites

Before running this application, you need to have the following software installed on your system :

- Java Development Kit (JDK) version 11 or later
- Node.js version 14 or later
- Angular CLI version 13 or later

Installation

Follow these steps to install and run the application :

  1. Clone the repository :
git clone https://github.com/el-moudni-hicham/radar-violation-detection-system.git
  1. Navigate to the backend directory and run the following command to start the each Spring Boot project :
./mvnw spring-boot:run
  1. Navigate to the frontend directory and run the following command to install the required packages :
npm install
  1. After the packages are installed, run the following command to start the Angular application :
ng serve
  1. 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

Functionalities

The application allows performing the following operations:

  • Submit a speeding violation.
  • View violations of a vehicle owner.
  • Modify and view radar data.
  • Modify and view vehicle and owner data.
  • Modify and view infraction data.

Technical Architecture

Class Diagram

Backend Services

The backend contains 5 services :

Regestration 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, regestration number, brand, fiscal power, and model
  • Service Structure
├───src
│   ├───main
│   │   ├───java
│   │   │   └───ma
│   │   │       └───enset
│   │   │           └───regestrationservice
│   │   │               │   RegestrationServiceApplication.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

project example

Find Vehicle By Id

project example

Delete Vehicle

project example

Update Vehicle

project example

b. GraphQL :

All Vehicles with specific attributs

project example

Find Vehicle By Id with specific attributs

project example

c. SOAP :

Tests with SoapUI

All Owners

project example

Find Owner By Id

project example

d. GRPC :

Tests with BloomRPC

All Owners

project example

Find Owner By Id

project example

Radar Service

Radar microservice responsible for managing radars handles radar entities defined
by their ID, maximum speed limit, and coordinates (longitude and latitude)
  • Service Structure
├───src
│   ├───main
│   │   ├───java
│   │   │   └───ma
│   │   │       └───enset
│   │   │           └───radarservice
│   │   │               │   RadarServiceApplication.java
│   │   │               │
│   │   │               ├───entites
│   │   │               │       Radar.java
│   │   │               │
│   │   │               ├───feign
│   │   │               │       InfractionRestClient.java
│   │   │               │
│   │   │               ├───models
│   │   │               │       Infraction.java
│   │   │               │       NewData.java
│   │   │               │
│   │   │               ├───repositories
│   │   │               │       RadarRepository.java
│   │   │               │
│   │   │               └───web
│   │   │                       RadarRestController.java
│   │   │
│   │   └───resources
│   │       │   application.properties
│   │       │   radar-service.proto
│   │       │
│   │       ├───static
│   │       └───templates

Infraction Service

Infraction microservice responsible for managing violations handles each violation, which is defined
by its ID, date, the radar number that detected the offense, the vehicle regestration number,
the vehicle's speed, the radar's maximum speed limit, and the fine amount.
  • Service Structure
├───src
│   ├───main
│   │   ├───java
│   │   │   └───ma
│   │   │       └───enset
│   │   │           └───infractionservice
│   │   │               │   InfractionServiceApplication.java
│   │   │               │
│   │   │               ├───entites
│   │   │               │       Infraction.java
│   │   │               │
│   │   │               ├───feign
│   │   │               │       RadarRestClient.java
│   │   │               │       VehicleRestClient.java
│   │   │               │
│   │   │               ├───models
│   │   │               │       NewData.java
│   │   │               │       Owner.java
│   │   │               │       Radar.java
│   │   │               │       Vehicle.java
│   │   │               │
│   │   │               ├───repositories
│   │   │               │       InfractionRepository.java
│   │   │               │
│   │   │               └───web
│   │   │                       InfractionRestController.java
│   │   │
│   │   └───resources
│   │       │   application.properties
│   │       │
│   │       ├───static
│   │       └───templates

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
│   │   │   └───ma
│   │   │       └───enset
│   │   │           └───eurekadiscovery
│   │   │                   EurekaDiscoveryApplication.java
│   │   │
│   │   └───resources
│   │           application.properties
│   │
│   └───test
│       └───java
│           └───ma
│               └───enset
│                   └───eurekadiscovery
│                           EurekaDiscoveryApplicationTests.java
│

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
│   │   │   └───ma
│   │   │       └───enset
│   │   │           └───gateway
│   │   │                   GatewayApplication.java
│   │   │
│   │   └───resources
│   │           application.properties
│   │           application.yml

Road Radar

A Java application that simulates a radar system generating random speeding violations
and sending them to the Radar-Service.
  • Service Structure
├───src
│   ├───main
│   │   ├───java
│   │   │   └───ma
│   │   │       └───enset
│   │   │           └───radarroad
│   │   │               │   RadarDetectionService.java
│   │   │               │   RadarRoadApplication.java
│   │   │               │
│   │   │               └───models
│   │   │                       NewData.java
│   │   │                       Radar.java
│   │   │                       Vehicle.java
│   │   │
│   │   └───resources
│   │       │   application.properties
│   │       │
│   │       ├───static
│   │       └───templates
  • Test

project example

Frontend with Angular

Video Demonstration

v-radar-demo-video.mp4

Application Sceenshots

Login Page
project example

Welcome Page
project example

Dashboard Statistics
project example

Radars Page
project example

Sweet Alerts Example
project example

Add New Radar
project example

Vehicles and their Owners Page
project example

Infractions Page
project example

Show PDF
project example

License

This project is licensed under the GPL-3.0 license - see the LICENSE file for details.

radar-violation-detection-system's People

Contributors

el-moudni-hicham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.