How fawazv/personal_portfolio works
Project Type and Purpose
• This is a full-stack, single-page portfolio application built with Next.js (App Router).
• Purpose: Showcase projects, skills, timeline, testimonials, and provide a contact form via serverless email API.
File Structure Analysis
• Top level:
• public/ – static assets (videos, images).
• src/app/ – Next.js routes and layouts.
• src/components/ – UI building blocks (Hero, Projects, Testimonials, etc.).
• Config files: next.config.ts, eslint.config.mjs, postcss.config.mjs, tsconfig.json.
• Under src/app:
• layout.tsx – global layout wrapper.
• page.tsx – home page entry.
• api/send-email/route.ts – serverless function for sending email.
• api/submit-testimonial/route.ts – serverless function for testimonial submission.
• Utilities and build:
• rename_assets.js – custom build-time script, likely for asset management.
• package.json/scripts – dev, build, start, lint.
README Insights
• Tech stack: Next.js 16, TypeScript, Tailwind CSS v4, Framer Motion, Three.js/React Three Fiber, Nodemailer.
• Features: Scrolly animations, dynamic timeline, testimonial marquee, responsive design, contact integration.
Main Components
A. Client Browser (React/Next.js front end)
B. Next.js Server (App Router handling SSR/SSG + serverless API routes)
C. Public CDN/Static Assets Host (serving videos, images from /public)
D. External SMTP Email Service (via Nodemailer and environment SMTP credentials)
E. (Optional) Data Store or File-based Data (for testimonials & timeline if dynamic)
F. Build System (Node.js, npm scripts, rename_assets.js, FFmpeg for asset optimization)
Relationships and Data Flows
• Browser → Next.js Server:
• Requests HTML/CSS/JS bundles (SSR or static).
• Fetches JSON from API endpoints (/api/send-email, /api/submit-testimonial).
• Next.js Server → Public CDN: Serves static files (mp4, images).
• Next.js Server → External SMTP Service: Sends outbound emails on contact form submission.
• Build System → Public CDN: Runs locally or CI to optimize videos (FFmpeg), rename assets, then deploy.
Architectural Patterns & Principles
• Monorepo monolith with clear separation:
• UI components vs. API routes vs. static assets.
• Serverless functions pattern for backend logic.
• Declarative styling (Tailwind CSS) and animation (Framer Motion).
• App Router for nested layouts and routing.
Technologies & Frameworks
• Frontend: Next.js (React), TypeScript, Tailwind CSS, Framer Motion, Three.js + React Three Fiber.
• Backend/API: Node.js serverless functions in Next.js, Nodemailer.
• Asset processing: FFmpeg, custom Node script.
• Deployment: Vercel or any Next.js-capable host.