# chanikya-webdev/jntua-mobile-attendance-app architecture

> Architecture diagram of the GitHub repository chanikya-webdev/jntua-mobile-attendance-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chanikya-webdev/jntua-mobile-attendance-app
- Repository: https://github.com/chanikya-webdev/jntua-mobile-attendance-app

## Overview

JNTUA Attendance is an Android Expo app for viewing portal attendance without a backend. A student logs in on the official portal in an embedded WebView; injected scripts collect profile, subject, and date-log data through a validated message bridge. App state drives sync/error overlays and the attendance dashboard, which computes 75% threshold guidance and can reopen a saved result. The README documents the flow and capabilities; some implementation excerpts are partial or unavailable, so those links rely on documented behavior.

Main entry points: [`App.tsx`](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/App.tsx) (App Orchestrator), [`views/Dashboard.tsx`](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/views/Dashboard.tsx) (Attendance Dashboard), [`views/WebViewScraper.tsx`](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/views/WebViewScraper.tsx) (Portal WebView), [`utils/automationScripts.ts`](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/automationScripts.ts) (Profile Scrape)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Portal Sync"]
  node_webview["Portal WebView<br/>[WebViewScraper.tsx]"]
  node_student_scrape["Profile Scrape"]
  node_subject_walk["Subject Walk"]
  node_attendance_scrape["Attendance Scrape"]
  node_bridge["Bridge Validation<br/>[bridgeValidator.ts]"]
end

subgraph group_app["App Experience"]
  node_orchestrator["App Orchestrator<br/>[App.tsx]"]
  node_app_state["App State<br/>[appReducer.ts]"]
  node_overlays["Sync And Error Overlays<br/>[OverlayScreens.tsx]"]
  node_dashboard["Attendance Dashboard<br/>[Dashboard.tsx]"]
  node_date_log["Date Log Modal<br/>[DateLogModal.tsx]"]
end

subgraph group_data["Attendance Data"]
  node_attendance_math["Attendance Guidance<br/>[attendanceMath.ts]"]
  node_saved_result["Previous Result<br/>[storage.ts]"]
end

subgraph group_runtime["App Runtime"]
  node_updates["OTA Update Manager<br/>[updateManager.ts]"]
  node_loading_scene["Animated Loader<br/>[CrabScene.tsx]"]
  node_decoration["Dashboard Mark<br/>[Spike.tsx]"]
  node_theme["Theme Constants<br/>[theme.ts]"]
end

node_student(("Student"))
node_portal_site["Attendance Portal"]

node_student -->|"logs in"| node_webview
node_webview -->|"loads portal"| node_portal_site
node_orchestrator -->|"routes injection"| node_webview
node_orchestrator -->|"injects script"| node_student_scrape
node_orchestrator -->|"injects script"| node_subject_walk
node_orchestrator -->|"injects script"| node_attendance_scrape
node_student_scrape -->|"reads profile"| node_portal_site
node_subject_walk -->|"selects subjects"| node_portal_site
node_attendance_scrape -->|"reads attendance"| node_portal_site
node_portal_site -->|"renders pages"| node_webview
node_webview -->|"posts messages"| node_orchestrator
node_orchestrator -->|"validates payloads"| node_bridge
node_orchestrator -->|"dispatches actions"| node_app_state
node_orchestrator -->|"renders status"| node_overlays
node_orchestrator -->|"renders results"| node_dashboard
node_dashboard -->|"computes guidance"| node_attendance_math
node_dashboard -.->|"opens log"| node_date_log
node_orchestrator -->|"loads and saves"| node_saved_result
node_orchestrator -->|"checks updates"| node_updates
node_overlays -->|"renders loader"| node_loading_scene
node_dashboard -->|"renders mark"| node_decoration
node_orchestrator -->|"uses constants"| node_theme
node_dashboard -->|"uses constants"| node_theme

click node_webview "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/views/WebViewScraper.tsx"
click node_student_scrape "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/automationScripts.ts"
click node_subject_walk "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/automationScripts.ts"
click node_attendance_scrape "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/automationScripts.ts"
click node_bridge "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/bridgeValidator.ts"
click node_orchestrator "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/App.tsx"
click node_app_state "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/reducers/appReducer.ts"
click node_overlays "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/views/OverlayScreens.tsx"
click node_dashboard "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/views/Dashboard.tsx"
click node_date_log "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/components/DateLogModal.tsx"
click node_attendance_math "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/attendanceMath.ts"
click node_saved_result "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/storage.ts"
click node_updates "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/updateManager.ts"
click node_loading_scene "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/components/CrabScene.tsx"
click node_decoration "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/components/Spike.tsx"
click node_theme "https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/constants/theme.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webview,node_student_scrape,node_subject_walk,node_attendance_scrape,node_bridge toneBlue
class node_orchestrator,node_app_state,node_overlays,node_dashboard,node_date_log toneAmber
class node_attendance_math,node_saved_result toneMint
class node_updates,node_loading_scene,node_decoration,node_theme toneRose
class node_student,node_portal_site toneIndigo
```

## Components

### Portal Sync

- [Portal WebView](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/views/WebViewScraper.tsx): `views/WebViewScraper.tsx`
- [Profile Scrape](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/automationScripts.ts): `utils/automationScripts.ts`
- [Subject Walk](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/automationScripts.ts): `utils/automationScripts.ts`
- [Attendance Scrape](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/automationScripts.ts): `utils/automationScripts.ts`
- [Bridge Validation](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/bridgeValidator.ts): `utils/bridgeValidator.ts`

### App Experience

- [App Orchestrator](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/App.tsx): `App.tsx`
- [App State](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/reducers/appReducer.ts): `reducers/appReducer.ts`
- [Sync And Error Overlays](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/views/OverlayScreens.tsx): `views/OverlayScreens.tsx`
- [Attendance Dashboard](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/views/Dashboard.tsx): `views/Dashboard.tsx`
- [Date Log Modal](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/components/DateLogModal.tsx): `components/DateLogModal.tsx`

### Attendance Data

- [Attendance Guidance](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/attendanceMath.ts): `utils/attendanceMath.ts`
- [Previous Result](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/storage.ts): `utils/storage.ts`

### App Runtime

- [OTA Update Manager](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/utils/updateManager.ts): `utils/updateManager.ts`
- [Animated Loader](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/components/CrabScene.tsx): `components/CrabScene.tsx`
- [Dashboard Mark](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/components/Spike.tsx): `components/Spike.tsx`
- [Theme Constants](https://github.com/chanikya-webdev/jntua-mobile-attendance-app/blob/main/constants/theme.ts): `constants/theme.ts`

### Other components

- **Student**
- **Attendance Portal**

## Connections

- Student → Portal WebView: logs in (evidence: `README.md`)
- Portal WebView → Attendance Portal: loads portal (evidence: `README.md`)
- App Orchestrator → Portal WebView: routes injection (evidence: `README.md`)
- App Orchestrator → Profile Scrape: injects script (evidence: `README.md`)
- App Orchestrator → Subject Walk: injects script (evidence: `README.md`)
- App Orchestrator → Attendance Scrape: injects script (evidence: `README.md`)
- Profile Scrape → Attendance Portal: reads profile (evidence: `README.md`)
- Subject Walk → Attendance Portal: selects subjects (evidence: `README.md`)
- Attendance Scrape → Attendance Portal: reads attendance (evidence: `README.md`)
- Attendance Portal → Portal WebView: renders pages (evidence: `README.md`)
- Portal WebView → App Orchestrator: posts messages (evidence: `README.md`)
- App Orchestrator → Bridge Validation: validates payloads (evidence: `App.tsx`)
- App Orchestrator → App State: dispatches actions (evidence: `README.md`)
- App Orchestrator → Sync And Error Overlays: renders status (evidence: `README.md`)
- App Orchestrator → Attendance Dashboard: renders results (evidence: `README.md`)
- Attendance Dashboard → Attendance Guidance: computes guidance (evidence: `views/Dashboard.tsx`)
- Attendance Dashboard → Date Log Modal: opens log
- App Orchestrator → Previous Result: loads and saves (evidence: `App.tsx`)
- App Orchestrator → OTA Update Manager: checks updates (evidence: `App.tsx`)
- Sync And Error Overlays → Animated Loader: renders loader (evidence: `views/OverlayScreens.tsx`)
- Attendance Dashboard → Dashboard Mark: renders mark (evidence: `views/Dashboard.tsx`)
- App Orchestrator → Theme Constants: uses constants (evidence: `App.tsx`)
- Attendance Dashboard → Theme Constants: uses constants (evidence: `views/Dashboard.tsx`)
