# habeeb-cognizant/team2_dcb architecture

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

- Interactive diagram: https://gitdiagram.com/habeeb-cognizant/team2_dcb
- Repository: https://github.com/habeeb-cognizant/team2_dcb

## Overview

##### File structure
- Top-level HTML files:
- index.html (landing page)
- login.html, admin-login.html (user/admin entry points)
- complaint-form.html (complaint submission)
- status-tracking.html (complaint status view)
- admin-dashboard.html (admin console)
- scripts/app.js: front-end logic (form handling, possibly AJAX)
- styles/style.css and images/: UI assets
- logs/ and cron.log: runtime logging
- backup.sh + backup/: scheduled backup of static assets and logs

##### README
- No architectural details are given, only team roster. All architecture must be inferred from file layout.

##### Elements
- Browser → Static File Server (GET HTML/CSS/JS)
- Browser ↔ Complaint API Service (AJAX)
- Complaint API Service → Database (persist/query)
- Any component → Logging Service (write logs)
- Backup Scheduler → Static File Server & Logging Service (read files) → Backup Storage (write zips)
- Data storage (DB/backups)
- Scheduled tasks

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client
    subgraph "Client"
        Browser["Browser"]:::client
    end

    %% Static Assets
    subgraph "Static File Server"
        Index["index.html"]:::static
        Login["login.html"]:::static
        AdminLogin["admin-login.html"]:::static
        ComplaintForm["complaint-form.html"]:::static
        StatusTracking["status-tracking.html"]:::static
        AdminDashboard["admin-dashboard.html"]:::static
        AppJS["scripts/app.js"]:::static
        StyleCSS["styles/style.css"]:::static
        Images["images/"]:::static
    end

    %% Backend (Future)
    subgraph "Backend (To be implemented)"
        API["Complaint API Service"]:::dynamic
        DB["Database"]:::storage
    end

    %% Logging
    subgraph "Logging Service"
        LogsDir["logs/"]:::storage
        CronLog["cron.log"]:::storage
    end

    %% Scheduler & Backup
    BackupScheduler["Backup Scheduler\n(cron + backup.sh)"]:::scheduler
    BackupStorage["Backup Storage\n(backup/)"]:::storage

    %% Documentation
    subgraph "Project Documentation"
        Readme["README.md"]:::storage
        UI["UI Checklist.xlsx"]:::storage
    end

    %% Interactions
    Browser -->|"HTTP GET HTML"| Index
    Browser -->|"HTTP GET HTML"| Login
    Browser -->|"HTTP GET HTML"| AdminLogin
    Browser -->|"HTTP GET HTML"| ComplaintForm
    Browser -->|"HTTP GET HTML"| StatusTracking
    Browser -->|"HTTP GET HTML"| AdminDashboard
    Browser -->|"HTTP GET JS"| AppJS
    Browser -->|"HTTP GET CSS"| StyleCSS
    Browser -->|"HTTP GET Assets"| Images

    Browser -->|"AJAX POST/GET"| API
    API -->|"persist/query"| DB

    Index -->|"WRITE LOG"| LogsDir
    Login -->|"WRITE LOG"| LogsDir
    AdminLogin -->|"WRITE LOG"| LogsDir
    ComplaintForm -->|"WRITE LOG"| LogsDir
    StatusTracking -->|"WRITE LOG"| LogsDir
    AdminDashboard -->|"WRITE LOG"| LogsDir
    AppJS -->|"WRITE LOG"| LogsDir
    API -->|"WRITE LOG"| LogsDir

    BackupScheduler -->|"read files"| Index
    BackupScheduler -->|"read files"| Login
    BackupScheduler -->|"read files"| AdminLogin
    BackupScheduler -->|"read files"| ComplaintForm
    BackupScheduler -->|"read files"| StatusTracking
    BackupScheduler -->|"read files"| AdminDashboard
    BackupScheduler -->|"read files"| AppJS
    BackupScheduler -->|"read files"| StyleCSS
    BackupScheduler -->|"read files"| Images
    BackupScheduler -->|"read files"| LogsDir
    BackupScheduler -->|"read files"| CronLog

    BackupScheduler -->|"ZIP & STORE"| BackupStorage

    %% Click Events
    click Index "https://github.com/habeeb-cognizant/team2_dcb/blob/main/index.html"
    click Login "https://github.com/habeeb-cognizant/team2_dcb/blob/main/login.html"
    click AdminLogin "https://github.com/habeeb-cognizant/team2_dcb/blob/main/admin-login.html"
    click ComplaintForm "https://github.com/habeeb-cognizant/team2_dcb/blob/main/complaint-form.html"
    click StatusTracking "https://github.com/habeeb-cognizant/team2_dcb/blob/main/status-tracking.html"
    click AdminDashboard "https://github.com/habeeb-cognizant/team2_dcb/blob/main/admin-dashboard.html"
    click AppJS "https://github.com/habeeb-cognizant/team2_dcb/blob/main/scripts/app.js"
    click StyleCSS "https://github.com/habeeb-cognizant/team2_dcb/blob/main/styles/style.css"
    click Images "https://github.com/habeeb-cognizant/team2_dcb/tree/main/images/"
    click LogsDir "https://github.com/habeeb-cognizant/team2_dcb/tree/main/logs/"
    click CronLog "https://github.com/habeeb-cognizant/team2_dcb/blob/main/cron.log"
    click BackupScheduler "https://github.com/habeeb-cognizant/team2_dcb/blob/main/backup.sh"
    click BackupStorage "https://github.com/habeeb-cognizant/team2_dcb/tree/main/backup/"
    click Readme "https://github.com/habeeb-cognizant/team2_dcb/blob/main/README.md"
    click UI "https://github.com/habeeb-cognizant/team2_dcb/blob/main/UI Checklist.xlsx"

    %% Styles
    classDef client fill:#ddf,stroke:#669,stroke-width:2px;
    classDef static fill:#dfd,stroke:#484,stroke-width:2px;
    classDef dynamic fill:#fdd,stroke:#944,stroke-width:2px;
    classDef storage fill:#ffd,stroke:#aa8,stroke-width:2px;
    classDef scheduler fill:#fdb,stroke:#ba7,stroke-width:2px;
```
