What problem does it solve?
Creating and maintaining API key authentication in a Phoenix 1.8 app is repetitive and error-prone, especially when you need secure token handling, revocation, and a user-facing management UI.
Core Features & Use Cases
- Discovers existing components first: Audits migrations, schema, context functions, LiveView, auth plug, and router entries to avoid duplicating or overwriting partial implementations.
- Generates missing backend + UI: Adds the
api_keys migration and ApiKey schema, context functions for create/list/revoke/verify/touch, an ApiKeyLive.Index LiveView with modals for create/token/revoke, and the Bearer token auth plug.
- Ensures key security patterns: Never stores raw tokens (stores prefix + SHA256 hash), shows the raw token only once after creation, supports optional expiration, and uses soft revocation.
Quick Start
Ask your AI assistant to run bootstrap-api-keys in your Phoenix 1.8 app to add end-to-end API key CRUD with Bearer authentication at /api-keys.