Skip to content

Latest commit

 

History

History
194 lines (159 loc) · 3.92 KB

README.md

File metadata and controls

194 lines (159 loc) · 3.92 KB

Travel Agency Application

A simple Travel Agency Application with Java and Spring Boot.

Installation

It's a Spring Boot 2.5.2 and Java 11 application with a very little functionality. Here are the commands you need to run one by one-

git clone [email protected]:CodeMechanix/Travel-Agency-Application.git
cd Travel-Agency-Application
mvn clean
mvn spring-boot:run

Then you need to put your database credentials in the application-dev.yml file. I used PostgreSQL in this project.

Then you can visit the base url in this url- http://localhost:8090/v1.

Uses

This application can be used both in logged in or logged out state. But for using the full potential, you should logged in.

This project has following features-

  • Full fledged registration and login system
  • Proper validation for each form
  • Status Create, Update (With Public and Private Privacy).
  • Location Master Data
  • JWT
  • Global Exception Handling
  • Added a test case. not covered all test cases here.

ER Diagram

ER Diagram

Note: Added Primary Attribute of An Entity in ERD

API Details

Base End Point: http://localhost:8090/v1

Location API

  1. Location > Create
METHOD       :  Post
URI          :  /api/location
Req. Ex.     : {base}/api/location
Request Body Sample
{
   "name"  : "Dhaka",
   "active": true
}
  1. Location > Get All Active
METHOD     : Get
URI        : /api/location/getAll/active?page=0&pageSize=100
Req. Ex.   : {base}/api/getAll/active?page=0&pageSize=100
  1. Location > Get All Inactive
METHOD     : Get
URI        : /api/location/getAll/inactive?page=0&pageSize=100
Req. Ex.   : {base}/api/location/getAll/inactive?page=0&pageSize=100
  1. Location > Get By ID
METHOD     : GET
URI        : /api/location/get/{id}
Req. Ex.   : {base}/api/location/get/1
  1. Location > Update
METHOD     : PUT
URI        : /api/location
Req. Ex.   : {base}/api/location
  1. Location > Get Dropdown Data
METHOD      : Get
URI         : /api/location/getAll/active/dropdown
Req. Ex.    : {base}/api/location/getAll/active/dropdown
  1. Location > Exists by name
METHOD      : Get
URI         : /api/location/exists/byName?name=name
Req. Ex.    : {base}/api/location/exists/byName?name=name

Status API

  1. Status > Create
METHOD       :  Post
URI          :  /api/status
Req. Ex.     : {base}/api/status
Request Body Sample
{
   "name"  : "Completed",
   "havePrivacy": true,
   "locationId": 1,
   "userId": 1
}
  1. Status > Get All Active
METHOD     : Get
URI        : /api/status/getAll?page=0&pageSize=100
Req. Ex.   : {base}/api/status/getAll?page=0&pageSize=100
  1. Status > Get By ID
METHOD     : GET
URI        : /api/status/get/{id}
Req. Ex.   : {base}/api/status/get/1
  1. Status > Update
METHOD     : PUT
URI        : /api/status
Req. Ex.   : {base}/api/status

User API

  1. User > Exists by UserId
METHOD      : Get
URI         : /api/user/exists/byUserId?userId=1
Req. Ex.    : {base}/api/user/exists/byUserId?userId=1
  1. User > Exists by Email
METHOD      : Get
URI         : /api/user/exists/[email protected]
Req. Ex.    : {base}/api/user/exists/[email protected]

User API

  1. Auth > SignIn
METHOD       :  Post
URI          :  /api/auth/signIn
Req. Ex.     : {base}/api/auth/signIn
Request Body Sample
{
   "name"  : "Completed",
   "havePrivacy": true,
   "locationId": 1,
   "userId": 1
}
  1. Auth > SignUp
METHOD       :  Post
URI          :  /api/auth/singUp
Req. Ex.     : {base}/api/auth/signUp
Request Body Sample
{
   "name"  : "Completed",
   "havePrivacy": true,
   "locationId": 1,
   "userId": 1
}

Developer

Hasan Mahmud
[email protected]
https://sites.google.com/view/codemechanixhasan/home