managarten/services/mana-auth
Till JS 4318948980 feat(mana-auth): add guilds, api-keys, me, security, auth routes
Complete the mana-auth Hono service with all remaining endpoints
from mana-core-auth.

Added:
- routes/auth.ts: Full auth flow (register, login, logout, validate,
  password reset, profile, change-password, account deletion,
  security events) with lockout + security event logging
- routes/guilds.ts: Guild CRUD, member management, invitations
  (delegates to Better Auth org plugin + mana-credits for pools)
- routes/api-keys.ts: API key generation, listing, revocation,
  validation (sk_live_* format, SHA-256 hashed)
- routes/me.ts: GDPR data export/delete (Articles 17 & 20)
- services/security.ts: SecurityEventsService (fire-and-forget audit)
  + AccountLockoutService (5 failures/15min → 30min lockout)
- services/api-keys.ts: Key generation, validation, scope checks

Updated:
- index.ts: Wire all routes with proper middleware (JWT, service auth)

Service now has ~1,900 LOC covering all functionality from the
original ~11,500 LOC NestJS mana-core-auth (83% reduction).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 02:57:22 +01:00
..
src feat(mana-auth): add guilds, api-keys, me, security, auth routes 2026-03-28 02:57:22 +01:00
CLAUDE.md feat(services): create mana-auth (Hono + Bun) — Phase 5 auth rewrite 2026-03-28 02:43:44 +01:00
Dockerfile feat(services): create mana-auth (Hono + Bun) — Phase 5 auth rewrite 2026-03-28 02:43:44 +01:00
drizzle.config.ts feat(services): create mana-auth (Hono + Bun) — Phase 5 auth rewrite 2026-03-28 02:43:44 +01:00
package.json feat(services): create mana-auth (Hono + Bun) — Phase 5 auth rewrite 2026-03-28 02:43:44 +01:00
tsconfig.json feat(services): create mana-auth (Hono + Bun) — Phase 5 auth rewrite 2026-03-28 02:43:44 +01:00