- We have developed this REST API for an Covid-19 Application. This API performs all the fundamental CRUD operations of any Covid-19 Application platform with user validation at every step.
- This project is developed by team of 5 Back-end Developers during project week in Masai School.
- Java
- Spring Framework
- Spring Boot
- Spring Data JPA
- Hibernate
- MySQL
- Swagger
- Lombook
- Login Module
- User Module
- Admin Module
- Error Module
- User and Admin authentication & validation with session uuid having.
- Admin Features:
- Administrator Role of the entire application
- Only registered admins with valid session token can add/update/delete driver or customer from main database
- Admin can access the details of different Appointment, Member ,Vaccine Center ,Vaccine Inventory and Vaccine Ragistration.
- User Features:
- A user can register himself or herself on the platform.
- He/She can check the vaccine centres and vaccine availabilty.
- If vaccine is available, can book an appointment slot.
- After booking an appointment, he will get appointment details for the vaccine dose.
- Before running the API server, you should update the database config inside the application.properties file.
- Update the port number, username and password as per your local database config.
server.port=8889
spring.datasource.url=jdbc:mysql://localhost:3306/sb201db;
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username=root
spring.datasource.password=mysqlroot
https://localhost:8889/
http://localhost:8889/swagger-ui/
POST //api/adminLogin
: Admin can login with mobile number and password provided at the time of registationPOST //api/customerLogin
: customer can login with mobile number and password provided at the time of registationDELETE //api/adminLogut
: Admin can logout using keyDELETE //api/customerLogut
: customer can logout using key
GET /customer/AllRegistration
: user can see all the registrationPOST /customer/Id
: User can add using Id class idPUT /customers/Member
: user can update memberDELETE/customers/Member
: user can delete member ........ And Many more Methods We Implemented in our controller
POST /admin/addInventory
: only admin can add the inventory details using unique keyGET /admin/GetAllInventory
:only admin can access inventory details using unique keyDELETE /admin/DeleteInventory
: only admin can delete the inventory details using unique key
........ And Many more Methods We Implemented in our controller
POST localhost:8889/login/adminlogin
- Request Body
{
"mobileNo": "7056319981",
"password": "Clickme@007"
}
- Response
CurrentAdminSession(id=11, adminId=10, uuid=ZaVLaK, localDateTime=2022-10-02T11:13:42.772910500)