How harshkhasbage77/sashriti-website works
Project type and purpose
• This is a Next.js (v13+ App Router) frontend project, primarily a marketing/landing website.
• There is no backend code (no /api folder) so all dynamic behavior is either SSR/SSG or purely client-side React.
File structure
• Top-level:
• next.config.mjs, postcss.config.mjs, eslint.config.mjs, package.json – configuration for Next.js, build, linting, styling.
• public/ – static assets (images, favicon).
• src/app/ – Next.js App Router folder:
• layout.js – shared layout (Header, Footer, CSS imports).
• page.js – root page entry.
• globals.css – global styles.
• src/components/
• magicui/ – a library of reusable animated UI primitives (cards, text effects, grids).
• mycomponents/ – page-specific sections (hero, about, team, etc.) assembled into pages.
• ui/ – generic UI elements (Button, NavigationMenu, SmoothCursor).
• src/lib/utils.js – helper functions.
README for additional insights
• Standard Create-Next-App README.
• No custom architecture notes, but mentions Next.js font optimization, Vercel deploy.
a. Main components:
• Client Browser (React)
• Next.js Server/Host (SSR & SSG runtime)
• Static Asset Store (public folder, Vercel CDN)
• Component Library (magicui + ui)
• Page Assembly Layer (mycomponents + app/pages/layout)
• Utility Layer (lib/utils)
• External Services (Google Analytics, Fonts CDN, or any embed)
b. Relationships & data flow:
1. Client sends HTTP request to Next.js Server (or CDN edge).
2. Next.js resolves route under src/app.
3. Server either renders on-the-fly (SSR) or serves pre-rendered page (SSG).
4. During render, components from magicui, ui, and mycomponents are composed.
5. CSS (globals.css + PostCSS) is applied.
6. Static assets (images, fonts) are fetched from CDN.
7. The completed HTML/CSS/JS is delivered to Client.
8. Client hydrates React, possibly runs client-side JS in components.
c. Architectural patterns & design principles:
• Component-based architecture (atomic UI primitives vs. section components).
• App Router for file-based routing.
• SSR/SSG hybrid rendering.
• Separation of concerns: styles in CSS modules, logic in utils.
d. Key technologies/frameworks:
• Next.js (React, SSR/SSG, App Router)
• React (function components, hooks)
• PostCSS (styles pipeline)
• Vercel (hosting, CDN)
Detailed capture of essential elements
• Flow of CSS through PostCSS plugin chain.
• If deploying on Vercel, show CI/CD: Git → Vercel → Edge CDN → Browser.