e9496f2c4a47ffe671af1b211170e0cc1427d39c
CodexDash
CodexDash is a mobile-first dashboard for monitoring multiple OpenAI Codex accounts from one place.
Stack
- Frontend: React + Vite + TypeScript + Tailwind CSS + shadcn/ui-style components
- Backend: NestJS
- Database: Prisma + SQLite
- Auth: CodexDash email/password auth with JWT
What it does
- Create a CodexDash account and sign in
- Connect multiple OpenAI Codex accounts under one CodexDash account
- Start an integrated OpenAI login popup instead of pasting cookies manually
- Refresh Codex usage data and merge numeric usage fields into one aggregate dashboard
- Inspect each connected account individually with raw API payload details
OpenAI/Codex login flow
CodexDash now reuses the public-client OAuth/PKCE shape found in darvell/codex-pool, but wraps it in an app-native flow:
- The user clicks Connect OpenAI account.
- CodexDash API creates a short-lived PKCE login attempt.
- The web app opens the OpenAI authorization page in a popup.
- After successful login, OpenAI redirects back to the local callback bridge at
http://localhost:1455/auth/callback. - The callback bridge exchanges the authorization code for tokens, encrypts the session JSON in SQLite, and posts the result back to the main app window.
- CodexDash refreshes usage using the saved OAuth session and shows both the aggregate view and per-account details.
Important local-dev note
This flow depends on the local callback bridge being reachable on localhost:1455. In local development, make sure that port is free before starting the API.
Local development
pnpm install
pnpm --filter @codexdash/api exec prisma generate
cd apps/api && DATABASE_URL=file:./dev.db pnpm exec prisma db push --accept-data-loss
cd ../..
pnpm --filter @codexdash/api start:dev
pnpm --filter @codexdash/web dev --host 0.0.0.0
Environment variables
Root .env
JWT_SECRET=***
ENCRYPTION_SECRET=***
DATABASE_URL=file:./dev.db
CODEXDASH_FRONTEND_ORIGIN=http://localhost:5173
CODEX_OAUTH_REDIRECT_URI=http://localhost:1455/auth/callback
VITE_API_BASE_URL=http://localhost:3001
Verification
pnpm lint
pnpm test
pnpm build
curl http://localhost:3001/health
API overview
POST /auth/registerPOST /auth/loginGET /auth/meGET /codex/accountsPOST /codex/accounts/login/startGET /codex/accounts/login/attempts/:attemptIdDELETE /codex/accounts/login/attempts/:attemptIdGET /codex/accounts/login/callbackGET /codex/accountsDELETE /codex/accounts/:accountIdGET /codex/usage-summary
Description
Languages
TypeScript
86.9%
JavaScript
11.3%
Dockerfile
1%
CSS
0.4%
HTML
0.4%