Demonstration of Requirements understanding, proposing a solution and implementation by using the latest tools and techniques.
- Swagger API Docs - Deployed on Kubesail - Bonus Requirement
- A Postman Collection is available for all the API's (live).
- API Integrations FrontEnd Demo - Heroku Deployment - Bonus Requirement
- ReactFrontAppRepository (WIP) - Bonus Requirement
- A docker repository is created, latest image can be downloaded
- Sonar Project - Bonus Requirement
- Kubesail - Deployment File - Bonus Requirement
- This app is built as assignment for AirAsia - KL.
- Adds different libs to enhance the application quality and performance.
- Using SWAGGER.IO for documentation and as a working REST-API client
- CI/CD Demonstration using Github Actions
- Docker containers are used for Build Deployment
- The live environment is established on KubeSail as per the instructions
- Version 1.0.0
- By keep the provided instructions in mind, I would prefer to use a Spring Boot application for the implementation of required functionality.
- Postgres Database will be used for Dev, Test and Prod environments.
- For unit testing, I would prefer to use JUnit
- It is clear by the requirements that there will be
One
entity- Users
- As we have already finalized the attributes of the Entity, so, IMO, RDBM is fine for the situation
- The
user_name
andemail
both should be unique attributes
- The
- POST
{baseURL}/api/signup
- returns theaccessToken
asn User attribute - POST
{baseURL}/api/login
- returns theaccessToken
asn User attribute
- GET
{baseURL}/api/health
- Checks the health of the system, - GET
{baseURL}/api/user
- Gets the User object based on provided JWT in header
- Distributes the whole development into Small tasks
- Each Issue shows a feature
- Each commit shows a small progress
- Pull Requests are done for major tasks
To set-up the project locally you need to clone this repo, from master
or develop
branch or some latest TAG
- Please sync and resolve the
maven
dependencies - Run
mvn clean install
- To run tests
mvn clean test
docker build -t jwt-auth-service .
- Run
docker run -d -p 80:8080 jwt-auth-service
- You may access the running docker app on
http://localhost/swagger-ui.html
- Docker Image Repository
- Run
docker run -d --name jwt-auth-service -p 80:8080 naeemark/aa-jwt-auth-service
- You may access the running docker app on
http://localhost/swagger-ui.html
- Run
docker kill {container-id}
- JDK 1.8
- Spring Boot
- Docker
- Postgres
- JWT
- Junit
- IntelliJ IDEA
- Jacoco
- Sonar
- Swagger
- JPA
- Hibernate
- Github Actions
- KubeSail
- JWT Tokens are used as authorization
-
When a
pull request
is merged inmaster
,Github Action
starts and following steps are done by automated CI/CD:- Creates Environment and Runs all tests
- Complete a SonarQube analysis and pushes the results to Live Project
- Makes a deployment to Github packages (Mock)
- Creates the Docker Image and pushes to Docker Repository
-
As a next step, login to KubeSail instance and deploy accordingly
- Forks are always appreciated