Independent portfolio for Srinjoy Pramanick, AI/ML Engineer and Cybersecurity Enthusiast. It uses React, TypeScript, TanStack Start, Supabase Auth/PostgreSQL, and an optional server-side grounded AI assistant.
- Install Node.js 22 LTS and run
npm install. - Copy
.env.exampleto.env.localand replace placeholders. Never exposeSUPABASE_SERVICE_ROLE_KEYorAI_API_KEYthrough aVITE_variable. - Apply every SQL file in
supabase/migrationsin timestamp order. - Create the first administrator out-of-band in Supabase Auth, then insert its user ID into
user_roleswith roleadmin. Public signup and self-promotion are intentionally unavailable. - Run
npm run check, thennpm run dev:all. The development server binds only to127.0.0.1:5173.
Local URLs:
- Portfolio:
http://127.0.0.1:5173/ - Admin:
http://127.0.0.1:5173/admin - Health:
http://127.0.0.1:5173/api/v1/health
This is a full-stack TanStack Start application, so there is no separate backend port. Server functions and API routes use the same origin. Without Supabase/AI variables, the public UI can render but persistence, authentication, and AI calls fail safely; the health endpoint returns 503 degraded.
Deploy the full TanStack Start server to a supported Node/Cloudflare target. Configure all server secrets in the host, set ALLOWED_ORIGINS to exact HTTPS origins, apply migrations before release, and verify /, /admin, an unknown route, contact submission, and AI failure behavior. Keep source maps disabled publicly. Configure HTTPS, backups, log retention, monitoring, and rollback to the previous artifact/database migration.
The in-memory rate limiter is a development/single-instance fallback. Production deployments with more than one instance must replace it with Redis or a managed atomic rate-limit store.