How akkilesh-a/swc_website works
Project Type and Purpose
• Type: Jamstack / Full-stack website
• Purpose: Client-facing site for SWC, powered by Next.js and fetching content from Sanity.io
File Structure
• Top-level “frontend” directory: a Next.js 13+ app
– components, pages (in src/app/), global styles, Tailwind config
– sanity/client.ts client to fetch data via GROQ
• Top-level “swcbackend” directory: Sanity schema and config
– schema definitions (schemaTypes/*.ts) define content models (blogs, events, etc.)
– sanity.config.ts for CMS project setup
• No traditional monolithic server—data is served by Sanity’s API
Key README Insights
• Minimal README, but directory names and config files (Next.js, Sanity CLI) reveal tech stack:
– React/Next.js, TypeScript, Tailwind CSS on front
– Sanity.io as headless CMS on back
Main Components & Their Relationships
a. Frontend
– Next.js server-side and client-side components
– UI library components (buttons, cards, sliders) in components/ui/
– Data-fetching layer with Sanity client
b. Backend
– Sanity Studio (local dev for content editors)
– Sanity Content Lake (hosted content store / Graph-oriented API)
c. Static Assets
– Images, video in frontend/public/
– Served via Next.js static file hosting or CDN
d. External Services
– Vercel (or Netlify) for CI/CD, build & hosting
– Sanity’s hosted API and auth
Flow:
User’s browser ←→ Next.js (SSR/SSG) ←→ Sanity Content API
Build pipeline: Git → Vercel CI → Next.js build → Deploy
Architectural Patterns & Design Principles
• Jamstack: pre-render pages (SSG) or server-side render (SSR) using data from a headless CMS
• Component-driven UI with shared design primitives
• Clear separation of concerns: presentation & data layer
Technologies & Frameworks
• Frontend: Next.js, React, TypeScript, Tailwind CSS, PostCSS
• Backend: Sanity.io (CLI, schema, types), GROQ client
• Tooling: ESLint, Prettier, Git, Vercel deploy