Todo API Spring Boot

This project implements a Todo API using Spring Boot with PostgreSQL, Spring Data JPA for ORM, Liquibase for migrations, and JWT for authentication.

Table of Contents

Development

Configuration

Copy the .env.example file to a new file named .env, and then set the environment configuration in the .env file.

cp .env.example .env

Setup

  1. Using Docker Compose to initialize the project:
docker compose up -d
  1. Start a terminal session in the app container
docker compose exec app sh
  1. Install dependencies for development
./gradlew clean build -x test
  1. Run migrations
./gradlew liquibaseUpdate
  1. Start the server for development
./gradlew bootRun

Testing

Run the test suite using:

./gradlew test

Linting

Check code quality with:

./gradlew check

URL

Deployment

Build Production Image

docker build -t todo-api-springboot:1.0.0 .

Run Docker Container

docker run --name todo-api-springboot -p 8080:8080 --env-file .env -d todo-api-springboot:1.0.0

License

Distributed under the MIT License. See LICENSE for more information.