# lokeshvasnik/progress-tracker architecture

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

- Interactive diagram: https://gitdiagram.com/lokeshvasnik/progress-tracker
- Repository: https://github.com/lokeshvasnik/progress-tracker

## Overview

##### Project Type and Purpose
- CodeUp is a full-stack, single-page web application for daily learning and journaling progress tracking.
- Frontend: React + Vite + Tailwind CSS, hosted on Vercel.
- Backend: Node.js + Express.js API, hosted on Render.
- Database: MongoDB Atlas (accessed via Mongoose).
- Authentication: Firebase Auth (Email/Password + Google).

##### File Structure
- Top-level “frontend” and “backend” directories signal a split client-server architecture.
- Backend follows a simple MVC-style pattern:
- index.js (server entry)
- routes/entries.js (REST endpoints)
- models/Entry.js (Mongoose schema)
- Frontend organized into:
- public/ (static assets, vercel.json)
- src/components/ (UI atoms and helpers)
- src/pages/ (route views)
- src/store/ (client-side state – userStore.js)
- src/firebase.js (Firebase config)
- config files: vite.config.js, tailwind.config.js, eslint.config.js
- Root package.json supports monorepo or dev scripts for both sides.

##### README for Additional Insights
- Tech stack table confirms key services (Recharts, Framer Motion, Firebase, MongoDB Atlas).
- Key features illustrate data flows: authentication → protected routes → CRUD on entries → charting results.
- Deployment targets for frontend and backend.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Tier
    subgraph "Client Tier"
        subgraph "CodeUp Frontend (React SPA)"
            FE_Dir["frontend/"]:::frontend
            ME["frontend/src/main.jsx"]:::frontend
            IH["frontend/index.html"]:::frontend
            VITE["frontend/vite.config.js"]:::frontend
            TAILWIND["frontend/tailwind.config.js"]:::frontend
            ESLINT["frontend/eslint.config.js"]:::frontend
            VERCELCFG["frontend/vercel.json"]:::frontend
            PUBLIC["frontend/public/"]:::frontend
            FIREBASE["frontend/src/components/firebase.js"]:::frontend
            STORE["frontend/src/store/userStore.js"]:::frontend
            BTN["frontend/src/components/Button.jsx"]:::frontend
            LOADER["frontend/src/components/Loader.jsx"]:::frontend
            MODAL["frontend/src/components/Modal.jsx"]:::frontend
            NAV["frontend/src/components/Navbar.jsx"]:::frontend
            PRIV["frontend/src/components/PrivateRoute.jsx"]:::frontend
            CHART["frontend/src/components/ProgressChart.jsx"]:::frontend
            STREAK["frontend/src/components/StreakCard.jsx"]:::frontend
            PAGES["frontend/src/pages/"]:::frontend
            ROUTES["frontend/src/routes.js"]:::frontend
        end
    end

    %% Server Tier
    subgraph "Server Tier"
        subgraph "CodeUp Backend API (Express Server)"
            BACKEND_INDEX["backend/index.js"]:::backend
            ENTRIES_ROUTE["backend/routes/entries.js"]:::backend
            ENTRY_MODEL["backend/models/Entry.js"]:::backend
            BACKEND_PKG["backend/package.json"]:::backend
        end
    end

    %% External Services
    FIREAUTH["Firebase Authentication Service"]:::external
    MONGO["MongoDB Atlas"]:::external

    %% Connections
    userBrowser["User's Browser"]:::external
    userBrowser -->|"HTTPS"| FE_Dir
    FE_Dir -->|"renders SPA"| ME
    ME -->|loads config & assets| IH
    ME -->|uses| VITE
    ME -->|uses| TAILWIND
    ME -->|uses| ESLINT
    ME -->|deploy config| VERCELCFG
    ME -->|serves assets| PUBLIC
    ME -->|imports auth| FIREBASE
    ME -->|imports state| STORE
    ME -->|imports UI components| BTN & LOADER & MODAL & NAV & PRIV
    ME -->|imports viz modules| CHART & STREAK
    ME -->|imports pages| PAGES
    ME -->|defines routes| ROUTES

    FE_Dir -->|"HTTPS REST"| BACKEND_INDEX
    BACKEND_INDEX -->|routes| ENTRIES_ROUTE
    ENTRIES_ROUTE -->|uses model| ENTRY_MODEL
    BACKEND_INDEX -->|env vars| BACKEND_PKG

    BACKEND_INDEX -->|"MongoDB Driver"| MONGO
    BACKEND_INDEX -->|"JWT verification"| FIREAUTH

    FE_Dir -->|"Auth SDK"| FIREAUTH
    FE_Dir -->|"Fetch REST"| BACKEND_INDEX

    %% Click Events
    click FE_Dir "https://github.com/lokeshvasnik/progress-tracker/tree/master/frontend/"
    click ME "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/src/main.jsx"
    click IH "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/index.html"
    click VITE "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/vite.config.js"
    click TAILWIND "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/tailwind.config.js"
    click ESLINT "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/eslint.config.js"
    click VERCELCFG "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/vercel.json"
    click PUBLIC "https://github.com/lokeshvasnik/progress-tracker/tree/master/frontend/public/"
    click FIREBASE "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/src/components/firebase.js"
    click STORE "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/src/store/userStore.js"
    click BTN "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/src/components/Button.jsx"
    click LOADER "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/src/components/Loader.jsx"
    click MODAL "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/src/components/Modal.jsx"
    click NAV "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/src/components/Navbar.jsx"
    click PRIV "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/src/components/PrivateRoute.jsx"
    click CHART "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/src/components/ProgressChart.jsx"
    click STREAK "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/src/components/StreakCard.jsx"
    click PAGES "https://github.com/lokeshvasnik/progress-tracker/tree/master/frontend/src/pages/"
    click ROUTES "https://github.com/lokeshvasnik/progress-tracker/blob/master/frontend/src/routes.js"
    click BACKEND_INDEX "https://github.com/lokeshvasnik/progress-tracker/blob/master/backend/index.js"
    click ENTRIES_ROUTE "https://github.com/lokeshvasnik/progress-tracker/blob/master/backend/routes/entries.js"
    click ENTRY_MODEL "https://github.com/lokeshvasnik/progress-tracker/blob/master/backend/models/Entry.js"
    click BACKEND_PKG "https://github.com/lokeshvasnik/progress-tracker/blob/master/backend/package.json"

    %% Styles
    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef backend fill:#90EE90,stroke:#000,stroke-width:1px
    classDef external fill:#FFA500,stroke:#000,stroke-width:1px
```
