# paskilan/main-tw architecture

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

- Interactive diagram: https://gitdiagram.com/paskilan/main-tw
- Repository: https://github.com/paskilan/main-tw

## Overview

##### Main System Components

Frontend (React/TypeScript Application):
- Pages Layer (showing the main routes: Landing, Login, Register, Home, Event, Org, Settings)
- Components Layer (showing shared components and layouts)
- Assets & Utils (showing supporting resources)
- State Management (if any is being used)

Backend (.NET Core API):
- Controllers Layer (StudentsController)
- Services Layer (StudentService)
- Data Access Layer (ApplicationDbContext)
- Models Layer (showing the main entities)

##### Component Relationships

- Double lines for database relationships

##### Data Flow Representation

Main data flow paths:

##### Key Models/Entities (in the Database section)
- StudentTable
- OrgTable
- EventTable
- CollegeTable
- AdminTable
- FollowedOrgsTable
- OrgHighlightsTable
- ReportTable

##### Frontend Architecture Details

- Components hierarchy
- Commons (reusable components)
- Layouts (page-specific layouts)
- UI (shadcn components)
- Routing structure
- Asset management

##### Backend Architecture Details

- API endpoints
- Service layer business logic
- Database context and entity relationships
- Authentication/Authorization flow (if present)

##### Technical Stack Indicators

- Frontend: React, TypeScript, Tailwind CSS, Vite
- Backend: .NET Core, Entity Framework
- Database: (Indicate the database technology being used)

##### Deployment Architecture

If applicable, include a section showing:
- Development environment
- Production environment
- CI/CD pipeline (based on the presence of GitHub workflows)

Remember to:
- Use consistent styling and notation
- Version information
- Document any external service integrations
- Security boundaries
- Scalability points

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Client
        Browser["🌐 Much Browser"]
    end

    subgraph "Frontend React/TypeScript"
        Pages["📱 Such Pages"]
        Components["🧩 Very Components"]
        Assets["🎨 Wow Assets"]
        State["🤔 Much State"]

        subgraph "Pages"
            Landing["🏠 Landing Wow"]:::page
            Login["🔑 Much Login"]:::page
            Register["📝 Very Register"]:::page
            Home["🏡 Such Home"]:::page
            Event["🎉 Party Time"]:::page
            Org["🏢 Much Organization"]:::page
            Settings["⚙️ Very Settings"]:::page
        end

        subgraph "Components"
            Commons["🔄 Common Stuff"]:::component
            Layouts["📐 Layout Magic"]:::component
            UI["✨ Pretty UI"]:::component
        end
    end

    subgraph "Backend .NET Core"
        Controllers["🎮 Control Room"]:::backend
        Services["🛠️ Much Service"]:::backend
        DAL["💾 Data Doge"]:::backend
        
        subgraph "Database Models"
            Student["👨‍🎓 Student Doge"]:::model
            Organization["🏛️ Org Wow"]:::model
            EventModel["🎪 Event Much"]:::model
            College["🎓 College Very"]:::model
            Admin["👑 Admin Power"]:::model
            FollowedOrgs["🔍 Such Follow"]:::model
            OrgHighlights["⭐ Very Highlight"]:::model
            Report["📊 Report Wow"]:::model
        end
    end

    subgraph "Database"
        DB[(💽 Much Data Store)]:::database
    end

    Browser --> Pages
    Pages --> Components
    Components --> Assets
    Components --> State
    Pages -.-> Controllers
    Controllers --> Services
    Services --> DAL
    DAL --> DB

    %% Click Events
    click Landing "https://github.com/Paskilan/Main-tw/blob/main/frontend/src/pages/LandingPage.tsx"
    click Login "https://github.com/Paskilan/Main-tw/blob/main/frontend/src/pages/LoginPage.tsx"
    click Register "https://github.com/Paskilan/Main-tw/blob/main/frontend/src/pages/RegisterPage.tsx"
    click Home "https://github.com/Paskilan/Main-tw/blob/main/frontend/src/pages/HomePage.tsx"
    click Event "https://github.com/Paskilan/Main-tw/blob/main/frontend/src/pages/EventPage.tsx"
    click Org "https://github.com/Paskilan/Main-tw/blob/main/frontend/src/pages/OrgPageStudent.tsx"
    click Settings "https://github.com/Paskilan/Main-tw/blob/main/frontend/src/pages/SettingsPage.tsx"
    click Commons "https://github.com/Paskilan/Main-tw/tree/main/frontend/src/components/commons/"
    click Layouts "https://github.com/Paskilan/Main-tw/tree/main/frontend/src/components/layouts/"
    click UI "https://github.com/Paskilan/Main-tw/tree/main/frontend/src/components/ui/"
    click Assets "https://github.com/Paskilan/Main-tw/tree/main/frontend/src/assets/"
    click Controllers "https://github.com/Paskilan/Main-tw/blob/main/Controllers/StudentsController.cs"
    click Services "https://github.com/Paskilan/Main-tw/blob/main/Services/StudentService.cs"
    click DAL "https://github.com/Paskilan/Main-tw/blob/main/ApplicationDbContext.cs"
    click Student "https://github.com/Paskilan/Main-tw/blob/main/Models/StudentTable.cs"
    click Organization "https://github.com/Paskilan/Main-tw/blob/main/Models/OrgTable.cs"
    click EventModel "https://github.com/Paskilan/Main-tw/blob/main/Models/EventTable.cs"
    click College "https://github.com/Paskilan/Main-tw/blob/main/Models/CollegeTable.cs"
    click Admin "https://github.com/Paskilan/Main-tw/blob/main/Models/AdminTable.cs"
    click FollowedOrgs "https://github.com/Paskilan/Main-tw/blob/main/Models/FollowedOrgsTable.cs"
    click OrgHighlights "https://github.com/Paskilan/Main-tw/blob/main/Models/OrgHighlightsTable.cs"
    click Report "https://github.com/Paskilan/Main-tw/blob/main/Models/ReportTable.cs"

    classDef page fill:#b3e0ff,stroke:#333,stroke-width:2px
    classDef component fill:#d1f2eb,stroke:#333,stroke-width:2px
    classDef backend fill:#d5f5e3,stroke:#333,stroke-width:2px
    classDef model fill:#fdebd0,stroke:#333,stroke-width:2px
    classDef database fill:#f9e79f,stroke:#333,stroke-width:2px
```
