How kimurash/nextjs-portfolio works
Project type and purpose
• This is a personal portfolio website built with Next.js (using the App Router) and Tailwind CSS, written in TypeScript.
• It serves static and dynamic pages (About, Skills, Products, Contact, Resume) and exposes a single API endpoint for the contact form that integrates with external services (reCAPTCHA, Resend).
File structure
• Top-level “app” folder: Next.js App Router pages and layouts.
• app/layout.tsx, globals.css – global layout and styles
• app/about, app/skills, app/products, app/contact – page directories each with page.tsx, components, constants, hooks, types.
• app/api – serverless API route(s) for contact form.
• “components” folder: shared UI and layout components (Header, Footer, Buttons, Forms, Inputs).
• “lib” folder: utility functions and Zod schemas for validation.
• “public” folder: static assets (images for products, certifications, skills, resume).
• Config and dev tooling: next.config.ts, postcss.config.mjs, biome.json, pnpm-lock.yaml.
• Empty placeholder directories for services, stores, hooks, tests, types (ready for future expansion).
README for stack and behavior
• Next.js with Turbopack for dev, SSR/SSG at build time, environment variables for contact.
• Tailwind CSS for styling, Biome for linting/formatting.
• Resend API and reCAPTCHA for contact-form handling.
• Hosted on Vercel.
a. Main components
1. Browser / Client: React UI rendered by Next.js (hybrid SSR/SSG).
2. Next.js Application (hosted on Vercel):
• App Router pages & layouts
• Shared UI components
• API Route (contacts)
3. Static Assets CDN: images, CSS, JS bundles (served by Vercel).
4. External Services:
• Google reCAPTCHA (verification)
• Resend Email API (sending contact emails)
b. Relationships & data flow
• User → HTTP GET → Next.js (SSR/SSG) → HTML/CSS/JS → Browser
• On Contact form submit:
Browser → API Route (/api/contact)
→ Validate reCAPTCHA → Validate payload via Zod schemas → Call Resend API → Return success/failure to Browser
c. Architectural patterns & design principles
• Component-based UI (atomic/shared UI + layout + page-specific components)
• App Router (file-based routing)
• Utility abstraction in “lib” (schemas, utils) for shared logic
• Serverless functions for backend logic (zero-server maintenance)
• CDNs and edge hosting via Vercel for performance
d. Key technologies & frameworks
• Next.js (App Router, SSR & SSG)
• React + TypeScript
• Tailwind CSS
• Biome (linter/formatter)
• Zod (runtime schema validation)
• Resend (email)
• reCAPTCHA (bot protection)
• Vercel (hosting/CDN)