5 Commits

4 changed files with 66 additions and 2 deletions
+61
View File
@@ -0,0 +1,61 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
Vaessl is an AI-powered integration bridge that accepts user text/image inputs, processes them through an LLM pipeline (via LiteLLM), and exports structured data to management systems (Homebox, WikiJS). The backend uses a provider pattern for extensibility, and the frontend is in early scaffolding stage.
## Commands
### Backend (Spring Boot + Gradle, inside `backend/`)
```bash
./gradlew build # compile and package
./gradlew test # run all tests
./gradlew test --tests com.vaessl.app.connection.ConnectionServiceTest # single test class
```
### Frontend (React + Vite, inside `frontend/`)
```bash
npm run dev # start dev server
npm run build # TypeScript check + Vite build
npm run lint # ESLint
npm run test # Vitest watch mode
npm run test:ui # Vitest visual dashboard
```
## Environment
Copy `.env.local` (not committed) into `backend/` with:
- `DB_URL`, `DB_TEST_URL`, `DB_USERNAME`, `DB_PASSWORD` — PostgreSQL (test container on port 5434)
- `OPENAI_KEY`, `OPENAI_BASE_URL` — LiteLLM gateway (provider-agnostic, configured for gpt-4o-mini)
## Architecture
### Backend (`backend/src/main/java/com/vaessl/app/`)
Three main modules:
**`connection/`** — core business logic
- `ConnectionProvider` interface: each integrated app (Homebox, WikiJS) implements `login()` and declares its `ServiceType`
- `ConnectionService`: auto-discovers providers via Spring injection, dispatches login by `ServiceType`
- Entity (`Connection`) uses **Single Table Inheritance** — one `connections` table with app-specific nullable columns
- DTOs use `Map<String, Object>` for flexible cross-app credential/result exchange
**`dto/`** — `ConnectionRequest` / `ConnectionResponse`
**`exception/`** — `GlobalExceptionHandler` via `@ControllerAdvice`
### Frontend (`frontend/src/`)
React 19 + TypeScript + Tailwind CSS, Vite 8 build. Currently basic scaffolding; no significant business logic yet.
### Data & AI
- PostgreSQL + pgvector (semantic search via embeddings)
- LiteLLM as a unified AI proxy; Spring AI OpenAI starter wired to it
- Processing pipeline (Phase 2): stage in DB → LLM inference → refine via UI → export to target app
### Testing Strategy
Integration tests spin up a **mirrored PostgreSQL container** on port 5434 (same schema as production). WireMock mocks external HTTP APIs (Homebox, WikiJS). Do not mock the database in integration tests — the mirrored container strategy exists specifically to catch schema/migration divergence.
+3
View File
@@ -28,6 +28,9 @@ Vaessl acts as translator between user inputs via text or image and digital mana
| **AI Gateway** | LiteLLM (Unified API proxy) | | **AI Gateway** | LiteLLM (Unified API proxy) |
| **DevOps** | Docker, Portainer, Hoppscotch (API testing), Gitea Actions, Jenkins | | **DevOps** | Docker, Portainer, Hoppscotch (API testing), Gitea Actions, Jenkins |
&nbsp;
![Vaessl stack illustration](assets/images/vaessl-stack-illustration.png)
--- ---
## Infrastructure & Methodology ## Infrastructure & Methodology
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

@@ -2,7 +2,7 @@
Before developing on code-server I configure a Dockerfile to install all packages needed for Spring Boot, Java and Vite. Before developing on code-server I configure a Dockerfile to install all packages needed for Spring Boot, Java and Vite.
I install openjdk 25, nodejs 24.x and yarn and set the environment variables for Java. I install openjdk 25, nodejs 24.x and yarn and set the environment variables for Java (and the /config/.local/bin folder that gets used for tools like Claude Code).
Since the linuxserver code-server image doesn't come with root access for its default user abc out of the box every privileged action will be baked in here: Since the linuxserver code-server image doesn't come with root access for its default user abc out of the box every privileged action will be baked in here:
@@ -20,7 +20,7 @@ RUN apt update && apt install -y \
# Set Java Environment # Set Java Environment
ENV JAVA_HOME=/usr/lib/jvm/java-25-openjdk-amd64 ENV JAVA_HOME=/usr/lib/jvm/java-25-openjdk-amd64
ENV PATH="$JAVA_HOME/bin:${PATH}" ENV PATH="/config/.local/bin:$JAVA_HOME/bin:${PATH}"
``` ```