sci-vault is an AI-powered collaborative platform for intelligent management and discovery of laboratory research data. The system leverages modern microservices architecture with gRPC communication, embedding-based recommendations, and vector search capabilities to provide researchers with powerful tools for data exploration and insight extraction.
This monorepo contains a complete microservices-based application for research data management:
svc-recommender via gRPC.| Layer | Technologies |
|---|---|
| Gateway | Go 1.26, Gin, GORM, JWT, Redis, gomail |
| Recommender | Python 3.14, gRPC, pgvector |
| Frontend | SvelteKit (Svelte 5), Vite, Tailwind CSS v4, TypeScript, Axios |
| Database | PostgreSQL (with pgvector extension) |
| Cache | Redis |
| Storage | RustFS (S3-compatible object storage) |
| Communication | gRPC (gateway ↔ recommender), REST/HTTP (frontend ↔ gateway) |
| Code Gen | Buf (Protocol Buffers) |
Before getting started, ensure you have the following tools installed:
Generate the necessary gRPC stubs for both services using Buf. This step is required before running the application:
buf generate
This reads the protobuf definitions from the proto/ directory and generates the required stubs for svc-gateway and svc-recommender. Re-run this command whenever you modify any .proto files.
⚠️ WARNING for Production environments: The provided
docker-compose.yamland default configurations are intended for local development and testing only. When deploying to a production environment, you MUST use your own secure parameters, strong passwords, and proper secrets management. It is highly recommended to create and use a dedicateddocker-compose-production.yamlwith hardened configurations.
A docker-compose.yaml is provided at the root to spin up the entire application (Frontend, Gateway, Recommender) along with all required infrastructure services (PostgreSQL, Redis, RustFS) in one command.
First, prepare the configuration files for each service:
cp svc-gateway/config.docker.example.yaml svc-gateway/config.docker.yaml
cp svc-recommender/config.docker.example.yaml svc-recommender/config.docker.yaml
cp frontend/nginx.example.conf frontend/nginx.conf
Then open svc-gateway/config.docker.yaml and fill in your secrets:
| Field | What to set |
|---|---|
database.password |
Must match POSTGRES_PASSWORD in docker-compose.yaml |
storage.access_key / storage.secret_key |
Must match RUSTFS_ACCESS_KEY / RUSTFS_SECRET_KEY in docker-compose.yaml (default: rustfsadmin / rustfsadmin) |
mailer.username / mailer.password |
Your SMTP credentials |
jwt.secret |
Any strong random string |
RustFS S3 credentials: RustFS uses the same
RUSTFS_ACCESS_KEY/RUSTFS_SECRET_KEYvalues fromdocker-compose.yamldirectly as its S3 API credentials — no need to log into the web console to generate separate keys. For local development the defaults (rustfsadmin/rustfsadmin) work out of the box.
Then run the cluster:
# For Local Development
docker compose up -d --build
# For Production (using production-specific config)
cp docker-compose.yaml docker-compose-production.yaml # If you haven't created one yet
# Edit docker-compose-production.yaml and svc-gateway/config.docker.yaml with production-grade secrets
docker compose -f docker-compose-production.yaml up -d --build
This starts the following containers:
| Container | Service | Ports |
|---|---|---|
sci-vault-postgres |
PostgreSQL 18 | 5432 |
sci-vault-redis |
Redis 8 | 6379 |
sci-vault-rustfs |
RustFS (S3-compatible storage) | 9000 (API), 9001 (Console) |
sci-vault-recommender |
Recommender (gRPC) | 50051 |
sci-vault-gateway |
API Gateway (REST) | 8080 |
sci-vault-frontend |
Frontend Web Client | 80 |
Updating configuration:
config.docker.yamlis mounted into each service container at runtime (not baked into the image). After editing, only a restart is needed — no rebuild:docker compose restart gateway recommender # or for production: docker compose -f docker-compose-production.yaml restart gateway recommender
Frontend nginx config:
frontend/nginx.conf(copied fromnginx.example.conf) is mounted at runtime. You can edit it (e.g. tune proxy settings, add security headers) and restart without rebuilding:docker compose restart frontend
HTTPS / TLS: To enable HTTPS for the frontend:
- Place your certificate and private key at
frontend/ssl/cert.pemandfrontend/ssl/key.pem- Uncomment the
listen 443 sslblock and certificate directives infrontend/nginx.conf- Update the
server_nameinfrontend/nginx.confto your actual domain- Restart the frontend container:
docker compose restart frontendThe
frontend/ssl/directory is mounted read-only into the container at/etc/nginx/ssl/. The directory is git-ignored — never commit your private key.
To stop the infrastructure:
# For Local Development
docker compose down
# For Production
docker compose -f docker-compose-production.yaml down
If you prefer to develop services locally while running only the back-end infrastructure (DB, Redis, S3) in Docker:
# For Local Development
docker compose up -d postgres redis rustfs # add rustfs-volume-helper if first time to initialize the volume
# For Production
docker compose -f docker-compose-production.yaml up -d postgres redis rustfs
Each service has its own setup and runtime requirements. Navigate to the respective directories and follow their specific README:
cd svc-gateway
cp config.example.yaml config.yaml # then fill in your values
go mod tidy
go run .
See svc-gateway/README.md for the full configuration reference and API endpoint documentation.
cd svc-recommender
uv sync
uv run --env-file .env main.py
See svc-recommender/README.md for detailed instructions.
cd frontend
bun install
bun run dev
See frontend/README.md for detailed instructions.
sci-vault/
├── proto/ # Protocol buffer definitions for gRPC
│ └── recommender/ # Recommender service proto
├── svc-gateway/ # Go-based API gateway
├── svc-recommender/ # Python-based recommendation engine
├── frontend/ # SvelteKit web application
├── docker-compose.yaml # Infrastructure services (PostgreSQL, Redis, RustFS)
├── buf.yaml # Buf configuration for code generation
├── buf.gen.yaml # Buf generation settings
└── README.md # This file
docker compose up -dproto/ as needed, then run buf generatesvc-recommender, svc-gateway, and frontend independentlyBrowser
│ REST/HTTP
▼
svc-gateway ──gRPC──► svc-recommender
│
├── PostgreSQL (user data, profiles)
├── Redis (email verification codes, cache)
└── RustFS (avatar & asset storage)
This project is licensed under the LICENSE file in the root directory.