tpmjs/packages/db/prisma
Ajax Davis a3f1f3935e feat: add API key authentication system and update documentation
API Key System:
- Add TpmjsApiKey, ApiUsageRecord, ApiUsageSummary models to schema
- Create API key utilities (generate, hash, mask with tpmjs_sk_ prefix)
- Implement dual auth middleware (session + API key)
- Add rate limiting with Vercel KV
- Create CRUD endpoints for API key management
- Add usage tracking and analytics endpoint
- Build API key management UI in dashboard
- Build usage dashboard with charts

Route Protection:
- Require auth for MCP endpoints (mcp:execute scope)
- Require auth for agent chat (agent:chat scope)
- Require auth for bridge connections (bridge:connect scope)

Documentation Updates:
- Update all curl/fetch examples with Authorization header
- Document API key format, scopes, and rate limits
- Update PRD-MCP-BRIDGE.md, MCP-AGGREGATOR-DESIGN.md
- Update API docs page with auth requirements
- Update HOW_TO_PUBLISH_A_TOOL.md
2026-01-13 04:45:52 +10:00
..
make-agents-public.ts fix: add admin endpoint to make existing agents public 2026-01-07 22:24:32 +10:00
schema.prisma feat: add API key authentication system and update documentation 2026-01-13 04:45:52 +10:00
seed.ts feat(db): create database package with Prisma schema for NPM registry 2025-11-28 02:07:39 +10:00