KeySafe is a Next.js app for managing API keys in a password-manager style interface.
Current implementation includes:
- A login screen with mock sign-in flow
- A dashboard for browsing, searching, revealing, copying, creating, and deleting API keys
- A usage guide that shows environment variable names and code examples (cURL, Node.js, Python)
- Next.js 15 (App Router)
- React 18 + TypeScript
- Tailwind CSS + Radix UI/shadcn-style components
- Genkit configured with Google AI plugin
src/app/login/page.tsx: Login page (currently mock auth)src/app/dashboard/page.tsx: Main API key management screensrc/app/dashboard/usage/page.tsx: Environment variable and usage examplessrc/app/dashboard/layout.tsx: Sidebar layout for dashboard routessrc/components/api-key-table.tsx: Core key table UI and interactionssrc/lib/data.ts: Seed/mock API key datasrc/ai/genkit.ts: Genkit initialization
- The root route (
/) redirects to/login. - Authentication is currently mocked on the client and redirects to
/dashboard. - API key data is in-memory client state seeded from
src/lib/data.ts. - Create/delete changes are not persisted to a backend yet.
flowchart TD
A[User Browser] --> B[/]
B -->|redirect| C[/login]
C -->|mock sign in| D[/dashboard]
D --> E[ApiKeyTable]
E --> F[src/lib/data.ts seed data]
E --> G[Client state in memory]
D --> H[/dashboard/usage]
H --> I[UsagePage]
I --> F
J[src/app/layout.tsx] --> C
J --> D
K[src/app/dashboard/layout.tsx] --> D
K --> H
src/app/page.tsxredirects users to the login page.src/app/login/page.tsxhandles form submit and routes to dashboard.src/app/dashboard/layout.tsxprovides the shared sidebar shell for dashboard pages.src/components/api-key-table.tsxreads initial keys fromsrc/lib/data.ts, then manages edits in client state.src/app/dashboard/usage/page.tsxreads the same seeded keys and renders environment variable examples.
npm installnpm run devThe app runs on http://localhost:9002.
npm run dev # Start Next.js dev server on port 9002
npm run build # Build for production
npm run start # Start production server
npm run lint # Run Next.js lint checks
npm run typecheck # Run TypeScript checks
npm run genkit:dev # Start Genkit development server
npm run genkit:watch # Start Genkit server in watch modeThis repository includes apphosting.yaml for Firebase App Hosting configuration.
To deploy, use the Firebase CLI from this project directory after authenticating:
firebase deployAdjust deployment commands/targets as needed for your Firebase project setup.
This is currently a frontend-focused implementation with mock auth and local-only key state. For production use, connect:
- Real authentication (for example Firebase Auth)
- Secure server-side key storage and encryption
- Access controls and audit logging