m3/org/openalice-bluegenie

openalice-bluegenie

Persona-first AI companion service for OpenAliceLabs. BlueGenie is an operational dashboard wrapped in a cozy mystical room (**The Sanctum**), where the **Blue Genie** — an anime djinn companion — tracks money, project quests, and self-state, and motivates the user with VN-style speech bubbles, achievement cards, and a relationship that deepens as real-world goals are met.

Features
13
Status
·unknown
Last activity
1mo ago
Branch
mvp

Architecture rating

D1mo ago
data layerB-

18 owned tables with dedicated RLS migration and a GDPR /export.json endpoint signal real tenant isolation + data-subject rights; only 3 migrations total and FK/constraint depth unverified, so solid-but-young schema.

docsB-

Valid manifest (100), 13 @feature annotations, descriptive README, AGENTS.md and docs/visual-identity present, but 387 missing docstrings and roadmap at 30/100 leave in-code architecture notes thin.

consistencyC

Manifest/features/code-health all 100 and full per-env compose layout show strong substrate adoption, undercut by env drift (VITE_API_URL undeclared, RUST_LOG unused), 1 cycle, 29 god modules and 8 duplicate signatures.

securityC

RLS migration (0002_rls.sql) + tenant-scoped /v1/me/* and /internal/me/{tenant_id}/export.json show isolation intent, but no visible rate-limiting, security headers, or SSRF guards, and 20 bare/broad excepts blur error boundaries — authn/authz mechanism unverified, graded conservatively.

observabilityD

Health probe green (200, 25ms, 100% 24h uptime) but RUST_LOG declared-yet-unused suggests structured logging not wired, and no metrics or tracing signals are present.

reliabilityD

20 bare/broad excepts, 81 TODO/FIXME, a SubscriptionsList↔AddSubscriptionForm circular dependency and max complexity 25 indicate fragile error handling; no evidence of timeouts, retries, idempotency, or SIGTERM graceful shutdown.

testingF

Inspector reports no test count and the repo tree exposes only migrations (no tests/ or *_test files) — critical paths like RLS isolation and GDPR export appear entirely unverified.

source · auto-grader-2026-06-16

Ecosystem manifest

.atlas-deps.yml

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

Runtime deps
  • openalice-authshared-jwt
    via SHARED_JWT_SECRET
    Verify oa_session JWTs on /v1/me/* routes via HS256 SHARED_JWT_SECRET
  • via cargo
    Shared HTTP plumbing: JWT extractor, CORS, /health, /metrics, rate-limit, internal-client
  • via INTERNAL_SECRET
    GDPR fan-out — /internal/me/{tenant_id}/export.json called by tenants during /me/export
  • openalice-animwsoptional
    via ANIM_URL
    Live VRM pose-frame stream (v2 only; v1 falls back to Mixamo idle loops)
  • openalice-personahttpoptional
    via PERSONA_INTERNAL_URL
    VRM upload/list/delete proxy — SPA talks only to BlueGenie, which forwards to persona-server
  • openalice-rthttpoptional
    via RT_URL
    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
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
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
Env drift · manifest ⇄ code

Atlas grepped the repo's source for env reads (rust env::var · ts process.env · py os.environ · shell $VAR) and diffed against the manifest's consumes_env. Two lists below: stale declarations and undeclared reads.

Code reads, manifest omits
  • VITE_API_URL
Manifest declares, code unused
  • RUST_LOG
Observed reads: 13 · declared: 13

Code composition

tokei · loc
10.5kloc
  • TSX54.9%
  • Rust23.2%
  • TypeScript14.1%
  • SQL2.4%
  • JSON2.3%
  • Other3.1%
  • TSX54.9%· 5,749
  • Rust23.2%· 2,428
  • TypeScript14.1%· 1,482
  • SQL2.4%· 254
  • JSON2.3%· 242
  • YAML1.6%· 172
  • CSS0.8%· 80
  • TOML0.3%· 27
  • +2 more0.4%· 46 · 2 files
Language% codecodecommentsblanksfiles
TSX54.9%5,7492,33257539
Rust23.2%2,42813530220
TypeScript14.1%1,4821,38525821
SQL2.4%254149383
JSON2.3%2420224
YAML1.6%1722384
CSS0.8%8053281
TOML0.3%27761
Dockerfile0.2%238121
HTML0.2%231041
Markdown0.0%09573449

Telemetry ribbon · last 90 days

1 event
MAYJUNJUL2026-06-10 · lifecycle · first scan — repo indexedNOW
commitmanifestlifecyclekind

bluegenie/agent

1 feature
  • bluegenie.agent.chat-relay
    src/handlers/agent_chat.rs:3
    In-app ChatInputBar ↔ agent relay — user posts go in, agent replies come out, SPA polls /messages with a since-cursor.
    route:POST /v1/me/agent/inroute:POST /v1/me/agent/outroute:GET /v1/me/agent/messages
    since 0.1.0

bluegenie/assets

1 feature
  • bluegenie.assets.unlock-cards
    src/handlers/assets.rs:3
    2D unlock card pipeline — multipart PNG upload from Nano Banana 2, image-crate optimize, list/fetch/soft-delete under BLUEGENIE_ASSETS_DIR.
    route:POST /v1/me/assets/unlock-cardsroute:GET /v1/me/assets/unlock-cardsroute:GET /v1/me/assets/unlock-cards/{id}route:DELETE /v1/me/assets/unlock-cards/{id}
    since 0.1.0

bluegenie/auth

1 feature
  • bluegenie.auth.whoami
    src/handlers/auth.rs:3
    Clear the shared oa_session + oa_refresh cookies so the user signs out of every *.blal.pro product in one click.
    route:POST /v1/auth/logout
    since 0.1.0

bluegenie/core

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

bluegenie/internal

1 feature
  • bluegenie.internal.gdpr-export
    src/handlers/internal.rs:3
    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.
    route:GET /internal/me/{tenant_id}/export.json
    since 0.1.0

bluegenie/ledger

1 feature
  • bluegenie.ledger.achievements
    src/handlers/ledger.rs:3
    Server-side achievement recompute — flips achieved_at, walks the unlock graph, fires persona dialog events on new unlocks.
    route:POST /v1/me/ledger/check
    since 0.1.0

bluegenie/money

1 feature
  • bluegenie.money.runway
    src/handlers/money.rs:3
    Category targets vs current-month actuals readout for the soft-budget UI band.
    route:GET /v1/me/money/categories
    since 0.1.0

bluegenie/ops

1 feature
  • bluegenie.ops.health
    src/handlers/health.rs:3
    Traefik liveness probe returning plain-text "ok".
    route:GET /health
    since 0.1.0

bluegenie/persona

2 features
  • bluegenie.persona.registry
    src/handlers/personas.rs:3
    Persona registry — list/detail in v1 (Blue Genie only) with relationship state; multi-character writes deferred to v2.
    route:GET /v1/me/personasroute:GET /v1/me/personas/{id}route:POST /v1/me/personas
    since 0.1.0
  • bluegenie.persona.vrm-proxy
    src/handlers/vrm.rs:3
    Thin proxy around persona-server VRM upload/list/bind so the SPA only talks to bluegenie.blal.pro for the Blue Genie avatar slot.
    route:POST /v1/me/vrm/uploadroute:GET /v1/me/vrmroute:PUT /v1/me/vrm/{vrm_id}
    since 0.1.0

bluegenie/quests

1 feature
  • bluegenie.quests.quests
    src/handlers/quests.rs:3
    Milestone add (auto-ordered) and idempotent completion endpoint for a quest's progress timeline.
    route:POST /v1/me/quests/{id}/milestonesroute:POST /v1/me/quests/{id}/milestones/{mid}/complete
    since 0.1.0

bluegenie/self

1 feature
  • bluegenie.self.mood
    src/handlers/self_panel.rs:3
    Future Self Letters — markdown body + Q&A JSONB, listed/created via this surface (TTS rendering deferred to v2).
    route:GET /v1/me/self/lettersroute:POST /v1/me/self/letters
    since 0.1.0