# neeharprem/tasker-client architecture

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

- Interactive diagram: https://gitdiagram.com/neeharprem/tasker-client
- Repository: https://github.com/neeharprem/tasker-client

## Overview

##### Main Components

a. Client-Side Architecture:
- Frontend Application (React + TypeScript)
- State Management (Redux - evident from the store directory)
- API Layer
- Component Structure
- Routing System

##### Specific Elements

Frontend Architecture:
**[Vite Dev Server] → [index.html] → [main.tsx] → [App.tsx]**
- ↓
- [React Components] ← → [Redux Store]
- ↓
- [API Client Layer]
- ↓
- [External Services]

Component Hierarchy:
**App.tsx**
- Pages
- Auth.tsx
- Home.tsx
- Common Components
- Header.tsx
- AuthForm.tsx
- Calendar.tsx
- Modal Components
- TaskListModal.tsx
- TaskModal.tsx
- UpdateModal.tsx

##### Important Architectural Patterns to Highlight

- Feature-based Directory Structure
- Component Composition
- Centralized State Management
- Service Layer Pattern
- Modal Pattern for UI/UX

##### Technical Stack Indicators

- React + TypeScript
- Vite Build Tool
- Redux State Management
- TailwindCSS (noted from configuration files)
- ESLint for code quality

##### Data Flow Patterns

Following flows:
- Component → Redux Action → Redux Store → Component Update
- Component → API Client → External Service → Redux Store → Component Update
- Auth Flow: AuthForm → Auth Service → Redux Store → Protected Routes

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Development Environment"
        ViteServer["Vite Dev Server"]
        IndexHTML["index.html"]
        MainTSX["main.tsx"]:::entry
    end

    subgraph "Frontend Core"
        AppTSX["App.tsx"]:::core
        Router["React Router"]
    end

    subgraph "Pages"
        AuthPage["Auth.tsx"]:::page
        HomePage["Home.tsx"]:::page
    end

    subgraph "Common Components"
        Header["Header.tsx"]:::component
        AuthForm["AuthForm.tsx"]:::component
        Calendar["Calendar.tsx"]:::component
    end

    subgraph "Modal Components"
        TaskListModal["TaskListModal.tsx"]:::modal
        TaskModal["TaskModal.tsx"]:::modal
        UpdateModal["UpdateModal.tsx"]:::modal
    end

    subgraph "State Management"
        ReduxStore["Redux Store"]:::store
        AuthSlice["Auth Slice"]:::store
    end

    subgraph "API Layer"
        APIClient["API Client"]:::api
        APIServices["API Services"]:::api
        Endpoints["Endpoints"]:::api
    end

    %% Connections
    ViteServer --> IndexHTML
    IndexHTML --> MainTSX
    MainTSX --> AppTSX
    AppTSX --> Router
    Router --> AuthPage
    Router --> HomePage

    AppTSX --> Header
    AppTSX --> Calendar
    AuthPage --> AuthForm

    HomePage --> TaskListModal
    HomePage --> TaskModal
    HomePage --> UpdateModal

    AuthForm --> ReduxStore
    ReduxStore --> AuthSlice
    
    AppTSX --> APIClient
    APIClient --> APIServices
    APIServices --> Endpoints

    %% Click Events
    click MainTSX "https://github.com/NeeharPrem/Tasker-client/blob/main/src/main.tsx"
    click AppTSX "https://github.com/NeeharPrem/Tasker-client/blob/main/src/App.tsx"
    click Header "https://github.com/NeeharPrem/Tasker-client/blob/main/src/components/common/Header.tsx"
    click AuthForm "https://github.com/NeeharPrem/Tasker-client/blob/main/src/components/common/AuthForm.tsx"
    click Calendar "https://github.com/NeeharPrem/Tasker-client/blob/main/src/components/common/Calender.tsx"
    click TaskListModal "https://github.com/NeeharPrem/Tasker-client/blob/main/src/components/modal/TaskListModal.tsx"
    click TaskModal "https://github.com/NeeharPrem/Tasker-client/blob/main/src/components/modal/TaskModal.tsx"
    click UpdateModal "https://github.com/NeeharPrem/Tasker-client/blob/main/src/components/modal/UpdateModal.tsx"
    click AuthPage "https://github.com/NeeharPrem/Tasker-client/blob/main/src/pages/Auth.tsx"
    click HomePage "https://github.com/NeeharPrem/Tasker-client/blob/main/src/pages/Home.tsx"
    click ReduxStore "https://github.com/NeeharPrem/Tasker-client/blob/main/src/store/store.tsx"
    click AuthSlice "https://github.com/NeeharPrem/Tasker-client/blob/main/src/store/slices/authSlice.ts"
    click APIClient "https://github.com/NeeharPrem/Tasker-client/blob/main/src/api/apiClient.tsx"
    click APIServices "https://github.com/NeeharPrem/Tasker-client/blob/main/src/services/api.ts"
    click Endpoints "https://github.com/NeeharPrem/Tasker-client/blob/main/src/services/endpoints.ts"

    %% Styling
    classDef entry fill:#f9f,stroke:#333,stroke-width:2px
    classDef core fill:#bbf,stroke:#333,stroke-width:2px
    classDef component fill:#ddf,stroke:#333,stroke-width:1px
    classDef modal fill:#fdd,stroke:#333,stroke-width:1px
    classDef store fill:#d9f,stroke:#333,stroke-width:1px
    classDef api fill:#9f9,stroke:#333,stroke-width:1px
    classDef page fill:#ffd,stroke:#333,stroke-width:1px

    %% Legend
    subgraph Legend
        L1["Entry Point"]:::entry
        L2["Core Component"]:::core
        L3["Common Component"]:::component
        L4["Modal Component"]:::modal
        L5["State Management"]:::store
        L6["API Layer"]:::api
        L7["Page Component"]:::page
    end
```
