Skip to content

Discover a new way to track your happiness and boost your productivity. yappi aims to improve productivity and well-being in agile software development teams by self-reported happiness tracking with advanced analytical tools.

License

Notifications You must be signed in to change notification settings

24FSIIT16/dear-dev-backend

Repository files navigation

yappi backend

This repository contains the API controllers and backend logic of yappi as the connection to the database.

🚀 Getting Started

First, clone the repository to your local machine:
git clone https://github.com/24FSIIT16/dear-dev-backend.git
Create an .env file in the root directory of the project and add the following environment variables:
# Password for the yappi_db database
DATABASE_PASSWORD=your_password

# JWT secret key, used for verifying the token. 
# If you plan to use this together with the frontend, make sure to use the same secret key in the frontend.
JWT_SECRET=your_secret_key
Changes needed in the application.properties file. Replace spring datasource with:
spring.datasource.url=jdbc:postgresql://localhost:5432/yappi_db
Build to project:
./gradlew build
Run the project:
./gradlew bootRun

The project will be running on http://localhost:8080.

Database setup

Run in your favorite SQL client the following SQL script to create the needed database tables:

database/01_init.sql

Start the project with docker-compose:
docker compose up -d 

This will build the project and start it in a docker container, that includes the database as well. The project will be running on http://localhost:8080.

If you want to change for example the database name, you can do so in the docker-compose.yml file.

📚 Swagger API documentation

The API documentation is available on the following URL: http://localhost:8080/swagger-ui/index.html

🛟 Usefull Docker Commands

List all running container:

docker ps

Clean and remove docker images / container

sudo docker stop $(sudo docker ps -q)  true
sudo docker rm $(sudo docker ps -a -q)  true
sudo docker image rm $(sudo docker images -q) || true

View logs of the running container:

docker logs -f <container_id>

Delete docker volumes:

docker volumne prune -f

📦 Built With

  • Java 21
  • PostgreSQL 13.0
  • Spring Boot 3.3.0
  • Sprint Boot Starter Data JPA
  • Spring Boot Starter Security
  • Spring Boot Starter Web
  • Spring Boot Starter Validation
  • Spring Boot Starter Test

About

Discover a new way to track your happiness and boost your productivity. yappi aims to improve productivity and well-being in agile software development teams by self-reported happiness tracking with advanced analytical tools.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published