Make It Healthy is a REST API service for tracking daily calorie intake and user diet.
| Component | Version | Purpose |
|---|---|---|
| Spring Boot | 3.4.4 | Backend framework |
| Hibernate ORM (Spring Data JPA) | 6.6.11 | ORM framework for managing Java persistence with |
| Maven (wrapper) | 3.9.9 | Project build tool |
| PostgreSQL | 15+ | Database management system |
| Liquibase | 4.31.1 | Database migrations |
| MapStruct | 1.6.3 | Object mapping (DTO/Entity) |
| JUnit 5 | 5.11.4 | Test framework for unit tests |
| Mockito | 5.14.2 | Test framework for mocking in unit tests |
| JaCoCo | 0.8.13 | Test coverage reports |
| Springdoc OpenAPI | 2.8.6 | API documentation (Swagger UI for Spring) |
Source code structure (dev branch):
src/
├── main/
│ ├── java/
│ │ └── com/github/tennyros/makeithealthy/
│ │ ├── config/ # Configurations
│ │ ├── dto/ # Data Transfer Objects
│ │ │ ├── request/ # Request DTOs
│ │ │ └── response/ # Response DTOs
│ │ │ └── reporting/ # Report DTOs
│ │ ├── entity/ # Data models
│ │ ├── exception/ # Own exceptions
│ │ ├── http/ # REST API
│ │ │ ├── advice/ # Exception Handlers
│ │ │ └── rest/ # REST Controllers
│ │ ├── mapper/ # MapStruct mappers
│ │ ├── repository/ # Data Access Objects
│ │ └── service/ # Business logic
│ └── resources/
│ ├── db/changelog/ # Liquibase migrations
│ ├── application.yml # Main configuration
│ ├── application-dev.yml # Development configuration
│ └── application-prod.yml # Production configuration
├── test/
│ ├── java/
│ │ └── com/github/tennyros/makeithealthy/
│ │ └── unit/ # Unit tests
│ │ ├── controller/ # Controller layer unit tests
│ │ └── service/ # Service layer unit tests
│ └── resources/
│ └── application-test.yml # Test configuration
├── postman/ # json Postman API test collection
pom.xml
Build artifacts:
target/
├── generated-sources/
│ ├── annotations/
│ │ └── com.github.tennyros.makeithealthy.mapper/ # Auto-generated MapStruct classes
├── reports-report/ # JaCoCo coverage reports
- Java 17+
- PostgreSQL 15+ (local, remote or docker container instance)
- Maven 3.9.9 (wrapper included)
1. Clone the repository:
git clone https://github.com/tennyros/make-it-healthy.git
cd make-it-healthy2. Copy the .env file and change the credentials if necessary:
cp .env.example .env3. Run PostgreSQL via Docker (optional, if you don’t run own DB):
# Copy the example config (if not customized yet)
cp docker-compose.example.yml docker-compose.yml
# Start PostgreSQL in Docker
docker-compose up -d
If using docker-compose, PostgreSQL will be available at
localhost:5433 (default credentials: postgres/root).
If you already have PostgreSQL, ensure application.yml/.env matches your DB settings.4. Application build:
./mvnw clean install -Dspring.profiles.active=dev5. Run the application:
# Run via terminal:
./mvnw spring-boot:run -Dspring-boot.run.profiles=dev
# Run via Intellij Idea (Shift + F10):
Type dev in Active profiles Edit Configurations of main class to setup profile
Application port is 8008After this, the API will be available at:
http://localhost:8008/swagger-ui.htmlTest types:
unit/ - Unit tests
Running tests:
# All tests
./mvnw test -Dspring.profiles.active=test
# Run a specific test
./mvnw test -Dspring.profiles.active=test -Dtest=YourTestNameYou can test and explore the API using the included Postman collection.
- make-it-healthy-app.postman_collection.json – API requests for user, meal, food intake, and reporting operations.
- Install Postman – Download here.
- Open Postman →
File > Import→ Choose themake-it-healthy-app.postman_collection.jsonfile. - Click on the variable
{{url}}in any request and set it to your running API base URL (e.g.,http://localhost:8008). - Click Send to test endpoints.
ℹ️ The collection already includes the
{{url}}variable pointing tohttp://localhost:8008. You can edit it if needed.
The project is set up with CI to automatically build
and test on pull requests using GitHub Actions.