How manu-hn/manuhn-portfolio works
Project type and purpose
• This is a personal “Next.js Portfolio” site built with Next.js 13’s App Router.
• It’s primarily a front-end React/TypeScript application with server-side support for a contact form (sendEmail action).
• It uses static assets (images, logos, project thumbnails), a Redux store for theme or UI state, and integrates an external email service for inbound messages.
File structure
• Top-level config: next.config.mjs, tailwind.config.ts, postcss.config.mjs, tsconfig.json → Build and styling toolchain (Next.js + Tailwind).
• public/ → Static assets served at build time via CDN.
• src/app/ → Next.js 13 App Router: global CSS, layout.tsx (root layout), page.tsx (home page).
• src/components/ → UI broken down by feature (header, footer, intro, about, experience, skills, projects, contact, theme provider, notice-provider).
• src/actions/sendEmail.tsx → A Next.js Server Action or API route to handle form submissions.
• src/store/ → Redux state management (themeSlice, provider, hooks).
• src/lib/ → Custom hooks and utility functions.
• src/constants, src/types → Strongly-typed data and configuration for resume entries, skills, social links.
Key insights from the README
• Confirms the site’s purpose: a Next.js portfolio.
a. Main components
– User’s Browser (Client)
– Next.js App Server (SSR/SSG runtime + Server Actions)
– React Component Tree (src/app + src/components)
– Redux Store (client-side state for theme/UI)
– Static Asset Store (public/ folder served via CDN)
– External Email Service (SMTP or third-party API used in sendEmail)
– Hosting/CDN (e.g., Vercel)
b. Relationships & data flows
1. User requests page → Next.js Server routes via src/app layout/page → SSR or SSG → delivered HTML/CSS/JS.
2. React hydrates in the browser → component tree initialized → Redux store sets initial theme state.
3. User interacts (navigation, carousel, form) → component event handlers → Redux updates or Server Action calls.
4. Contact form submit → sendEmail Server Action → communicates with External Email Service → returns success/error.
5. UI shows notification via NotistackProvider.
6. Static assets (images, logos) fetched directly from CDN.
c. Architectural patterns & principles
– Component-based design (UI molecules/organisms/pages).
– Directory-based routing with App Router.
– SSR/SSG hybrid rendering for performance & SEO.
– Redux for centralized UI state (theme toggling).
– Server Actions for backend behavior without separate API folder.
– Utility and constants layers for typed data.
d. Technologies & frameworks
– Next.js 13 (App Router)
– React + TypeScript
– Redux Toolkit
– Tailwind CSS + PostCSS
– Notistack for toast notifications
– Vercel (recommended) for deployment and CDN