How mittal-parth/personal-portfolio works
Main Components
• Frontend (Client Side):
• The core of the application resides under the "src" directory. This includes:
▪ React components (e.g., Hero, Skills & Experience, Projects, BlogPosts, etc.) that represent different sections of the portfolio.
▪ Assets and constants that manage personal information and images.
▪ Helper functions and additional style files.
• The entry point is "src/main.jsx" which bootstraps the entire React app.
• Static Files & HTML:
• "index.html" acts as the main HTML file loaded initially.
• The "public" directory contains any static assets needed by the app.
• Serverless Functions/Backend:
• The "netlify/functions" directory contains functions such as "fetchContributions.js" that are executed server-side on Netlify to fetch dynamic data (e.g., open source contributions from GitHub).
• Configuration & Deployment:
• Files like ".env.example", "netlify.toml", "tailwind.config.cjs", and "vite.config.js" indicate how the environment is set up. They also detail integration points with tools (e.g., environment variable management on Netlify).
Relationships and Interactions
• The User connects to the frontend, which is rendered by React.
• The React components interact with each other to display sections of the portfolio, pulling personal data from a constants file and assets.
• For dynamic content (like GitHub contributions), the React components communicate (via API calls) to serverless functions (running on Netlify), which in turn may access external APIs (GitHub).
• The environment variables (.env) configure sensitive data (like GitHub tokens) used by these serverless functions.
Architectural Patterns and Design Principles
• Single-Page Application (SPA) architecture driven by React, with clear separation between view components and data/configuration (maintained in the "constants" and "assets" directories).
• The use of serverless functions introduces a microservice-like approach for specific dynamic tasks (e.g., fetching contributions).
• Code modularity is evident with separation into reusable components, helper functions ("src/lib/helperFunctions.js"), and static resources.
• The project follows standard deployment practices for a modern web application, especially with integration to Netlify for hosting and continuous deployment.