How bettinasosa/portfolio works
Project type and purpose
• This is a full-stack, server-side rendered (SSR) / statically-generated portfolio website built with Next.js and deployed on Vercel.
• It serves marketing-style pages (home, about, blog, projects, contact) along with lightweight API endpoints that fetch GitHub activity and Spotify data.
File structure
• Top-level: next.config.js, package.json, Tailwind and PostCSS configs, tsconfig.json → build & toolchain
• public/ → static assets (images, fonts, robots.txt, etc.)
• src/app/ → Next.js App Router: page.tsx files define routes, plus server/client components.
• api/ → serverless API routes for GitHub & Spotify integrations
• app/about, blog, contact, gallery, projects, page.tsx → page entrypoints
• layout.tsx, template.tsx, globals.css → shared layout & styling
• src/components/ → reusable UI and animation primitives
• src/hooks/, src/lib/ → custom React hooks and utilities
• components.json & OldHtmlFiles/ → legacy content (not part of core runtime)
README for insights
• Confirms Next.js framework, deployed on Vercel
• Highlights performance, SEO, responsiveness → implies use of SSG/SSR, image optimization, responsive CSS (Tailwind)
Main components & their relationships
a. Browser (client)
b. CDN / Vercel Edge Network
c. Next.js Application (hosted on Vercel)
– Static page generator (SSG) for public pages
– SSR entrypoint (app folder routing)
– Serverless Functions for API routes (github-activity, spotify-*)
d. Static Asset Store (public/images, CSS, JS bundles)
e. External Services
– GitHub API
– Spotify OAuth & Data API
f. CI/CD (Vercel) – GitHub → Vercel deploy triggers
Architectural patterns & principles
• Folder-based routing (Next.js App Router)
• Hybrid rendering: static generation for unchanging pages, SSR for dynamic data
• Serverless micro-endpoints for external API calls
• Component-driven UI with reusable primitives (atoms/molecules)
• Utility hooks for common data fetching