A Spring Boot API backend for the jslovers community. This project follows open source and team development best practices.
- Spring Boot 3.x (Java 21+)
- OpenAPI documentation (
api.yml) - Dockerized for easy deployment
- Standardized project structure and contribution guidelines
- Java 21+
- Maven 3.8+
- Docker (optional, for containerization)
This project uses MongoDB as its database. The connection URI is supplied via the environment variable SPRING_DATA_MONGODB_URI. You must set this variable in your environment, regardless of how you run the project (Docker, local, CI, etc.).
- Docker Compose: The variable is set in
docker-compose.yml. - Local/IDE: Set it in your shell before running:
export SPRING_DATA_MONGODB_URI=mongodb://localhost:27017/jslovers mvn spring-boot:run - .env file: You can also use a
.envfile if your tooling supports it.
mvn spring-boot:run
Build the JAR:
mvn clean package -DskipTests
Build and run the container:
docker build -t jslovers-backend .
docker run -p 8080:8080 --env-file .env jslovers-backend
Or use Docker Compose:
docker-compose up --build
Note: If you see an error like
failed to solve: lstat /target: no such file or directory, make sure you have built the JAR file first using the Maven command above. The Docker build expectstarget/*.jarto exist.
The api will be running at: http://localhost:8080/swagger-ui/index.html
See .env.example for required/optional environment variables.
After starting the backend, you can access the interactive Swagger UI here:
The OpenAPI spec (JSON) is available at:
See CONTRIBUTING.md for guidelines.
See CODE_OF_CONDUCT.md.
See SECURITY.md for vulnerability reporting.
MIT License. See LICENSE.
See CHANGELOG.md.