How namanbarkiya/minimal-next-portfolio works
Project type and purpose
• This is a full-stack, server-rendered portfolio web application built with Next.js 14.
• Purpose: showcase a developer’s skills, experience, projects, and provide a contact form.
File structure
• app/ – Next.js App Router (server and client components).
• Routes for pages: /, /career, /experience, /skills, /contact, /resume, /contributions.
• app/api/contact/route.ts – serverless API endpoint for contact form.
• app/layout.tsx, app/globals.css, app/manifest.ts, app/sitemap.ts – global layout, styling, SEO.
• components/ – UI and feature components, organized by domain:
• components/common – navigation, theme toggling, analytics wrapper, layout containers.
• components/ui – design system primitives (buttons, cards, dialogs, inputs).
• Feature-specific folders: career, experience, skills, contributions, contact, modals, forms.
• config/ – JSON/TS files holding static data: site metadata, routes, career entries, experiences, skills, contributions, socials.
• hooks/ – React hooks for modal state and body scroll locking.
• providers/ – context providers for animations, modals, theme.
• lib/ – utility functions.
• next.config.js, tailwind.config.js, tsconfig.json, linting & formatting config – build and deployment settings.
README insights
• Emphasizes SSR, TypeScript, Tailwind + shadcn/ui, Framer Motion, server actions for forms, Google/Vercel Analytics, Vercel deployment.
• No database: contact form likely emails or posts to external service.
a. Main components to include:
• Client Browser – renders React pages, handles animations, interacts with UI components.
• Next.js Server – handles SSR/SSG for each route, serves static assets, runs server actions.
• Serverless API – the /api/contact route for form submissions.
• External Services – Google Analytics, Vercel Analytics, email or form-processing service.
• Static Storage / CDN – Vercel’s CDN for assets under /public and optimized images.
b. Relationships & data flows:
• Browser → Next.js Server: HTTP GET for pages.
• Next.js Server → Browser: HTML + CSS + JS bundles.
• Browser (client-side) → Serverless API: POST contact form.
• Serverless API → External form/email service: delivers form data.
• Browser ↔ Google/Vercel Analytics: tracking calls.
• Next.js build → Vercel Deployment → Static assets delivered via CDN.
c. Architectural patterns & principles:
• App Router (Next.js 14) – co-locates routes and layout, SSR/SSG hybrid.
• Component-based design – shadcn/ui primitives + custom feature components.
• Unidirectional data flow – React props & server actions.
• Serverless functions – lightweight micro-endpoint for contact form.
• Configuration-as-code – config/ drives dynamic page generation without code changes.
d. Key technologies & frameworks:
• Next.js 14, React, TypeScript
• Tailwind CSS, shadcn/ui, Framer Motion
• Vercel Serverless Functions, Vercel Analytics, Google Analytics