Skip to content

A web application system to be used by the company staff, which could help them manage the rent a car business. This system helps business employees manage customer and car records.

License

Notifications You must be signed in to change notification settings

0xdibm/rent-a-car-spring-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rent-a-car-spring-react

Technologies


OpenJdk 11
Apache Maven 3.6.3 
Spring boot 2.4.0 M2
Mongo DB  
Docker Engine Community 19.03.12

A web application system to be used by the company staff, which could help them manage the rent a car business. This system helps business employees manage customer and car records.

Objectives


The core objectives are:
  1. Company Staff should be able to register Customers and Cars to be rented with required details
  2. Company Staff should be able to calculate total charges and release the car for rent upon completion of payment
  3. Company Staff should be able to generate Weekly/Monthly sales report
  4. Create Update Retrieve Delete Operations on Cars and Customers Data
  5. The System will ask the User to enter the necessary details for the customers and for the cars with the rental cost per day
  6. Unique GUI for the interactions of Users with the System
  7. The System must allow the customers to perform a car rental transaction

Setting Up Mongo DB


The systems data will be stores in a mongo database. The database consists of the following collections.

Customers Collections
Cars Collections
Sales Collections
Employees Collections

The system admin user can be created by executing a bash inside mongo db container by

docker container exec -it containername sh
//type the following in mongo
mongo 
show dbs // list all databases
show collections // list all collections
create database dbname // replace db name with a name of your choice
//create an Admin User for Mongo DB
> db.createUser({ user: "SYS_ADMIN", pwd:"ADMIN1234", roles:[{role:"userAdmin", db:"dbname"}] })

Once the user is created, use any IDE to go inside the monogo db and to manage the database you will require to enter

ip: localhost
port: 27017
username: user you just created
password: password you just assigned
database: database name you have given

Spring Boot JAVA CRUD Restful API Endpoints

The system must be able to call a list of cars and customers from the database

In order to envoke an endpoint the following schema is to be followed

GET API FOR THE COLLECTIONS MENTIONED ABOVE
http://localhost:8085/car/get/all
http://localhost:8085/car/get/{id}    
http://localhost:8085/customer/get/all
http://localhost:8085/customer/get/{id}    
http://localhost:8085/employee/get/all
http://localhost:8085/employee/get/{id}    
http://localhost:8085/sales/get/all
http://localhost:8085/sales/get/{id}    
http://localhost:8085/order/get/all
http://localhost:8085/order/get/{id}    
POST API FOR THE COLLECTIONS MENTIONED ABOVE
http://localhost:8085/car/create    
http://localhost:8085/customer/create    
http://localhost:8085/employee/create   
http://localhost:8085/sales/get/create   
http://localhost:8085/order/create

The model details are to be posted in Request Body as application/json

PUT API FOR THE COLLECTIONS MENTIONED ABOVE
http://localhost:8085/car/update    
http://localhost:8085/customer/update    
http://localhost:8085/employee/update   
http://localhost:8085/sales/get/update   
http://localhost:8085/order/update

The model details are to be posted in Request Body as application/json, moreover the id must be included in the Request Body to send a PUT Request.

DELETE API FOR THE COLLECTIONS MENTIONED ABOVE
http://localhost:8085/car/delete/{id}    
http://localhost:8085/customer/delete/{id}    
http://localhost:8085/employee/delete/{id}   
http://localhost:8085/sales/get/delete/{id}   
http://localhost:8085/order/delete/{id}

The model details are to be posted in Request Body as application/json, moreover the id must be included in the Path variable to send a delete Request.

About

A web application system to be used by the company staff, which could help them manage the rent a car business. This system helps business employees manage customer and car records.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published