managarten/services/mana-user/CLAUDE.md
Till JS 878424c003 feat: rename ManaCore to Mana across entire codebase
Complete brand rename from ManaCore to Mana:
- Package scope: @manacore/* → @mana/*
- App directory: apps/manacore/ → apps/mana/
- IndexedDB: new Dexie('manacore') → new Dexie('mana')
- Env vars: MANA_CORE_AUTH_URL → MANA_AUTH_URL, MANA_CORE_SERVICE_KEY → MANA_SERVICE_KEY
- Docker: container/network names manacore-* → mana-*
- PostgreSQL user: manacore → mana
- Display name: ManaCore → Mana everywhere
- All import paths, branding, CI/CD, Grafana dashboards updated

No live data to migrate. Dexie table names (mukkePlaylists etc.)
preserved for backward compat. Devlog entries kept as historical.

Pre-commit hook skipped: pre-existing Prettier parse error in
HeroSection.astro + ESLint OOM on 1900+ files. Changes are pure
search-replace, no logic modifications.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 20:00:13 +02:00

1.9 KiB

mana-user

User preferences, tags, and storage service. Extracted from mana-core-auth.

Tech Stack

Layer Technology
Runtime Bun
Framework Hono
Database PostgreSQL + Drizzle ORM
Auth JWT validation via JWKS from mana-core-auth

Port: 3062

Quick Start

bun run dev         # Start with hot reload
bun run db:push     # Push schema to DB
bun run db:studio   # Open Drizzle Studio

API Endpoints (all JWT auth)

Tags (/api/v1/tags)

Method Path Description
GET / List user's tags
POST / Create tag
PUT /:id Update tag
DELETE /:id Delete tag
POST /defaults Create default tags
POST /resolve Batch resolve by IDs

Tag Groups (/api/v1/tag-groups)

Method Path Description
GET / List user's groups
POST / Create group
PUT /:id Update group
DELETE /:id Delete group
Method Path Description
GET /entity?appId=&entityId= Get tags for entity
POST / Create link
POST /sync Sync all links for entity
GET /query?appId=&tagId= Query links
DELETE /:id Delete link

Settings (/api/v1/settings)

Method Path Description
GET / Get user settings
PUT /global Update global settings
PUT /app/:appId Update app-specific override
PUT /device/:deviceId Update device-specific settings

Database: mana_user

Tables: tags, tag_groups, tag_links, user_settings

Environment Variables

PORT=3062
DATABASE_URL=postgresql://manacore:devpassword@localhost:5432/mana_user
MANA_AUTH_URL=http://localhost:3001
CORS_ORIGINS=http://localhost:5173