How anuj579/birthday-site-v2 works
Project Type and Purpose
• This is a full-stack (front-end only) static/SSR React application built with Next.js.
• Purpose: Render a birthday-themed UI with animations, confetti, countdown timer, and a photo slideshow.
Main Components
a. Client (Browser)
• Sends HTTP requests and renders the React UI.
b. Next.js Server (or Static Hosting)
• Serves HTML, CSS, and JS bundles.
• Handles SSR or SSG at build time.
c. UI Components (src/app/components)
• Celebration.jsx (confetti)
• Countdown.jsx (timer)
• HappyBirthday.jsx (title/animation)
• Letter.jsx (personal message)
• Loader.jsx (initial loading)
• PhotoGallery.jsx (Swiper slideshow)
d. Styling & Animations
• Tailwind CSS (globals.css + postcss.config.mjs)
• Framer Motion (entrance/fade animations)
• Canvas Confetti (celebration effect)
e. Static Assets
• public/images (photos for the gallery)
f. Build & Config
• next.config.mjs (Next.js configuration)
• tailwind.config.mjs (Tailwind setup via postcss)
• eslint.config.mjs, jsconfig.json (dev tooling)
Relationships & Data Flow
1. User opens Browser → HTTP GET to Next.js Server or CDN
2. Server returns HTML + JS bundles, including React entry at src/app/page.jsx
3. React hydrates on client
4. Page layout (src/app/layout.js) mounts global CSS; core components render in page.jsx
5. UI components invoke:
– Countdown logic (Countdown.jsx)
– Confetti via Canvas Confetti (Celebration.jsx)
– Animations via Framer Motion
– Photo slideshow via Swiper.js (PhotoGallery.jsx)
6. All assets (images, CSS) served from public/ and bundled code.
Architectural Patterns & Principles
• Component-based UI (React + Next.js App Router)
• Static-first deployment (SSG/SSR)
• Single Page Application with dynamic components
• Separation of concerns: styling (Tailwind) vs. logic (React) vs. animations (Framer Motion, Canvas Confetti)
Must-Include Elements
• Core application (React + Next.js)
• Third-party libraries
• Assets (images/CSS)
• External actor (Browser/CDN)