managarten/services/mana-user/CLAUDE.md
Till JS 22a73943e1 chore: complete ManaCore → Mana rename (docs, go modules, plists, images)
Final cleanup of references missed in previous rename commits:

- Dockerfiles: PUBLIC_MANA_CORE_AUTH_URL → PUBLIC_MANA_AUTH_URL
- Go modules: github.com/manacore/* → github.com/mana/* (7 go.mod files)
- launchd plists: com.manacore.* → com.mana.* (14 files renamed + content)
- Image assets: *_Manacore_AI_Credits* → *_Mana_AI_Credits* (11 files)
- .env.example files: ManaCore brand strings → Mana
- .prettierignore: stale apps/manacore/* paths → apps/mana/*
- Markdown docs (CLAUDE.md, /docs/*): mana-core-auth → mana-auth, etc.

Excluded from rename: .claude/, devlog/, manascore/ (historical content),
client testimonials, blueprints, npm package refs (@mana-core/*).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 12:26:10 +02:00

1.9 KiB

mana-user

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

Tech Stack

Layer Technology
Runtime Bun
Framework Hono
Database PostgreSQL + Drizzle ORM
Auth JWT validation via JWKS from mana-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://mana:devpassword@localhost:5432/mana_user
MANA_AUTH_URL=http://localhost:3001
CORS_ORIGINS=http://localhost:5173