How harshitsilly/portfolio works
Project type and purpose
• This is a personal website built with Next.js. The project contains pages for blog posts, career information, wedding details, projects, bucket lists, and more.
• The README indicates planned feature expansions (integration with MDX, code snippets, linking to a Wix blog, etc.) so the system is designed for both content presentation and extensibility.
File structure and key architectural elements
• The top-level directories include configuration files (.nvmrc, next.config.js, package.json, etc.), a public folder for static assets (images, resume), pages (Next.js routing), and a src folder that contains more granular, component-level code.
• The src folder is organized into logical subdirectories:
• atoms: low-level, reusable UI elements (e.g., Button, Link, Navbar, etc.)
• components: composite or layout components (such as Avtar, Tag, layout components like header and footer)
• module: feature-specific modules like Blog, Career, BucketList, Projects, Wedding, and Intro; these represent the primary content areas of the website and encapsulate related UI and data.
• utils: custom hooks and helper functions.
• svg: SVG assets used within the UI.
• The pages folder follows Next.js conventions to create routes corresponding to each section of the site (blog, career, projects, etc.) and also includes styling with SCSS.
• There is also a scripts directory that appears to include tooling (e.g., an image processing script using libwebp binaries) which might be used in optimizing images before serving them.
Main components
a. Frontend/UI (Next.js Application):
• Pages: Represented by the Next.js pages folder (/_app.js, blog routes, mobile routes, etc.).
• Feature Modules: Present in src/module (e.g., Blog, Career, Projects, BucketList, Wedding, Intro) that structure content and functionality.
b. Static Assets & Public Resources:
• Public directory (images, resume.pdf) containing the static assets.
c. Utility and Helper Services:
• Scripts for image processing (located in scripts, including library wrappers around libwebp).
• Utility functions and custom hooks in src/utils.
d. Configuration and Build:
• Project configuration files (next.config.js, .prettierrc, .nvmrc, package.json) drive how the project is built and deployed.
• Storybook for UI development (the .storybook folder).
e. Data Sources:
• MDX and other data files under src/module paths serving as content (e.g., blog post MDX files for the blog, career markdown content).
Relationships and interactions
• The Next.js pages interact with feature modules: For example, the /pages/blog/[[...tag]].js route invokes the Blog module in src/module/Blog.
[Pages] → [Modules (Blog, Career, etc.)] → [Components/Atoms].
• Utility functions in src/utils are used by both modules and components.
• Scripts (in the scripts directory) may be initiated during build time or as part of a pre-deployment pipeline for image processing.
• The public directory hosts static content that is directly referenced by the UI.
Architectural patterns/design principles
• Component-Driven Design: The extensive use of “atoms” and component modules suggests adherence to atomic design principles for UI development.
• Separation of Concerns: Pages (routing/view layer) vs. modules (feature layer) vs. components (presentation layer) clearly separate responsibilities.
• Extensibility: Planned features (MDX integration and code snippets) reflect that the architecture is built to be extended in future versions.
• Next.js conventions: Using file-based routing and structured modules contributes to a well-organized, maintainable architecture.