Niby Application - A multi-module application built with Quarkus that combines backend services, RAG (Retrieval-Augmented Generation) capabilities, and a user interface. The application provides AI-powered document search and retrieval using vector embeddings and semantic search.
This project uses Quarkus, the Supersonic Subatomic Java Framework.
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/.
- niby-be-core - Backend core module (port 8080)
- niby-rag - RAG module with pgvector (port 8082)
- niby-ui - User interface module (port 8081)
- niby-parent - Parent POM with shared dependencies
- Docker and Docker Compose installed
- Create
.envfile with your credentials:
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY./mvnw clean package -DskipTestsdocker-compose -f docker-compose.yml -f docker-compose.dev.yml upOr in detached mode:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -dRebuild all containers:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --buildRebuild a specific service:
# First rebuild the Maven package
cd niby-rag && ../mvnw clean package -DskipTests && cd ..
# Then rebuild and restart the container
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build -d niby-ragdocker-compose downWhen running with Docker Compose:
- niby-ui: http://localhost:8081
- niby-be-core:
- Swagger UI: http://localhost:8080/q/swagger-ui
- OpenAPI Spec: http://localhost:8080/q/openapi
- niby-rag:
- Swagger UI: http://localhost:8082/q/swagger-ui
- OpenAPI Spec: http://localhost:8082/q/openapi
- pgvector: localhost:5432 (postgres/postgres)
When running locally in dev mode (./mvnw quarkus:dev):
- niby-be-core:
- Dev UI: http://localhost:8080/q/dev/
- Swagger UI: http://localhost:8080/q/swagger-ui
- niby-rag:
- Dev UI: http://localhost:8082/q/dev/
- Swagger UI: http://localhost:8082/q/swagger-ui
For production, use Docker secrets:
# Create secret files
echo -n "your-anthropic-api-key" > secrets/anthropic_api_key.txt
echo -n "your-postgres-password" > secrets/db_password.txt
# Run with production config
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -dYou can run your application in dev mode that enables live coding using:
./mvnw quarkus:devNOTE: Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.
The application can be packaged using:
./mvnw packageIt produces the quarkus-run.jar file in the target/quarkus-app/ directory.
Be aware that it’s not an über-jar as the dependencies are copied into the target/quarkus-app/lib/ directory.
The application is now runnable using java -jar target/quarkus-app/quarkus-run.jar.
If you want to build an über-jar, execute the following command:
./mvnw package -Dquarkus.package.jar.type=uber-jarThe application, packaged as an über-jar, is now runnable using java -jar target/*-runner.jar.
You can create a native executable using:
./mvnw package -DnativeOr, if you don't have GraalVM installed, you can run the native executable build in a container using:
./mvnw package -Dnative -Dquarkus.native.container-build=trueYou can then execute your native executable with: ./target/niby-1.0-SNAPSHOT-runner
If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.
Easily start your REST Web Services