Skip to content

Spring Boot REST API for parking management with unit tests, following TDD practices

Notifications You must be signed in to change notification settings

alexbraga/parking-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parking Control

Parking management application for condos

GitHub last commit

Status: In Development

AboutFeaturesTodoHow it worksTech StackHow to contributeAuthor

About

Parking management Spring Boot REST API with PostgreSQL database and Object-Relational Mapping made with Spring Data JPA (Hibernate). The application features unit tests for DTOs, services and controllers. The development followed TDD principles.


Features

  • REST API
  • Relational database (PostgreSQL)
  • Object-Relational Mapping
  • JPA with Hibernate
  • CORS
  • Layered structure divided into Entities, Repositories, Services and Controllers
  • Unit Tests with JUnit and Mockito

Todo

  • Set date and time format to UTC globally
  • Add pagination to GET requests
  • Complete endpoints section on README
  • Add integration tests

How it works

  1. Clone this repository
  2. Set the environment variables
  3. Run the application
  4. API Endpoints

Pre-requisites

Before getting started, you will need to have the following tools installed on your machine:

In addition, you might also want an IDE to work with the code, like IntelliJ IDEA.

Clone this repository

git clone https://github.com/alexbraga/parking-control.git

Set the environment variables

  • Create parking-control/server/src/main/resources/application.properties and set the environment variables:
spring.datasource.url= jdbc:postgresql://localhost:5432/parking-control-db
spring.datasource.username=postgres
spring.datasource.password=
spring.jpa.hibernate.ddl-auto=update

spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true

Running the application

Navigate to the root directory of the project

cd parking-control

Build the project

mvn compile

Run the application

mvn spring-boot:run
  • Alternatively, open the project folder with your preferred IDE and run /src/main/java/com/example/parkingcontrol/ParkingControlApplication.java

  • The server will start at localhost:8080

API Endpoints

Soon


Tech Stack

The following tools were used in the construction of the project:

Language

Framework

Dependencies

  • Spring Web
  • Spring Data JPA
  • SpringBoot Validation
  • PostgreSQL
  • Hamcrest

See the file pom.xml

Utilities


How to contribute

  1. Fork the project
  2. Create a new branch with your changes:
git checkout -b my-amazing-feature
  1. Save your changes and create a commit message (in present tense) telling what you did:
git commit -m "Add my amazing feature"
  1. Submit your changes:
git push origin my-amazing-feature
  1. Create a pull request

Author

Alexandre Braga

LinkedIn  E-Mail

About

Spring Boot REST API for parking management with unit tests, following TDD practices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages