Repository navigation
09 Web and Edge Platform
Vicky Patel edited this page Nov 18, 2026
·
1 revision
Vercel Serverless Go Architecture, Global Edge Caching & Responsive UI
The web edition of GitVerse (mygitverse.vercel.app) is deployed on Vercelβs global Edge network. Rather than running a monolithic long-lived Node.js or Python backend, GitVerse compiles directly into lightweight, sub-50ms cold-start Go serverless functions.
graph TD
Client[Web Browser] --> CDN[Vercel Global Edge CDN]
CDN -->|Static Files / Assets| EdgeStorage[Prerendered site/ & assets/]
CDN -->|Dynamic Requests| GoFuncs[Serverless Go Handlers]
subgraph Serverless Edge Functions (api/)
GoFuncs --> Stars[api/stars - Edge Cached Stargazers]
GoFuncs --> Login[api/login - OAuth Initiator]
GoFuncs --> Callback[api/callback - Token Exchange]
GoFuncs --> Result[api/result - Profile Intelligence Report]
GoFuncs --> Markdown[api/markdown - Badge Generator]
end
Vercel routes and rewrites incoming HTTP traffic to static files or serverless Go functions via vercel.json:
{
"rewrites": [
{ "source": "/api/stars", "destination": "/api/stars/index.go" },
{ "source": "/auth/login", "destination": "/api/login/index.go" },
{ "source": "/auth/callback", "destination": "/api/callback/index.go" },
{ "source": "/check", "destination": "/api/result/index.go" },
{ "source": "/private", "destination": "/api/private/index.go" },
{ "source": "/badge/:user/:badge", "destination": "/api/markdown/index.go" }
],
"headers": [
{
"source": "/api/stars",
"headers": [
{ "key": "Cache-Control", "value": "public, s-maxage=60, stale-while-revalidate=120" }
]
}
]
}To deliver instant page loads and protect GitHub APIs from rate limiting, GitVerse implements a multi-tier caching strategy:
-
Static Pre-Rendering: Informational pages (
/achievements/,/about/,/privacy/) are compiled ahead-of-time byscripts/gendocs/into pure static HTML files located insite/. They are served directly from edge points of presence with zero compute overhead. -
Dynamic Serverless Caching: Endpoints with dynamic backing data (such as
/api/stars) apply stricts-maxage=60headers. Vercel caches the response at the edge for 60 seconds; subsequent visitors within that window receive cached payloads in$<20\text{ ms}$ . - Background Stale-While-Revalidate: If a cached response is older than 60 seconds, Vercel serves the stale response immediately while asynchronously invoking the Go handler in the background to refresh the edge cache.
The front-end is built using semantic HTML5 and vanilla modern CSS (CSS variables, Flexbox, and CSS Grid) without bulky external JavaScript dependencies:
-
Mobile First: Adapts fluidly from small smartphone viewports (
$\le 360\text{px}$ ) to ultra-wide displays ($\ge 2560\text{px}$ ). - Accessibility (a11y): Enforces WCAG 2.1 AA standards with high-contrast text, keyboard-focusable interactive elements, and ARIA labels.
-
Glassmorphism Styling: Backdrop blur filters (
backdrop-filter: blur(16px)), subtle 1px border glows, and dark OLED surfaces.
| ποΈ Project Hub | π οΈ Developer Docs | π¬ Community & Support |
|---|---|---|
| GitHub Repository | System Architecture | Live Web App |
| Track Any Profile | Achievement Catalog | Open Issues |
| Explore Badge Guides | CLI Reference | Pull Requests |
| Project Roadmap | Testing & QA Matrix | Maintainer Runbook |