EssayDash is a Next.js dashboard for managing API-key access to an essay and college-data service. It provides account-oriented key creation, organization lookup, usage visibility, and a simple interface for browsing supported college names.
- Creates API keys for organizations and stores them in MongoDB
- Looks up existing organizations and their API access status
- Displays recent request activity and monthly usage charts
- Uses Firebase Authentication on the client side
- Includes a college-name browser backed by a static dataset
- Separates public client configuration from private database credentials
- Next.js 14 and React 18
- TypeScript
- MongoDB Node driver
- Firebase client SDK
- Tailwind CSS and Recharts
src/app/page.tsx Dashboard UI and client interactions
src/app/api/user/route.ts API-key creation and lookup endpoints
src/app/firebase.ts Firebase client initialization
src/app/college_names.txt College-name dataset used by the UI
npm install
Copy-Item .env.example .env.local
npm run devOpen http://localhost:3000.
| Name | Purpose |
|---|---|
MONGODB_URI |
MongoDB connection string for API-key storage |
MONGODB_DB |
Database name, defaults to college_db |
NEXT_PUBLIC_FIREBASE_API_KEY |
Firebase web API key |
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN |
Firebase Auth domain |
NEXT_PUBLIC_FIREBASE_PROJECT_ID |
Firebase project ID |
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET |
Firebase storage bucket |
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID |
Firebase sender ID |
NEXT_PUBLIC_FIREBASE_APP_ID |
Firebase app ID |
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID |
Optional Firebase measurement ID |
Database credentials are loaded through MONGODB_URI and are never committed. Firebase web config values are public identifiers, but they still live in environment variables so the project can be reused across environments. Rotate any credentials that were ever committed before using this project in a public setting.
- Add authentication checks to protect admin-level API-key reads
- Hash API keys at rest and show full keys only once during creation
- Add request logging ingestion so usage charts reflect production traffic
- Add integration tests for the API route and duplicate-user handling