Skip to main content
The YWCC Industry Capstone site is a Jamstack + Selective SSR monorepo. Public-facing content is pre-rendered at build time into static HTML and served from Cloudflare’s CDN. Authenticated portal pages are server-rendered on demand by Cloudflare Workers. Content flows from Sanity Studio through GROQ queries into Astro at build time, with no runtime CMS calls on production.

System diagram

Layered architecture

Key architectural decisions

Public pages (SSG) vs portal pages (SSR)

SSG — 8 public pages

Pre-rendered at build time. Served directly from Cloudflare’s CDN. No auth required.
  • / — Home (index.astro)
  • /sponsors/ — Sponsor listing
  • /sponsors/[slug] — Sponsor detail
  • /projects/ — Project listing
  • /projects/[slug] — Project detail
  • /events/ — Events listing
  • /events/[slug] — Event detail
  • /[...slug] — CMS-driven pages

SSR — 9 portal/auth pages

Server-rendered per request by a Cloudflare Worker. Auth middleware runs on every hit.
  • /portal/ — Sponsor dashboard
  • /portal/[sponsorSlug] — Sponsor-specific view
  • /portal/events — Portal events
  • /portal/progress — Project progress
  • /portal/login — Login screen
  • /portal/denied — Access denied
  • /student/ — Student dashboard
  • /auth/login — Auth entry
  • /api/auth/* — Better Auth handler (5 endpoints)

Cloudflare edge services

The output: 'static' setting in astro.config.mjs is the project default. Pages that need SSR opt in individually via export const prerender = false. The @astrojs/cloudflare adapter bridges both modes under a single Cloudflare Pages project.

Performance targets

No framework runtime ships to the browser — Total Blocking Time stays near zero because Astro outputs plain HTML by default and only hydrates React islands in the portal.