How punna1958/portfolio works
Project Type and Purpose
• This is a modern, responsive portfolio website built entirely with Next.js (App Router), TypeScript and Tailwind CSS.
• It serves static pages (home, about, resume, projects, skills) plus dynamic blog pages generated from Markdown files.
• It runs on Vercel as a static‐and‐serverless deployment (SSG for most routes, serverless functions for dynamic API routes).
File Structure
• Top‐level configuration (next.config.ts, tsconfig.json, tailwind.config.ts, eslint + prettier + GitHub workflows).
• public/: static assets (images, resume PDF, admin panel).
• posts/: Markdown blog posts as content source.
• src/app/: Next.js App Router—
• layout.tsx and globals.css define site‐wide layout and styling.
• page.tsx implements the homepage.
• /api/blogs/[slug]/route.ts is a serverless function that reads Markdown for each blog slug.
• /blogs/[slug]/page.tsx renders each blog’s content.
• src/components/: React UI components (Hero, About, Experience, Projects, Skills, and smaller UI elements under UI/).
• src/hooks/: custom hooks (e.g., useInView).
• src/data.ts and src/types.ts: data definitions and TypeScript types.
README for Additional Insights
• Emphasizes responsive design, dark/light mode, timeline UI, performance optimizations (image lazy loading, SSG, minimal CSS).
• Mentions deployment on Vercel and customization points.
a. Main Components
• Client (Browser)
• Next.js Application
• App Router (layout, pages, dynamic routes)
• Serverless API Routes (for blog content)
• Tailwind CSS + global styling
• Content Source (Markdown files in posts/)
• Public Assets (images, resume.pdf)
• Hosting/Delivery (Vercel CDN + Edge network)
b. Relationships and Data Flow
• Browser → CDN edge: request for /, /about, /blogs/[slug]
• CDN edge → Next.js SSG or SSR pipeline
• Serverless Function (API route) reads from filesystem (posts/) → returns JSON/HTML
• Next.js renderer hydrates React components → CSS from Tailwind + global CSS
• Static assets served directly from public/
c. Architectural Patterns
• Static Site Generation (SSG) for pages without dynamic data
• Server‐Side Rendering (SSR)/Dynamic Page Generation for blogs via serverless functions
• Component‐Based UI—modular React components under src/components/
• File‐based routing (App Router)
d. Key Technologies & Frameworks
• Next.js 15 (App Router, Image optimization, API routes)
• TypeScript (type safety)
• Tailwind CSS (utility‐first styling)
• Vercel (hosting, CDN, serverless)