How denil-neil/personal-website works
Project Type and Purpose
• This is a front‐end web application bootstrapped with Create React App.
• The project uses React for its UI, supports different environments via npm scripts (start, build, test), and deploys to Firebase Hosting.
• The presence of Firebase configuration (firebase.json, .firebase folder) and GitHub Actions workflows indicates an automated CI/CD pipeline for deploying the static build to Firebase.
Analyzing the File Structure
• Top-level files and directories include:
– /src folder: Contains the React app’s components, pages, assets, utilities, styles, and route configuration.
– /public folder: Provides static HTML and manifest files used during development and build.
– /build folder: Houses the production-ready static files produced by running “npm run build.”
– Firebase related files (.firebase, firebase.json): Configurations for deploying the app to Firebase Hosting.
– .github/workflows: Contains CI/CD pipeline workflows for automating deployment (e.g., firebase-hosting-merge.yml, firebase-hosting-pull-request.yml).
• This structure clearly separates source code, static assets needed for production, and deployment configurations.
a. Frontend Application (React App):
– Components and pages (e.g., HomePage, About, Skills, canvas components, loaders, typewriter effects).
– Routing setup via AppRoutes.js.
– The development and production modes (npm scripts for "start" and "build").
b. Build & Deployment Pipeline:
– Build Process: npm scripts that transpile, bundle, and optimize the React app into the /build folder.
– Source Code Repository: GitHub repository where the code resides.
– CI/CD Pipeline: GitHub Actions workflows which run tests and trigger builds, then deploy to Firebase Hosting.
c. Deployment Environment:
– Firebase Hosting: Uses firebase.json and related configuration files to serve the built application.
– End-User Client (Browser): Requests the application, receives the static assets (HTML, CSS, JS) from Firebase.
Establishing Relationships and Data Flow
• Developer commits code to the repository.
• On commit or pull request:
– GitHub Actions workflows are triggered; they run tests, build the application, and deploy it to Firebase Hosting.
• The Firebase Hosting server serves static assets (such as index.html and bundled JS/CSS) to the browser.
• The browser renders the SPA (Single Page Application) and interacts with the user.
• The separation between build (development vs. production) is clearly delineated.
Architectural Patterns and Design Principles
• Single Page Application (SPA) approach supported by React.
• Separation of development and production environments.
• Continuous Integration/Continuous Deployment (CI/CD) using GitHub Actions combined with a cloud-hosted deployment (Firebase).
• Modular component design in React, with clear separation of concerns (assets, components, pages, routing).