# jaswanth-datso/test-portfolio architecture

> Architecture diagram of the GitHub repository jaswanth-datso/test-portfolio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jaswanth-datso/test-portfolio
- Repository: https://github.com/jaswanth-datso/test-portfolio

## Overview

##### Project type and purpose
- This is a static, single‐page portfolio website built with React and Tailwind CSS.
- It’s deployed serverlessly on Vercel, with Firebase used for the contact form and email functionality.

##### File structure
- Top-level:
- package.json, vite.config.ts: build & dev tooling with Vite
- public/: static assets (JSON animations, Google validation HTML, shell scripts)
- src/: application sources
– src/Pages/: page‐level React components (Home, About, Portfolio, Contact, etc.)
– src/components/: smaller UI pieces (Navbar, Modal, CardProject, etc.)
– src/firebase.js: Firebase SDK initialization
– src/main.jsx & src/App.jsx: app entrypoint and router/page composition
- Configuration files: Tailwind (tailwind.config.js), ESLint, TypeScript config (tsconfig.*.json).

##### README
- Confirms React + Tailwind frontend, Vercel hosting.
- Firebase for backend services (contact form, email).
- Features: project showcase, skills section, responsive design.

##### Main components
a. Frontend (React SPA)
- Browser Client
- Served by Vercel CDN
- Static assets from public/ directory (animations, validation file)
b. Backend & Services
- Firebase (Realtime Database or Firestore) for form submissions
- Firebase Cloud Functions or Email Service for sending emails
c. Hosting & Deployment
- Vercel (GitHub integration ⇒ automatic builds & deploys)
d. External services
- Google APIs (if used for Lottie animations or analytics)

##### Relationships and interactions
- User’s Browser ⇒ HTTP GET to Vercel CDN ⇒ React SPA loaded
- React SPA ⇒ Reads local JSON animations/assets from /public
- When user submits the Contact form ⇒ React invokes Firebase SDK (firebase.js) ⇒ writes data to Firestore and triggers Cloud Function ⇒ sends email
- Continuous deployment pipeline: GitHub push ⇒ Vercel Build ⇒ Deploy to global CDN

##### Architectural patterns & tech highlights
- Single Page Application (client-side routing)
- Component-based UI (Atoms/Molecules in src/components vs. Pages)
- Serverless backend (Firebase SDK + Cloud Functions)
- Infrastructure as Code: Vercel handles hosting without explicit server management
- Build tool: Vite for fast local dev and optimized production bundles

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Side
    subgraph "Client Side"
        Browser["User's Browser"]:::frontend
        subgraph "React Application"
            EntryMain["src/main.jsx"]:::frontend
            EntryApp["src/App.jsx"]:::frontend
            Pages["src/Pages/"]:::frontend
            UIComp["src/components/"]:::frontend
            AnimAsset["src/assets/homeAnimation.json"]:::frontend
        end
        StaticAssets["public/ (JSON, HTML, scripts)"]:::frontend
    end

    %% Hosting & CI/CD
    subgraph "Hosting & CI/CD"
        GitHub["GitHub Repo"]:::infra
        VercelBuild["Vercel Build & Deploy (package.json)"]:::infra
        CDN["Vercel CDN"]:::infra
    end

    %% Backend Services
    subgraph "Backend Services"
        FirebaseInit["src/firebase.js"]:::backend
        Firestore["Firestore Database"]:::backend
        Functions["Cloud Functions"]:::backend
        EmailSvc["Email Service"]:::backend
    end

    %% Connections
    Browser -->|GET index.html| CDN
    CDN --> Browser
    CDN --> StaticAssets
    Browser --> ReactApplication[/"React Application Loaded"/]
    ReactApplication --> EntryMain
    ReactApplication --> EntryApp
    ReactApplication --> Pages
    ReactApplication --> UIComp
    ReactApplication --> AnimAsset
    ReactApplication --> StaticAssets
    ReactApplication --> FirebaseInit

    FirebaseInit --> Firestore
    FirebaseInit --> Functions
    Functions --> EmailSvc

    GitHub -->|push| VercelBuild
    VercelBuild --> CDN

    %% Click Events
    click Browser "https://github.com/jaswanth-datso/test-portfolio/blob/main/index.html"
    click EntryMain "https://github.com/jaswanth-datso/test-portfolio/blob/main/src/main.jsx"
    click EntryApp "https://github.com/jaswanth-datso/test-portfolio/blob/main/src/App.jsx"
    click Pages "https://github.com/jaswanth-datso/test-portfolio/tree/main/src/Pages/"
    click UIComp "https://github.com/jaswanth-datso/test-portfolio/tree/main/src/components/"
    click StaticAssets "https://github.com/jaswanth-datso/test-portfolio/tree/main/public/"
    click AnimAsset "https://github.com/jaswanth-datso/test-portfolio/blob/main/src/assets/homeAnimation.json"
    click FirebaseInit "https://github.com/jaswanth-datso/test-portfolio/blob/main/src/firebase.js"
    click VercelBuild "https://github.com/jaswanth-datso/test-portfolio/blob/main/package.json"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#004085,color:#004085;
    classDef backend fill:#d4edda,stroke:#155724,color:#155724;
    classDef infra fill:#fff3cd,stroke:#856404,color:#856404;
```
