A simple Travel Agency Application with Java and Spring Boot.
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 git@github.com: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
.
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.
Note: Added Primary Attribute of An Entity in ERD
Base End Point: http://localhost:8090/v1
Location API
- Location > Create
METHOD : Post
URI : /api/location
Req. Ex. : {base}/api/location
Request Body Sample
{
"name" : "Dhaka",
"active": true
}
- 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
- 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
- Location > Get By ID
METHOD : GET
URI : /api/location/get/{id}
Req. Ex. : {base}/api/location/get/1
- Location > Update
METHOD : PUT
URI : /api/location
Req. Ex. : {base}/api/location
- Location > Get Dropdown Data
METHOD : Get
URI : /api/location/getAll/active/dropdown
Req. Ex. : {base}/api/location/getAll/active/dropdown
- Location > Exists by name
METHOD : Get
URI : /api/location/exists/byName?name=name
Req. Ex. : {base}/api/location/exists/byName?name=name
Status API
- Status > Create
METHOD : Post
URI : /api/status
Req. Ex. : {base}/api/status
Request Body Sample
{
"name" : "Completed",
"havePrivacy": true,
"locationId": 1,
"userId": 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
- Status > Get By ID
METHOD : GET
URI : /api/status/get/{id}
Req. Ex. : {base}/api/status/get/1
- Status > Update
METHOD : PUT
URI : /api/status
Req. Ex. : {base}/api/status
User API
- User > Exists by UserId
METHOD : Get
URI : /api/user/exists/byUserId?userId=1
Req. Ex. : {base}/api/user/exists/byUserId?userId=1
- User > Exists by Email
METHOD : Get
URI : /api/user/exists/byEmail?email=hasan@gmail.com
Req. Ex. : {base}/api/user/exists/byEmail?email=hasan@gmail.com
User API
- 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
}
- 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
}
Hasan Mahmud
hasan.mahmud8177@gmail.com
https://sites.google.com/view/codemechanixhasan/home