Getting Started
Follow these steps to set up the Spring Boot backend locally.
Prerequisites
- Java JDK: 17 or higher
- Maven: 3.8+
- Docker: For running PostgreSQL and Redis locally.
Environment Variables
The backend relies on several environment variables. In production, these are managed by Doppler. For local development, create an .env file or provide them to your IDE:
properties
SPRING_AI_OPENAI_API_KEY=sk-your-openai-key
PYTHON_API_URL=http://localhost:7002
JWT_SECRET=your_super_secret_jwt_signing_key_here
SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/sred
SPRING_DATASOURCE_USERNAME=postgres
SPRING_DATASOURCE_PASSWORD=postgres
SPRING_REDIS_HOST=localhost
SPRING_REDIS_PORT=6379Infrastructure Setup
You can spin up the required PostgreSQL and Redis instances using the docker-compose.yml file located at the root of the repository:
bash
docker compose up -d postgres redisRunning the Application
Using Maven wrapper:
bash
./mvnw spring-boot:runTo run with a specific Spring profile (e.g., dev):
bash
./mvnw spring-boot:run -Dspring-boot.run.profiles=devDefault Admin Credentials
Upon the first startup, the system automatically provisions an admin account:
- Username:
admin - Password:
Admin123!@#