Secure student and Training & Placement Officer portal with profiles, resumes, roster administration, exports, placement drives, deterministic candidate matching, shortlists, and audit logs.
Live pilot: https://ait.ait-placement-portal.workers.dev
Operations and recovery: docs/OPERATIONS.md
- Copy
.env.exampleto.envand set a randomJWT_SECRETof at least 32 characters. - Leave Supabase values empty for local JSON development. Resume upload and admin email login require Supabase.
- Run
npm install, thennpm start. - Open
http://localhost:3000.
Tests use isolated data/db.test.json and never use configured Supabase:
npm.cmd test
npm.cmd run check- Create a development Supabase project.
- Apply all versioned migrations using
npx.cmd supabase db push. - Invite an admin through Supabase Auth.
- Insert its UUID into
public.profileswith roleadminand statusactive. - Put project URL and server-only service-role key in backend secrets. Never expose service role to browser code.
Set secrets:
npx.cmd wrangler secret put JWT_SECRET
npx.cmd wrangler secret put SUPABASE_URL
npx.cmd wrangler secret put SUPABASE_KEYSet ALLOWED_ORIGINS to deployed origin, test with npm.cmd run deploy:dry-run, then run npm.cmd run deploy.
Production deploys use Cloudflare Workers Builds connected to ketpatil77/TPO:
- Production branch:
master - Build command:
npm run check - Deploy command:
npm run deploy - Worker:
ait
Every push to master now triggers the production build automatically.
keep_vars is enabled in wrangler.jsonc so Git-triggered deploys preserve runtime variables configured on the existing Worker. Encrypted values remain Worker secrets and must never be committed or added as build variables.
The current pilot Worker is deployed at the live URL above. After deployment, verify /api/health returns 200, /api/roster returns 404, and an unauthenticated /api/admin/students request returns 401.
Cloudflare Workers serves static assets and Express API using current Node HTTP compatibility. Supabase Free may pause inactive projects and has storage/database quotas. Free pilot has no uptime SLA.
- Export database and
resumesbucket before migrations. - Never run legacy scripts against production; they mutate records.
- Review Supabase Security and Performance Advisors after each migration.
- Rotate any secret accidentally shared or committed.