# hossainarif37/parcel-care-client architecture

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

- Interactive diagram: https://gitdiagram.com/hossainarif37/parcel-care-client
- Repository: https://github.com/hossainarif37/parcel-care-client

## Overview

##### Main System Components

a) Frontend Layer (React Application)
- Public Area (Home, Authentication)
- User Dashboard
- Agent Dashboard
- Admin Dashboard

b) State Management Layer
- A Redux store component showing:
- API Slices (auth, parcel, transaction, user)
- State Slices (navbar, user)

c) Backend Services (Reference to External System)
- Connection to the separate backend service
- Integration points with:
- Stripe Payment Service
- Cloudinary (for image storage)

##### Component Relationships

- Data flow between dashboard components and Redux store
- API communication paths to backend services
- File upload flow to Cloudinary
- Payment processing flow through Stripe

##### Detailed Component Breakdown

**Frontend (React + TypeScript)**
- Public Components
- Navbar
- Banner
- Authentication
- Dashboard Components
- User Dashboard
- Parcel Booking
- Tracking
- Payments
- Agent Dashboard
- Pickup List
- Delivery List
- Reviews
- Admin Dashboard
- User Management
- Agent Management
- Transaction Management

##### Technical Stack Indicators

- React.js
- Redux
- Tailwind CSS
- TypeScript
- External APIs (Stripe, Cloudinary)

##### Data Flow Patterns

Highlight:
- API request/response paths
- State management flow
- User authentication flow
- File upload process
- Payment processing sequence

##### Service-based integration

Level of Detail:

Remember to:
- Use clear, consistent naming
- Primary data flows
- Security boundaries
- Integration points
- Error handling paths

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Frontend
        PublicArea["Public Area"]
        Auth["Authentication System"]
        UserDash["User Dashboard"]
        AgentDash["Agent Dashboard"]
        AdminDash["Admin Dashboard"]
        NavBar["Navigation System"]
        SharedComp["Shared Components"]
        DashLayout["Dashboard Layout"]
    end

    subgraph StateManagement
        ReduxStore["Redux Store"]
        APILayer["API Integration Layer"]
        StateSlices["State Management Slices"]
    end

    subgraph ExternalServices
        Backend["Backend API"]
        Stripe["Stripe Payment"]
        Cloudinary["Cloudinary Storage"]
    end

    subgraph UserFeatures
        ParcelBook["Parcel Booking"]
        ParcelTrack["Parcel Tracking"]
        PaymentProc["Payment Processing"]
        Profile["User Profile"]
    end

    subgraph AdminFeatures
        AgentMgmt["Agent Management"]
        TransMgmt["Transaction Management"]
    end

    %% Component Relationships
    PublicArea --> Auth
    Auth --> DashLayout
    DashLayout --> UserDash
    DashLayout --> AgentDash
    DashLayout --> AdminDash
    NavBar --> Auth

    UserDash --> UserFeatures
    AdminDash --> AdminFeatures

    UserFeatures --> ReduxStore
    AdminFeatures --> ReduxStore
    ReduxStore --> APILayer
    APILayer --> Backend
    PaymentProc --> Stripe
    ParcelBook --> Cloudinary

    %% Click Events
    click PublicArea "https://github.com/hossainarif37/parcel-care-client/tree/main/src/pages/Home"
    click Auth "https://github.com/hossainarif37/parcel-care-client/tree/main/src/pages/Auth"
    click UserDash "https://github.com/hossainarif37/parcel-care-client/tree/main/src/pages/Dashboard/User"
    click AgentDash "https://github.com/hossainarif37/parcel-care-client/tree/main/src/pages/Dashboard/Agent"
    click AdminDash "https://github.com/hossainarif37/parcel-care-client/tree/main/src/pages/Dashboard/Admin"
    click ReduxStore "https://github.com/hossainarif37/parcel-care-client/blob/main/src/redux/store.ts"
    click APILayer "https://github.com/hossainarif37/parcel-care-client/tree/main/src/redux/api/endpoints"
    click StateSlices "https://github.com/hossainarif37/parcel-care-client/tree/main/src/redux/slices"
    click NavBar "https://github.com/hossainarif37/parcel-care-client/tree/main/src/pages/Home/components/Navbar"
    click SharedComp "https://github.com/hossainarif37/parcel-care-client/tree/main/src/components"
    click PaymentProc "https://github.com/hossainarif37/parcel-care-client/tree/main/src/pages/Dashboard/User/Payment"
    click ParcelTrack "https://github.com/hossainarif37/parcel-care-client/tree/main/src/pages/Dashboard/User/ParcelTracking"
    click Profile "https://github.com/hossainarif37/parcel-care-client/tree/main/src/pages/Dashboard/components/Profile"
    click ParcelBook "https://github.com/hossainarif37/parcel-care-client/tree/main/src/pages/Dashboard/User/BookParcel"
    click AgentMgmt "https://github.com/hossainarif37/parcel-care-client/tree/main/src/pages/Dashboard/Admin/AllAgents"
    click TransMgmt "https://github.com/hossainarif37/parcel-care-client/tree/main/src/pages/Dashboard/Admin/Transactions"
    click DashLayout "https://github.com/hossainarif37/parcel-care-client/blob/main/src/pages/Dashboard/DashboardLayout.tsx"

    %% Styling
    classDef frontend fill:#2563eb,color:white
    classDef state fill:#16a34a,color:white
    classDef external fill:#9333ea,color:white
    classDef feature fill:#ea580c,color:white

    class PublicArea,Auth,UserDash,AgentDash,AdminDash,NavBar,SharedComp,DashLayout frontend
    class ReduxStore,APILayer,StateSlices state
    class Backend,Stripe,Cloudinary external
    class ParcelBook,ParcelTrack,PaymentProc,Profile,AgentMgmt,TransMgmt feature
```
