# knightempire/aagneya-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/knightempire/aagneya-frontend
- Repository: https://github.com/knightempire/aagneya-frontend

## Overview

##### Project type and purpose
- This is a static, front-end web application (deployed on GitHub Pages) built in HTML/CSS/JavaScript with Bootstrap and Tailwind CSS.
- Purpose: Support a sports-club platform where staff and members register, view/manage sports events, log achievements, track intracampus points, and access role-based dashboards (Admin, Community Members, Intramural).

##### File structure
- Top-level directories:
- “homepage/” – public site pages (home, about, events, team, etc.)
- “login/” – authentication screens (login.html, forgot/reset password, add profile/QA)
- “Admin Dashboard/”, “User Dashboard/”, “intramem Dashboard/” – role-specific UIs, each with its own HTML, CSS, JS, images.
- “index/” – marketing/front landing pages (with SCSS/Bootstrap source files)
- No server-side code in repo → purely static front-end.
- package.json suggests build toolchain (likely for SCSS), but no runtime backend here.

##### Key insights from the README
- Features describe user auth, event management, registration, achievements, dashboards, point-tracking.
- Technologies: HTML/CSS/JS, Bootstrap, Tailwind.
- Live deployment on GitHub Pages.

##### Main components
a. Front-End Client
- Browser running single-page and multi-page static assets:
- Public site (“homepage/”, “index/”)
- Authentication module (“login/”)
- Role dashboards (“Admin Dashboard/”, “User Dashboard/”, “intramem Dashboard/”)
b. Static Hosting Layer
- GitHub Pages (or any static file server / CDN) serving the compiled assets and SCSS/JS.
c. Back-End API (external or future extension)
- RESTful microservice endpoints for:
- Authentication (login, register, reset)
- Events (create, list, register)
- Achievements (CRUD, list)
- Intracampus points (fetch, update)
d. Data Storage
- User database (users, roles, credentials)
- Events database
- Achievements database
- Points ledger
e. Optional External Services
- Email/SMS service for password resets
- Analytics (e.g., Google Analytics)
- CDN for static assets

##### Relationships and interactions
- Browser → (HTTP GET) → Static Hosting Layer → serves HTML/CSS/JS
- Browser UI → (REST API calls) → Back-End API → (CRUD operations) → Data Storage
- Authentication flows: login/register pages call Auth API → User DB
- Dashboard pages call Events/Achievements/Points APIs
- External services invoked by Back-End API (e.g., email, analytics)

##### Architectural patterns & design principles
- Front-End vs. Back-End separation (static vs. dynamic layers)
- RESTful API microservices for each domain (Auth, Events, Achievements, Points)
- Role-based UI modules (Admin, Community, Intramural)
- Static asset pipeline (SCSS → CSS, JS modules)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Front-End Layer
    subgraph "Front-End Layer"
        Browser["User Browser"]:::frontend
        StaticHost["Static Hosting (GitHub Pages/CDN)"]:::infra
        subgraph "Static Assets"
            PubSite["Public Site"]:::frontend
            Index["Landing Pages"]:::frontend
            AuthMod["Auth Module"]:::frontend
            AdminUI["Admin Dashboard UI"]:::frontend
            UserUI["Community Dashboard UI"]:::frontend
            IntraUI["Intramural Dashboard UI"]:::frontend
            BuildPipeline["Build Pipeline (SCSS→CSS, JS)"]:::infra
        end
    end

    Browser --> StaticHost
    StaticHost --> PubSite
    StaticHost --> Index
    StaticHost --> AuthMod
    StaticHost --> AdminUI
    StaticHost --> UserUI
    StaticHost --> IntraUI
    BuildPipeline --> Index

    %% Back-End/API Layer
    subgraph "Back-End/API Layer"
        AuthService["Auth Service API"]:::backend
        EventService["Event Service API"]:::backend
        AchievementService["Achievement Service API"]:::backend
        PointsService["Points Service API"]:::backend

        UserDB["User Database"]:::db
        EventDB["Events Database"]:::db
        AchDB["Achievements Database"]:::db
        PointsDB["Points Ledger DB"]:::db
    end

    Browser -->|"REST API Calls"| AuthService
    Browser -->|"REST API Calls"| EventService
    Browser -->|"REST API Calls"| AchievementService
    Browser -->|"REST API Calls"| PointsService

    AuthService --> UserDB
    EventService --> EventDB
    AchievementService --> AchDB
    PointsService --> PointsDB

    %% External Services
    subgraph "External Services"
        EmailService["Email/SMS Service"]:::external
        Analytics["Analytics Service"]:::external
    end

    AuthService -.->|"send notifications"| EmailService
    AuthService -.->|"track events"| Analytics
    EventService -.->|"track events"| Analytics
    AchievementService -.->|"track events"| Analytics
    PointsService -.->|"track events"| Analytics

    %% Click Events
    click PubSite "https://github.com/knightempire/aagneya-frontend/tree/main/homepage/"
    click Index "https://github.com/knightempire/aagneya-frontend/tree/main/index/"
    click AuthMod "https://github.com/knightempire/aagneya-frontend/tree/main/login/"
    click AdminUI "https://github.com/knightempire/aagneya-frontend/tree/main/Admin Dashboard/"
    click UserUI "https://github.com/knightempire/aagneya-frontend/tree/main/User Dashboard/"
    click IntraUI "https://github.com/knightempire/aagneya-frontend/tree/main/intramem Dashboard/"
    click BuildPipeline "https://github.com/knightempire/aagneya-frontend/blob/main/package.json"

    %% Styles
    classDef frontend fill:#D0E8F2,stroke:#0B74DE,color:#000
    classDef infra fill:#E8EAF6,stroke:#5C6BC0,color:#000
    classDef backend fill:#C8E6C9,stroke:#2E7D32,color:#000
    classDef db fill:#FFE0B2,stroke:#EF6C00,color:#000
    classDef external fill:#E0E0E0,stroke:#616161,color:#000
```
