Skip to content

simaocaixas/3api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot Tree RESTful API - A Sample App

Overview

This is a fully functional sample project written in Java that samples a simple Spring Boot backend adhering to REST principles. The application provides a Tree CRUD service, allowing authenticated users to create, read, update, and delete tree data. User authentication is handled through JWT tokens using HTTPS-only cookies for added security.

The project utilizes PostgreSQL for data storage, and pgAdmin4 for database management both are containerized with Docker for easy deployment and scalability. Swagger is integrated to provide interactive API documentation, while Mockito is used for unit testing TO-DO.

Verify API documentation in http://localhost:8080/swagger-ui/index.html when running.

Setup and Running localy

Ensure that you have the following installed:

Step 1: Clone the Repository

First, clone the repository to your local machine:

git clone git@github.com:simaocaixas/3api.git
cd 3api

Step 2: Build and run Docker conteiners

The project includes a docker-compose.yml file that automates the setup of PostgreSQL, pgAdmin4, in a Docker container. Run docker and run the following command:

docker-compose up

PostgreSQL running on port 5432 Pgadmin running on port 5050

Pgadmin credentials Email: admin@example.com Password: adminpass

Step 3: Start and build the Maven project

In the project foldier, run the following command:

mvn spring-boot:run

This will start the Spring Boot app, running it by default in port 8080.

About

Tree CRUD using Spring Boot, PostgreSQL, JWT (HTTPS-only cookies), pgAdmin4, and Docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages