Personal portfolio site (static HTML + a couple of Vercel serverless functions).
.
├── index.html # About / landing page (+ code dashboard)
├── projects.html # Projects
├── academic-work.html # Academic work
├── contact.html # Contact
├── assets/
│ ├── css/style.css # Gothic/futuristic theme (dark default + light toggle)
│ └── js/script.js # Theme toggle, view counter, DMOJ loader, ember canvas
├── api/ # Vercel serverless functions (Node, ESM)
│ ├── view.js # Increments + returns a per-page view count (MongoDB)
│ └── dmoj.js # Proxies DMOJ user stats (with cached fallback)
├── lib/
│ └── mongodb.js # Shared MongoDB client (serverless-safe singleton)
├── images/ # Icons + profile picture
├── docs/ # Non-shipping reference material (API samples, etc.)
└── vercel.json # Routes /api/view and /api/dmoj
-
Hosted on Vercel. The static pages are served from the repo root; the files under
api/run as serverless functions. -
Required environment variable (set in the Vercel dashboard, not committed):
MONGODB_URI = mongodb+srv://<user>:<pass>@<cluster>/?retryWrites=true&w=majorityThe
viewfunction reads/writes theviewscollection in theportfoliodatabase.