# openalice-bluegenie

> BlueGenie — persona-first AI companion (The Sanctum): Money / Quests / Self panels, Ledger of Unlocks, Hybrid VRM+2D avatar.

## At a glance
| field | value |
|---|---|
| kind | `service` |
| priority | `—` |
| default branch | `mvp` |
| last activity | 2026-05-21T03:01:53+00:00 |
| features catalogued | **13** |
| runtime deps declared | **6** |

## Manifest
`.atlas-deps.yml` — parsed cleanly: **yes**

### Runtime deps
- **`openalice-auth`** · `shared-jwt` · via `SHARED_JWT_SECRET` — Verify oa_session JWTs on /v1/me/* routes via HS256 SHARED_JWT_SECRET
- **`openalice-axum-common`** · `other` · via `cargo` — Shared HTTP plumbing: JWT extractor, CORS, /health, /metrics, rate-limit, internal-client
- **`openalice-tenants`** · `http` · via `INTERNAL_SECRET` — GDPR fan-out — /internal/me/{tenant_id}/export.json called by tenants during /me/export
- **`openalice-anim`** · `ws` · via `ANIM_URL` · _optional_ — Live VRM pose-frame stream (v2 only; v1 falls back to Mixamo idle loops)
- **`openalice-persona`** · `http` · via `PERSONA_INTERNAL_URL` · _optional_ — VRM upload/list/delete proxy — SPA talks only to BlueGenie, which forwards to persona-server
- **`openalice-rt`** · `http` · via `RT_URL` · _optional_ — Push real-time events (achievement unlocks, mood-mode broadcasts) for SPA SSE/WS subscriptions

### Consumed env
- `DATABASE_URL`
- `SHARED_JWT_SECRET`
- `INTERNAL_SECRET`
- `BLUEGENIE_ASSETS_DIR`
- `BLUEGENIE_PORT`
- `BLUEGENIE_BIND`
- `PERSONA_INTERNAL_URL`
- `RT_URL`
- `ANIM_URL`
- `TENANT_RATE_LIMIT_PER_MINUTE`
- `CORS_ORIGINS`
- `RUST_LOG`
- `POSTGRES_PASSWORD`

### Owns tables
- `personas`
- `persona_assets`
- `persona_relationships`
- `persona_dialog_lines`
- `subscriptions`
- `bills`
- `income_sources`
- `category_targets`
- `transactions`
- `quests`
- `milestones`
- `achievements`
- `unlock_links`
- `mood_log`
- `daily_whispers`
- `pacts`
- `future_self_letters`
- `agent_messages`

### Exposes
- `docker_image` — openalice-bluegenie
- `http_endpoint` — https://bluegenie.blal.pro/v1/me/*
- `http_endpoint` — https://bluegenie.blal.pro/internal/me/{tenant_id}/export.json

## Env drift

**Code reads, manifest omits (1):**
- `VITE_API_URL`

**Manifest declares, code unused (1):**
- `RUST_LOG`

## Live reachability
- last probe: **down** · `https://bluegenie.blal.pro` · HTTP 404 · 20ms
- uptime 24h: **0.0%**

## Features (13)

### bluegenie/agent
- **`bluegenie.agent.chat-relay`** · _beta_ · since 0.1.0 — In-app ChatInputBar ↔ agent relay — user posts go in, agent replies come out, SPA polls /messages with a since-cursor.  
  *src/handlers/agent_chat.rs:3*

### bluegenie/assets
- **`bluegenie.assets.unlock-cards`** · _alpha_ · since 0.1.0 — 2D unlock card pipeline — multipart PNG upload from Nano Banana 2, image-crate optimize, list/fetch/soft-delete under BLUEGENIE_ASSETS_DIR.  
  *src/handlers/assets.rs:3*

### bluegenie/auth
- **`bluegenie.auth.whoami`** · _stable_ · since 0.1.0 — Clear the shared oa_session + oa_refresh cookies so the user signs out of every *.blal.pro product in one click.  
  *src/handlers/auth.rs:3*

### bluegenie/core
- **`bluegenie.bin.server`** · _alpha_ · since 0.1.0 — Axum HTTP server entry — wires env, Postgres pool, JWT verifier, CORS, and per-tenant rate limit; listens on BLUEGENIE_PORT.  
  *src/main.rs:3*
- **`bluegenie.crate.service`** · _alpha_ · since 0.1.0 — BlueGenie backend crate — Money/Quests/Self panels, Ledger of Unlocks, persona registry, VRM proxy.  
  *src/lib.rs:3*

### bluegenie/internal
- **`bluegenie.internal.gdpr-export`** · _alpha_ · since 0.1.0 — GDPR fan-out slice — returns this tenant's BlueGenie data (subs, quests, achievements, letters, mood) as JSON for openalice-tenants to bundle into /me/export.  
  *src/handlers/internal.rs:3*

### bluegenie/ledger
- **`bluegenie.ledger.achievements`** · _alpha_ · since 0.1.0 — Server-side achievement recompute — flips achieved_at, walks the unlock graph, fires persona dialog events on new unlocks.  
  *src/handlers/ledger.rs:3*

### bluegenie/money
- **`bluegenie.money.runway`** · _beta_ · since 0.1.0 — Category targets vs current-month actuals readout for the soft-budget UI band.  
  *src/handlers/money.rs:3*

### bluegenie/ops
- **`bluegenie.ops.health`** · _stable_ · since 0.1.0 — Traefik liveness probe returning plain-text "ok".  
  *src/handlers/health.rs:3*

### bluegenie/persona
- **`bluegenie.persona.registry`** · _alpha_ · since 0.1.0 — Persona registry — list/detail in v1 (Blue Genie only) with relationship state; multi-character writes deferred to v2.  
  *src/handlers/personas.rs:3*
- **`bluegenie.persona.vrm-proxy`** · _alpha_ · since 0.1.0 — Thin proxy around persona-server VRM upload/list/bind so the SPA only talks to bluegenie.blal.pro for the Blue Genie avatar slot.  
  *src/handlers/vrm.rs:3*

### bluegenie/quests
- **`bluegenie.quests.quests`** · _beta_ · since 0.1.0 — Milestone add (auto-ordered) and idempotent completion endpoint for a quest's progress timeline.  
  *src/handlers/quests.rs:3*

### bluegenie/self
- **`bluegenie.self.mood`** · _beta_ · since 0.1.0 — Future Self Letters — markdown body + Q&A JSONB, listed/created via this surface (TTS rendering deferred to v2).  
  *src/handlers/self_panel.rs:3*

---

*Generated by [openalice-atlas](https://atlas.blal.pro) — single source of truth for the openalicelabs ecosystem.*
