Personal dev log + Q&A board. I built this to write down what I'm learning — from finishing 10th/12th under J&K BOSE to picking up Python, web dev, and whatever comes next in college.
Stack: React 19 + Vite frontend, Express 5 + Drizzle + Postgres backend. Deploys on Vercel.
frontend/ React app
backend/ Express API + Drizzle
api/ Vercel serverless entry (re-exports backend/src/app)
pnpm install
cp .env.example .env # fill in what you have
pnpm run devFrontend: http://localhost:5173
API: http://localhost:5000
Without DATABASE_URL and Supabase keys → preview mode (in-memory DB + mock auth).
| Service | Why |
|---|---|
| Supabase | Postgres + auth |
| Upstash Redis | Rate limiting across serverless instances (free tier is fine to start) |
Set all of these in Vercel → Project → Settings → Environment Variables.
Build + runtime (backend):
DATABASE_URL=postgresql://...pooler.supabase.com:6543/postgres?sslmode=require
SUPABASE_JWT_SECRET=...
ADMIN_EMAIL=your@email.com
FRONTEND_URL=https://your-domain.vercel.app
UPSTASH_REDIS_REST_URL=https://....upstash.io
UPSTASH_REDIS_REST_TOKEN=...
Build time only (frontend — must exist before deploy builds):
VITE_SUPABASE_URL=https://xxx.supabase.co
VITE_SUPABASE_ANON_KEY=...
VITE_ADMIN_EMAIL=your@email.com
Use Supabase's connection pooler URL (port 6543), not the direct 5432 URL — serverless needs pooling.
Push to GitHub → connect repo in Vercel → set build command to pnpm run vercel-build.
Migrations run automatically during vercel-build when DATABASE_URL is set.
- Homepage loads
- Sign up / sign in works
- Admin can write a post
- Non-admin cannot see Write button
- Doubts list loads
- Share a blog post link — OG preview shows correct title
See .env.example for the full list with comments.
# generate new migration after schema change
cd backend && npx drizzle-kit generate
# apply migrations locally or in CI
pnpm run migrateWhat's already wired in:
- Upstash Redis rate limits (300 reads/min, 30 writes/min per IP)
- GIN indexes on tag arrays + btree indexes on hot columns
- Cache-Control headers on read API routes
- gzip compression on API responses
- React Query 60s stale time on the frontend
- Vercel CDN caching for static assets (1 year on hashed JS/CSS)
pnpm run dev
pnpm run typecheck
pnpm run build
pnpm run migrate
pnpm run vercel-buildCI runs typecheck + build on every push to main (see .github/workflows/ci.yml).
MIT — see LICENSE.