Skip to content

firasrg/autocare-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoCare REST API Sample

Code Analysis java-version

Bugs Reliability Rating Maintainability Rating Vulnerabilities

Overview

The AutoCare REST API 🚗🧑‍🔧 offers a comprehensive solution for managing vehicle services . This developer-friendly project is designed to enhance proficiency with modern Spring applications, providing hands-on experience with real-world scenarios and best practices for backend development.

Goals :

  • Enhance problem-solving skills by tackling real-world challenges.
  • Gain hands-on experience in modern Web Applications.
  • Improve proficiency in Java and related frameworks.
  • Learn how to effectively use GitHub.
  • Develop skills in documentation and testing.

Features

  • Expose Cars data: Retrieve detailed information about cars, including related entities like clients, maintainers, and tools.
  • Custom JSON builder: Generate JSON responses with a customizable JSON builder component.

Technology Stack

Getting Started

  1. Clone the repository
git clone <GITHUB_REPOSITORY_URL>
cd autocare-rest-api
  1. Build
./mvnw clean install
  1. Run
./mvnw spring-boot:run "-Dspring-boot.run.profiles=demo"

Note: Currently, the app doesn't have endpoints for CRUD operations yet (except one GET/api/cars). The demo profile refers to ../configs/LoadDatabase, which helps to fill database with some data at runtime.

  1. Check Endpoint:

From Web-browser (or Postman) check the following URL http://localhost:8080/api/cars with GET HTTP method :

docs/endpoint-test.png

  1. Check Database:

We use H2 Database to demonstrate the app while in DEV mode. SpringBoot autoconfigures H2 database :

Check the app's log, make sure to have something like this :

INFO ... Added connection conn0: url=jdbc:h2:mem:a917d8a4-bb16-46a1-84a4-f59d60f01ca8 user=SA
INFO ... H2 console available at '/h2-console'. Database available at 'jdbc:h2:mem:a917d8a4-bb16-46a1-84a4-f59d60f01ca8'

Next, from web-browser, try the following URL : http://localhost:8080/h2-console. This will take you to H2 console webpage:

docs/h2-login.png

Copy, paste your database URL and username from your app's log and press on Connect button :

docs/h2-db-view.png

There you go 🎉!

Contributing

If you want to dive in this project and help us to improve it, please read and follow our contributing guidelines.

Community

You can join us on Together Java Discord server: brainstorm ideas, ask questions, and collaborate with others. Be respectful and follow the server guidelines. We have a dedicated channel for this project.

About

AutoCare is a well-organized REST API sample app

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published