# eyeamkd/disha architecture

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

- Interactive diagram: https://gitdiagram.com/eyeamkd/disha
- Repository: https://github.com/eyeamkd/disha

## Overview

##### Main Components

a) Frontend Layer:
- React-based Single Page Application (evident from the src/components structure)
- Key modules:
- Authentication (SignIn, SignUp, ForgotPassword)
- User Management (Profile, EditProfile)
- Discussion Forums (Dspace)
- Community Features (Community, Comments)
- Administrative Dashboard
- Faculty Dashboard

b) Backend/Services Layer:
- Firebase Services (indicated by .firebase directory and configuration files)
- Authentication
- Firestore Database
- Cloud Storage
- Hosting
- Microservices (src/microservices)
- Mailing Service

c) State Management:
- Redux Store (src/redux directory)
- User Management
- Posts Management
- Comments
- Search Functionality
- Account Management

**[Client Layer]**
- ↕
**[Services Layer]**
- ↕
**[Data Layer]**

##### Key Relationships to Highlight

- User Authentication flow with Firebase Auth
- Real-time data synchronization with Firestore
- Redux state management interaction with components
- Microservices integration
- Role-based access control (Admin, Faculty, Students)

##### Technical Details

- Firebase Configuration
- Redux Store Structure
- Component Hierarchy
- API Endpoints
- Security Rules

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Auth["Authentication Module"]
        UserMgmt["User Management"]
        DSpace["Discussion Forums"]
        Community["Community Features"]
        AdminDash["Administrative Dashboard"]
        FacultyDash["Faculty Dashboard"]
        Nav["Navigation System"]
        Shared["Shared Utilities"]
    end

    subgraph Services
        Firebase["Firebase Services"]
        MailService["Mailing Microservice"]
    end

    subgraph State
        Redux["Redux Store"]
        UserState["User State"]
        PostState["Posts State"]
        CommentState["Comments State"]
        SearchState["Search State"]
        AccountState["Account State"]
    end

    subgraph Data
        Firestore[(Firestore DB)]
        CloudStorage[(Cloud Storage)]
    end

    %% Component Relationships
    Auth --> Firebase
    UserMgmt --> Firebase
    DSpace --> Firebase
    Community --> Firebase
    AdminDash --> Firebase
    FacultyDash --> Firebase

    Firebase --> Firestore
    Firebase --> CloudStorage
    Firebase --> MailService

    Auth --> Redux
    UserMgmt --> Redux
    DSpace --> Redux
    Community --> Redux
    AdminDash --> Redux
    FacultyDash --> Redux

    Redux --> UserState
    Redux --> PostState
    Redux --> CommentState
    Redux --> SearchState
    Redux --> AccountState

    %% Styling
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px
    classDef service fill:#f7d794,stroke:#333
    classDef state fill:#778beb,stroke:#333
    classDef data fill:#63cdda,stroke:#333

    class Firebase,MailService service
    class Redux,UserState,PostState,CommentState,SearchState,AccountState state
    class Firestore,CloudStorage data

    %% Click Events
    click Auth "https://github.com/eyeamkd/disha/tree/master/src/components/Auth/"
    click UserMgmt "https://github.com/eyeamkd/disha/tree/master/src/components/Profile/"
    click DSpace "https://github.com/eyeamkd/disha/tree/master/src/components/Dspace/"
    click Community "https://github.com/eyeamkd/disha/tree/master/src/components/Community/"
    click AdminDash "https://github.com/eyeamkd/disha/tree/master/src/components/Admin/"
    click FacultyDash "https://github.com/eyeamkd/disha/tree/master/src/components/FacultyDashboard/"
    click Firebase "https://github.com/eyeamkd/disha/tree/master/src/firebase/"
    click MailService "https://github.com/eyeamkd/disha/blob/master/src/microservices/mailing.js"
    click Redux "https://github.com/eyeamkd/disha/tree/master/src/redux/"
    click UserState "https://github.com/eyeamkd/disha/tree/master/src/redux/user/"
    click PostState "https://github.com/eyeamkd/disha/tree/master/src/redux/posts/"
    click CommentState "https://github.com/eyeamkd/disha/tree/master/src/redux/comments/"
    click SearchState "https://github.com/eyeamkd/disha/tree/master/src/redux/dSpaceSearch/"
    click AccountState "https://github.com/eyeamkd/disha/tree/master/src/redux/signup/"
    click Nav "https://github.com/eyeamkd/disha/tree/master/src/navigation/"
    click Shared "https://github.com/eyeamkd/disha/tree/master/src/shared/"
```
