# shreeram800/dropit-frontend architecture

> Architecture diagram of the GitHub repository shreeram800/dropit-frontend, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shreeram800/dropit-frontend
- Repository: https://github.com/shreeram800/dropit-frontend

## Overview

##### Main Components Identification

a) Frontend Layer (React/TypeScript based):
- User Interface (src/components)
- Authentication System (src/contexts/AuthContext.tsx)
- Page Components (src/pages)
- Firebase Integration (src/firebase.ts)

b) Backend Services (mentioned in README):
- Spring Boot Backend
- PostgreSQL Database
- Authentication Service (Firebase)

##### Component Relationships

- Frontend → Firebase Auth (Authentication flow)
- Frontend → Backend API (REST/HTTP requests)
- Backend Services → Database (Data persistence)
- Backend Services → Firebase Auth (Token verification)

##### Specific Implementation Details

Technical aspects:
**Frontend (React/TypeScript):**
- Authentication Flow
- Login/Register Components
- AuthContext Provider
- Core Features
- Delivery Request Management
- User Profile Management
- Search/Match Interface
- Firebase Integration

**Backend (Spring Boot):**
- API Controllers
- Service Layer
- Data Access Layer
- Security Layer

##### Important Notes

- Clear separation between frontend and backend
- Security implementation with Firebase
- Scalability points
- API endpoints and their purposes
- Database relationships
- Environment configurations

##### Technical Stack Indicators

- Frontend: React, TypeScript, Vite
- Backend: Spring Boot, Java
- Database: PostgreSQL
- Authentication: Firebase
- Build Tools: Maven
- Containerization: Docker

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        UI["User Interface"]:::frontend
        AC["Authentication Context"]:::frontend
        click AC "https://github.com/shreeram800/Dropit-Frontend/blob/main/src/contexts/AuthContext.tsx"
        PR["Page Routes"]:::frontend
        FI["Firebase Integration"]:::frontend
        click FI "https://github.com/shreeram800/Dropit-Frontend/blob/main/src/firebase.ts"
        
        subgraph Components
            NAV["Navigation"]:::frontend
            click NAV "https://github.com/shreeram800/Dropit-Frontend/blob/main/src/components/Navbar.tsx"
            MAIN["Main App"]:::frontend
            click MAIN "https://github.com/shreeram800/Dropit-Frontend/blob/main/src/App.tsx"
            ENTRY["Entry Point"]:::frontend
            click ENTRY "https://github.com/shreeram800/Dropit-Frontend/blob/main/src/main.tsx"
        end
        
        subgraph Pages
            LP["Landing Page"]:::frontend
            click LP "https://github.com/shreeram800/Dropit-Frontend/blob/main/src/pages/LandingPage.tsx"
            DR["Delivery Requests"]:::frontend
            click DR "https://github.com/shreeram800/Dropit-Frontend/blob/main/src/pages/AddDeliveryRequest.tsx"
            VR["View Requests"]:::frontend
            click VR "https://github.com/shreeram800/Dropit-Frontend/blob/main/src/pages/ViewRequests.tsx"
            LOGIN["Login"]:::frontend
            click LOGIN "https://github.com/shreeram800/Dropit-Frontend/blob/main/src/pages/Login.tsx"
            REG["Register"]:::frontend
            click REG "https://github.com/shreeram800/Dropit-Frontend/blob/main/src/pages/Register.tsx"
        end
        
        subgraph Configuration
            TS["TypeScript Config"]:::config
            click TS "https://github.com/shreeram800/Dropit-Frontend/blob/main/tsconfig.json"
            VITE["Vite Config"]:::config
            click VITE "https://github.com/shreeram800/Dropit-Frontend/blob/main/vite.config.ts"
            TW["Tailwind Config"]:::config
            click TW "https://github.com/shreeram800/Dropit-Frontend/blob/main/tailwind.config.js"
            CSS["Global Styles"]:::config
            click CSS "https://github.com/shreeram800/Dropit-Frontend/blob/main/src/index.css"
        end
    end
    
    subgraph Services
        UMS["User Management Service"]:::backend
        DMS["Delivery Management Service"]:::backend
        PPS["Payment Processing Service"]:::backend
        SMS["Search/Match Service"]:::backend
    end
    
    subgraph Data
        DB[(PostgreSQL)]:::database
        FA["Firebase Auth"]:::external
    end
    
    %% Relationships
    UI --> AC
    UI --> FI
    UI --> PR
    AC --> FA
    FI --> FA
    
    UMS --> DB
    DMS --> DB
    PPS --> DB
    SMS --> DB
    
    UI --> UMS
    UI --> DMS
    UI --> PPS
    UI --> SMS
    
    Services --> FA
    
    %% Styles
    classDef frontend fill:#2196F3,stroke:#1565C0,color:white
    classDef backend fill:#4CAF50,stroke:#2E7D32,color:white
    classDef database fill:#FF9800,stroke:#F57C00,color:white
    classDef external fill:#9C27B0,stroke:#7B1FA2,color:white
    classDef config fill:#607D8B,stroke:#455A64,color:white
    
    %% Legend
    subgraph Legend
        F[Frontend]:::frontend
        B[Backend]:::backend
        D[(Database)]:::database
        E[External Service]:::external
        C[Configuration]:::config
    end
```
