How kunalagra/portfolio works
Project Overview
• It’s a front-end portfolio website built using Next.js and Chakra UI.
• The application is structured as a static/dynamic website with separate pages for the homepage, projects archive, and links, alongside a number of reusable UI components.
Main Components
• Client/Browser: Where the portfolio is rendered.
• Next.js Layer: The core framework that handles routing, SSR (if applicable), and static site generation.
• Pages: Found in the “pages” directory – these include _app.js, _document.js, index.js (homepage), projects/index.js, and links/index.js.
• Components: Reusable UI elements from the “components” folder (AboutMe, Card, Certificates, ContactMe, Navbar, etc.) that build the different sections of the pages.
• Assets & Public Files: Static resources such as “assets/data.js”, “public/robots.txt”, “public/site.webmanifest”, and sitemaps that are involved during the build and when rendering the site.
• Hooks: Custom React hooks under “hook” (such as useMediaQuery) which add functionality across components.
• Configuration & Build: Files like next.config.js, next-sitemap.config.js, package.json, and environment examples that define project settings, dependencies, and build options.
• GitHub Workflows & CI/CD: Under .github/workflows, you have automation scripts for deployments (likely integrated with Vercel as mentioned in the README).
Relationships and Interactions
• The Client (browser) makes requests to specific routes (Pages) managed by Next.js.
• Each Page composes multiple UI Components which are imported from the “components” directory.
• The custom Hooks are used by these Components to manage animations, responsiveness, or any custom behavior.
• The “public” folder content and static assets are directly served at runtime.
• Configuration files (next.config.js, package.json) govern build behavior, while GitHub workflows automate tests, integrations, and deployment to services like Vercel.
Architectural Patterns and Design Principles
• Component-Based Architecture: All pages are modularly built from several smaller components.
• File-Based Routing: Next.js conventions allow pages to be automatically routed based on their file structure.
• Separation of Concerns: Configuration, assets, components, and hooks are kept in separate directories.
• CI/CD and GitHub Actions: Deployment automation and dependency management are integrated into the project’s lifecycle.