Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mtpontes/task-organizer-api

Clean Architecture demonstrate a complete application with SpringBoot and MongoDB
https://github.com/mtpontes/task-organizer-api

clean-architecture integration-tests mongodb spring-boot springdoc-openapi testcontainers

Last synced: about 2 months ago
JSON representation

Clean Architecture demonstrate a complete application with SpringBoot and MongoDB

Awesome Lists containing this project

README

        

## 🖥️ About the project

This is a complete example of Clean Architecture implemented with Java, SpringBoot and MongoDB, in a simple CRUD application, with high coverage of unit and integration tests, using Junit 5 and TestContainers.

## 🛠️ Tecnologies
- [Spring Boot](https://spring.io/projects/spring-boot)
- [MongoDB](https://www.mongodb.com/)
- [Docker](https://www.docker.com/)
- [TestContainers](https://testcontainers.com/)
- [Java JWT (Auth0)](https://github.com/auth0/java-jwt)
- [Lombok](https://projectlombok.org/)
- [Springdoc OpenAPI](https://springdoc.org/)

## 📖 Documentation

The documentation can be accessed after deploying the application via the URL http://localhost:8080/swagger-ui/index.html#/ .

You can also import my set of requests into Postman. There you have all the endpoints with all the necessary URL parameters and body details to interact with the API.

[Run In Postman](https://app.getpostman.com/run-collection/31232249-ca8cfa3f-f3e7-4ab3-a595-dd7faca07dbe?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D31232249-ca8cfa3f-f3e7-4ab3-a595-dd7faca07dbe%26entityType%3Dcollection%26workspaceId%3Daae15406-ac2a-4087-8c9e-47072e8aa119)

🚀 How to Run

### 📋 Prerequisites

- Docker
- Docker Compose

### 🔎 Details

The application is configured to connect to MongoDB via port 27017.

### 🌍 Environment variables:

docker-compose.yml is configured to use default values.

#### Database
`DB_USERNAME`: Default value **root**

`DB_PASSWORD`: Default value **root**

#### Security
`JWT_SECRET`: secret used to generate a JWT token. Default value **secret**

##### These settings can also be changed in `application.properties`.

### 📦 Installing

Clone the project with the command (or download the zip from Github):

git clone https://github.com/mtpontes/task-organizer-api.git

### 🌐 Deploy

Raise the containers:

docker-compose up --build