# denil-neil/personal-website architecture

> Architecture diagram of the GitHub repository denil-neil/personal-website, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/denil-neil/personal-website
- Repository: https://github.com/denil-neil/personal-website

## Overview

##### 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).

## Diagram (Mermaid)

```mermaid
graph TD
    subgraph "Source Code"
        A["React App (Create React App; includes App.js, AppRoutes.js, components & pages)"]:::frontend
        B["Public Static Assets (index.html, manifest, 404.html, robots.txt)"]:::frontend
    end
    C["Build & Test Process (npm scripts: start, build, test)"]:::process
    D["Production Build (/build folder: static assets)"]:::process
    E["CI/CD Pipeline (GitHub Actions Workflows)"]:::pipeline
    F["Firebase Hosting (Configured via firebase.json, .firebase folder)"]:::deployment
    G["Client Browser (End-User)"]:::client

    A -->|"build"| C
    B -->|"assets included"| C
    C -->|"generates"| D
    D -->|"triggers"| E
    E -->|"deploys"| F
    F -->|"serves"| G

    click A "https://github.com/denil-neil/personal-website/tree/main//src"
    click B "https://github.com/denil-neil/personal-website/tree/main//public"
    click D "https://github.com/denil-neil/personal-website/tree/main//build"
    click E "https://github.com/denil-neil/personal-website/tree/main//github/workflows"
    click F "https://github.com/denil-neil/personal-website/blob/main/firebase.json"

    classDef frontend fill:#aee,stroke:#333,stroke-width:2px;
    classDef process fill:#efe,stroke:#333,stroke-width:2px;
    classDef pipeline fill:#fee,stroke:#333,stroke-width:2px;
    classDef deployment fill:#ffe,stroke:#333,stroke-width:2px;
    classDef client fill:#eef,stroke:#333,stroke-width:2px;
```
