Demonstration of Requirements understanding, proposing a solution and implementation by using the latest tools and techniques.
- Distribution
- Problem Statement
- Proposed Solution
- Entities
- Assumptions
- Deliverable Content
- Deliverable Content
- Development Cycle
- How to Setup
- Pre-reqs
- Tools Included
- External Tools
- Deployments
- Contribute
- data-details
- Swagger API Docs - Deployed on EC2 Instance - Bonus Requirement
- A docker repository is created, the latest image can be downloaded
- Sonar Project - Bonus Requirement
- Docker Compose - Bonus Requirement
- CI/ CD
- Postman Collection Link
- This app is built as assignment for FinologyGroup.
- 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 an EC2 instance to run dockerized build
- Version 1.0.0
- For the implementation of REST API, I would prefer to use a Spring Boot application for the implementation of required functionality.
- Postgres Database will be used for Persistence.
- For testing, I would prefer to use JUnit and Mockito
- There will be a Dockrized Build distribution
- Some opensource database can be used for mocking purposes.
- As we are mocking an inventory system, there should be a search mechanism available.
- There shouldn't be a possibility to modify the database via JPA
- For demonstration purpose, an API frontend should be provided...i.e Swagger
- I am assuming that there will be only one table in the database which will contain the data (for the sake of simplicity)
- The system is for abstraction and demo purpose, so;
- No auth system is integrated
- No integration testing is being done in pipelines
- The code quality checks are place and coverage report is synced in SonarQube
- The is no locking system is implemented on database.
- GET
{baseURL}/api/cars
- Retrives total cars available as a single list (Raw implementation) - GET
{baseURL}/api/cars/page?number=1&size=10
- Paginated variation of the listing API - GET
{baseURL}/api/cars/search?id=10
- this will provide a flexibility to search in the database based on different parameters i.e data-details - GET
{baseURL}/api/health
- Checks the health of the system,
- 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 run the project locally using docker;
docker compose up --detach --wait
To tear down:
docker compose down --remove-orphans
To setup the project locally you need to clone this repo, from main
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 fino-cars-service .
- Run
docker run -d -p 80:8080 fino-cars-service
- You may access the running docker app on
http://localhost/swagger-ui.html
- Docker Image Repository
- Run
docker run -d --name fino-cars-service -p 80:8080 naeemark/fino-cars-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
- PostgreSQL
- Junit
- Mockito
- Swagger
- IntelliJ IDEA
- Jacoco
- Sonar
- Swagger
- JPA
- Hibernate
- Github Actions
- EC2 Instance for deployment
- No auth system is included in this solution
- 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, it is deployed manually in an ec2 instance.
- Forks are always appreciated
Available Search Params:
type: [Micro, Car, Sports, 4 WD, Electrical, Vintage, Coupe, Antique, Hybrid, Crossover, Convertible, Diesel, Classic, Minivan, Wagon, Supercar, MPV, Mini, 2 WD]
year: [2009, 2010, 2011, 2012]
make: [Chrysler, Toyota, BMW Motorrad, GMC, Mercedes-AMG, Maybach, Lincoln, Honda, Grand Cherokee, Ford, Scion, Maserati, Dodge, Chevrolet, Infiniti, MINI, Bentley, Porsche, Audi, Mercedes, Rolls-Royce, Jaguar, Lexus, Lotus, Kia, Lamborghini, Mercedes-Benz, Land Rover, Jeep, Volvo, Buick, Cadillac, Acura, Nissan, Saab, Hyundai, Suzuki, Mitsubishi, Aston Martin, Subaru, Mazda, BMW, Volkswagen, Mercury]