| Technology | Version | Purpose |
|---|---|---|
| Spring Boot | 3.3.4 | Application framework |
| Kotlin | 2.1.21 | Programming language |
| Java | 21 | Runtime platform |
| Gradle | 8.13 | Build tool |
| JOOQ | 3.20.1 | database-mapping class Generator |
- Java 21 or higher
- Gradle 8.31 (or use the wrapper inside)
- Docker for containerization
- Postman for testing
- Clone the repository
git clone https://github.com/ChristianPacifici/graph-manager-svc.git
cd graph-manager-svc- build with gradle wrapper/docker
./gradlew buildthis will also generate the JOOQ classes starting from the SQL file
or alternatively
./build-docker.shthis will create the docker-container for the service, or you can do this via command line
docker build -t graph-manager-svc .- Run the service if you want to immediately start testing the service, and you have docker installed, you can directly lunch
./run-docker.shor using the following on CLI
docker-compose up- Access the application
- Application: http://localhost:8080
- Health Check: http://localhost:8080/actuator/health
- Metrics: http://localhost:8080/actuator/prometheus
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/graph-manager/edges | Create and Edge |
| GET | /v1/graph-manager/edges/tree/{Id} | Get a tree of the edges, passing the desired root id using BFS |
| DELETE | /v1/graph-manager/edges/{fromId}/{toId} | Delete edge by id from and id to |
A postman collection in available in /src/test/postman
curl http://localhost:8080/actuator/health
curl http://localhost:8080/actuator/metrics
curl http://localhost:8080/actuator/prometheus- Import as Gradle project
- Install Kotlin plugin
- Set Project SDK to Java 21
- Enable annotation processing
graph-manager-svc/
├── gradle/
├── src/
│ ├── main/kotlin/com/prewave/nodemager/configuration
│ ├── main/kotlin/com/prewave/nodemager/controller
│ ├── main/kotlin/com/prewave/nodemager/dto
│ ├── main/kotlin/com/prewave/nodemager/exception
│ ├── main/kotlin/com/prewave/nodemager/interceptor
│ ├── main/kotlin/com/prewave/nodemager/services
│ ├── main/resources/db/changelog
│ ├── main/resources/db/migration
│ ├── main/resources/db/application.yaml
│ ├── test/kotlin/com/prewave/nodemager/controller
│ ├── main/kotlin/postman
├── build.gradle.kts
├── build-docker.sh
├── docker-compose.yml
├── Dockerfile
├── gradle.properties
├── gradlew
├── gradlew
├── gradlew.bat
├── README.md
├── run-docker.sh
├── settings.gradle.kts