# sharmayaa24/agrisakthi architecture

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

- Interactive diagram: https://gitdiagram.com/sharmayaa24/agrisakthi
- Repository: https://github.com/sharmayaa24/agrisakthi

## Overview

##### Main Components

Frontend Architecture (React Components):
- Divide it into these major sections:
- Authentication Layer (auth screens)
- Role-based Dashboards (Admin, Customer, Vendor)
- Common Components
- Wallet Management
- Transaction Management

##### State Management Layer
- Store Configuration
- Root Reducer
- Root Saga
- Individual Feature Slices:
- Auth Store
- Customer Store
- Wallet Store
- Transaction Store

##### Component Organization

a) Authentication Flow:
**Login → OTP Verification → Registration → Password Management**

b) Dashboard Systems:
**Customer Dashboard ←→ Wallet Management**
- ←→ Transaction History
**Vendor Dashboard  ←→ Transaction Management**
**Admin Dashboard   ←→ User Management**

c) Common Components Layer:
**Graphs/Charts ← Data Visualization**
**Menus        ← Role-based Navigation**
**Interceptors ← API Communication**

##### Data Flow Representation

- User interaction flow
- Redux action dispatches
- Saga effect flows
- API calls through interceptors

**Styles**
- Component Styles
- Global Styles
- Responsive Styles

##### Top Level (Application Container)
**┌─────────────────────────────────────────┐**
- React Application                       │
- ┬──────────────┬───────────┤
- Auth Module │ Dashboards   │ Wallet    │
- ┴──────────────┴───────────┤
- Redux Store                            │
- ┤
- Common Components                       │
- ┘

##### Specific elements
- User role flow paths
- State management cycle
- API integration points
- Component hierarchy
- Style implementation

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and Classes
    classDef ui fill:#3498db,stroke:#2980b9,color:white
    classDef redux fill:#2ecc71,stroke:#27ae60,color:white
    classDef api fill:#e67e22,stroke:#d35400,color:white
    classDef common fill:#95a5a6,stroke:#7f8c8d,color:white

    %% UI Layer
    subgraph UI
        Auth["Authentication Module"]
        Login["Login"]
        Signup["Signup"]
        OTP["OTP Verification"]
        
        DashViews["Dashboard Views"]
        AdminDash["Admin Dashboard"]
        CustDash["Customer Dashboard"]
        VendDash["Vendor Dashboard"]
        
        WalletMgmt["Wallet Management"]
        ViewWallet["View Wallet"]
        UpdateWallet["Update Wallet"]
        PartWallet["Particular Wallet"]
        
        CustMgmt["Customer Management"]
        AddCust["Add Customer"]
        ViewCust["View Customer"]
        UpdateCust["Update Customer"]
        
        TransMgmt["Transaction Management"]
        CustTrans["Customer Transactions"]
        VendTrans["Vendor Transactions"]
        PayList["Payment List"]
    end

    %% Redux Layer
    subgraph StateManagement
        ReduxStore["Redux Store"]
        
        AuthStore["Auth Store"]
        AuthActions["Auth Actions"]
        AuthReducer["Auth Reducer"]
        
        CustStore["Customer Store"]
        CustActions["Customer Actions"]
        CustReducer["Customer Reducer"]
        
        WalletStore["Wallet Store"]
        WalletActions["Wallet Actions"]
        WalletReducer["Wallet Reducer"]
        
        TransStore["Transaction Store"]
        TransActions["Transaction Actions"]
        TransReducer["Transaction Reducer"]
    end

    %% Effects Layer
    subgraph SideEffects
        AuthEffects["Auth Effects"]
        CustEffects["Customer Effects"]
        WalletEffects["Wallet Effects"]
        TransEffects["Transaction Effects"]
    end

    %% Common Components
    Interceptor["API Interceptor"]
    CustomMenu["Custom Menu"]
    Graphs["Graphs"]

    %% Relationships
    Auth --> Login & Signup & OTP
    DashViews --> AdminDash & CustDash & VendDash
    WalletMgmt --> ViewWallet & UpdateWallet & PartWallet
    CustMgmt --> AddCust & ViewCust & UpdateCust
    TransMgmt --> CustTrans & VendTrans & PayList

    ReduxStore --> AuthStore & CustStore & WalletStore & TransStore
    AuthStore --> AuthActions --> AuthReducer
    CustStore --> CustActions --> CustReducer
    WalletStore --> WalletActions --> WalletReducer
    TransStore --> TransActions --> TransReducer

    AuthActions --> AuthEffects
    CustActions --> CustEffects
    WalletActions --> WalletEffects
    TransActions --> TransEffects

    %% Click Events
    click Auth "https://github.com/Sharmayaa24/agriSakthi/tree/main/src/screen/auth/"
    click Login "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/auth/login.jsx"
    click Signup "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/auth/signup.jsx"
    click OTP "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/auth/otp.jsx"
    click AdminDash "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/DashBoard.jsx"
    click CustDash "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/CustomerDashboard.jsx"
    click VendDash "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/VendorDashboard.jsx"
    click ViewWallet "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/wallet/viewAllWallet.jsx"
    click UpdateWallet "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/wallet/updateWallet.jsx"
    click PartWallet "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/wallet/particularViewWallet.jsx"
    click AddCust "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/Customer/CustomerAdd.jsx"
    click ViewCust "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/Customer/ViewCustomer.jsx"
    click UpdateCust "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/Customer/CustomerUpdate.jsx"
    click CustTrans "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/sales/customerTransaction.jsx"
    click VendTrans "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/sales/vendorTransactionList.jsx"
    click PayList "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/sales/listPayment.jsx"
    click AuthStore "https://github.com/Sharmayaa24/agriSakthi/tree/main/src/redux/auth/"
    click CustStore "https://github.com/Sharmayaa24/agriSakthi/tree/main/src/redux/Customer/"
    click TransStore "https://github.com/Sharmayaa24/agriSakthi/tree/main/src/redux/transaction/"
    click WalletStore "https://github.com/Sharmayaa24/agriSakthi/tree/main/src/redux/wallet/"
    click ReduxStore "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/redux/store.jsx"
    click AuthEffects "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/redux/auth/autheffect.jsx"
    click CustEffects "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/redux/Customer/CustomerEffects.jsx"
    click TransEffects "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/redux/transaction/transactionEffect.jsx"
    click WalletEffects "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/redux/wallet/walletEffect.jsx"
    click Interceptor "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/common/interceptor/interceptor.jsx"
    click CustomMenu "https://github.com/Sharmayaa24/agriSakthi/blob/main/src/screen/common/CustomMenu.js"
    click Graphs "https://github.com/Sharmayaa24/agriSakthi/tree/main/src/screen/common/graph/"

    %% Style Applications
    class Auth,Login,Signup,OTP,DashViews,AdminDash,CustDash,VendDash,WalletMgmt,ViewWallet,UpdateWallet,PartWallet,CustMgmt,AddCust,ViewCust,UpdateCust,TransMgmt,CustTrans,VendTrans,PayList ui
    class ReduxStore,AuthStore,CustStore,WalletStore,TransStore,AuthActions,AuthReducer,CustActions,CustReducer,WalletActions,WalletReducer,TransActions,TransReducer redux
    class AuthEffects,CustEffects,WalletEffects,TransEffects,Interceptor api
    class CustomMenu,Graphs common
```
