How adrianhajdin/portfolio_website works
Project type and purpose
• This is a client-side heavy personal portfolio website built with React and Next.js. Its primary purpose is to serve as a developer’s resume/business card, showcasing accomplishments, projects, timeline, technologies, etc., as a statically generated or server-rendered site.
File structure
• Top-level files: .babelrc, package.json, next.js config files, README.md
• public/: static assets (images, favicon, etc.)
• src/pages/: Next.js page and API route definitions
• index.js (home page)
• _app.js / _document.js (app‐wide wrappers, custom server document)
• api/hello.js (example serverless API endpoint)
• src/components/: reusable React UI components (Hero, Header, Footer, Projects, Timeline, etc.)
• src/layout/: layout component wrapping pages
• src/styles/ & src/themes/: global styles, theme definitions, styled-component configurations
• src/constants/: shared constants used across components
• package.json & lock: dependencies (React, Next.js, styled-components, etc.)
README for additional insights
• It confirms use of React + Next.js, NPM scripts for build/start
• Mentions the project is a tutorial to create a personal portfolio
• No external database or microservice; just a demo API route
Main components and interactions
a. Components
• User’s Browser (client)
• Next.js Application (hosted on Vercel, Netlify, or custom Node.js server)
• Static Asset Store / CDN (serving public/ and .next/static/)
• React Components Library (Header, Hero, Projects, Timeline, Footer, etc.)
• Layout & Theming Layer (global styles, themes, Layout.js)
• API Layer (Next.js serverless function at /api/hello)
• Build Process (Webpack/Babel via Next.js → SSG/SSR artifacts)
b. Relationships & interactions
• Browser → Next.js Server: HTTP GET / → responds with SSR or cached static HTML + JS bundle
• Browser → CDN: fetch CSS, JS, images from public/ and .next/static/
• React Components composed inside Layout to render the page
• Browser → API Endpoint (/api/hello) for dynamic data calls (optional demo)
• Build Process pulls src/pages & src/components → outputs static assets + serverless functions
c. Architectural patterns & design principles
• Component-based UI (atomic React components, styled via styled-components or CSS-in-JS)
• Page-level routing (file-based routing via Next.js)
• Hybrid static + server-side rendering (SSG at build, SSR/per-request for dynamic pages)
• Theming / centralized styles (GlobalComponents, theme.js)
d. Key technologies/frameworks/libraries
• Next.js (routing, SSR/SSG, API routes)
• React
• styled-components or CSS-in-JS for styling
• Node.js (server/runtime for API)
• Webpack/Babel (build toolchain)