# aditya290605/grade-vise architecture

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

- Interactive diagram: https://gitdiagram.com/aditya290605/grade-vise
- Repository: https://github.com/aditya290605/grade-vise

## Overview

1. **Overall shape**
   - GradeVise is a **Flutter client app** with a strongly **role-based architecture**: one app serves both **teachers** and **students**.
   - The main application boundary is the Flutter UI layer; almost all business flows live inside `lib/`, while Android/iOS folders are mostly platform packaging and Firebase configuration.

2. **Startup and app bootstrap**
   - `lib/main.dart` is the entry point and likely initializes Firebase, selects the initial route, and launches the responsive shell.
   - `lib/firebase_options.dart` plus `android/app/google-services.json` indicate Firebase is configured for multiple platforms, with FlutterFire-generated runtime options.

3. **Core infrastructure dependencies**
   - The app is built around Firebase services:
     - **Firebase Auth** for sign-in/sign-up and user identity.
     - **Firestore** for classrooms, assignments, submissions, grades, feedback, and announcements.
     - **Firebase Storage** for uploaded files such as assignments, submissions, and model sheets.
     - **Firebase Messaging** for notifications.
   - These dependencies are wrapped by service classes under `lib/services/`, which act as the data-access boundary between UI and backend.

4. **Service layer boundaries**
   - `firebase_auth_methods.dart`, `firestore_methods.dart`, `storage_methods.dart`, `classroom_service.dart`, and `firebase_messaging.dart` form the app’s integration layer.
   - This layer centralizes Firebase calls so the teacher/student screens do not talk to Firebase directly everywhere.
   - `firebase_config.dart` likely holds app-wide Firebase initialization or environment setup.

5. **Role-based navigation model**
   - The app splits into **teacher** and **student** feature trees under `lib/teacher/` and `lib/student/`.
   - Screens such as `starter_screen.dart`, `mobile_screen.dart`, and `web_screen.dart` suggest the app chooses both **layout** and **role entry path** dynamically.
   - `responsive_layout/responsive_screen.dart` is the top-level presentation boundary for device adaptation.

6. **Teacher subsystem**
   - Teacher flows center on classroom management, assignment creation, grading, and feedback.
   - Key modules include:
     - `Classroom_Page.dart`, `Landing_page.dart`, `home_screen.dart`, `main_page.dart`
     - `Assignments/` for creating and managing assignments
     - `Submissions/` for reviewing uploads and AI-assisted grading
     - `feedback/`, `grading/`, `announcements/`, and profile/about screens
   - This side represents the instructor control plane: create content, evaluate work, and publish feedback.

7. **Student subsystem**
   - Student flows cover joining classes, viewing assignments, uploading submissions, checking grades, and reading feedback.
   - Important modules include:
     - `join_class.dart`, `join_class_dialog.dart`
     - `classroom_screen.dart`, `assignment_page.dart`, `assignment_details.dart`
     - `uploade_submisson.dart`, `submissions.dart`
     - `my_grades.dart`, `evaluation.dart`, `clarification_page.dart`
   - This side is the learner-facing consumption and submission path.

8. **AI-assisted grading path**
   - The `teacher/Submissions/ai_methods.dart`, `pdf_to_text.dart`, `check_each_submission.dart`, and `upload_modelsheet.dart` files show a distinct grading pipeline.
   - The likely flow is: teacher uploads answer/model sheets, submissions are parsed or extracted from PDF, then AI-assisted evaluation produces marks or feedback.
   - This is a major architectural boundary because it extends beyond simple CRUD into document processing and automated assessment.

9. **Shared UI and reusable components**
   - Common building blocks live in `lib/widgets/` and `lib/utils/`.
   - Widgets such as buttons, text fields, classroom cards/containers, dialogs, PDF viewer, and bottom sheets are reused across teacher and student screens.
   - Utility files handle colors, fonts, card styling, and error presentation, which keeps feature pages focused on flow logic rather than UI primitives.

10. **Assets and app data files**
   - `assets/` contains fonts, icons, images, and several JSON files:
     - `credentials.json`
     - `notifications.json`
     - `submission.json`
   - These appear to support seeded/demo data, UI content, or local configuration rather than acting as the primary source of truth.
   - Because the app is Firebase-backed, durable state is expected to live remotely in Firestore/Storage rather than in these assets.

11. **Platform packaging and deployment**
   - The `android/` and `ios/` folders are standard Flutter platform shells, but they also carry deployment-specific Firebase setup and splash/launch assets.
   - `flutter_native_splash.yaml` indicates a custom splash screen is generated at build time.
   - The app is intended for mobile-first use, though the presence of `web_screen.dart` suggests a responsive or web-capable UI path as well.

12. **External integration surface**
   - The repository does not show a separate backend server; instead, the app integrates directly with managed cloud services.
   - Firebase is the main external infrastructure, and the AI grading pieces are embedded client-side or via service wrappers in the Flutter codebase.
   - For an architecture diagram, the key external boundaries are: **Flutter client**, **Firebase backend services**, and **asset-based local configuration/demo data**.

Main entry points: [`grade_vise/lib/services`](https://github.com/aditya290605/grade-vise/tree/main/grade_vise/lib/services) (Services), [`grade_vise/lib/responsive_layout/responsive_screen.dart`](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/responsive_layout/responsive_screen.dart) (Responsive shell), [`grade_vise/lib/main.dart`](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/main.dart) (main.dart), [`grade_vise/lib/widgets`](https://github.com/aditya290605/grade-vise/tree/main/grade_vise/lib/widgets) (Widgets)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g_app["App Shell"]
  node_n_main(("main.dart<br/>flutter entry<br/>[main.dart]"))
  node_n_firebase_opts["Firebase options<br/>config"]
  node_n_responsive["Responsive shell<br/>layout router"]
  node_n_start["Starter screen<br/>entry screen"]
  node_n_mobile["Mobile screen<br/>device shell<br/>[mobile_screen.dart]"]
  node_n_web["Web screen<br/>device shell<br/>[web_screen.dart]"]
end

subgraph group_g_core["Core Services"]
  node_n_core_services["Services<br/>firebase boundary"]
end

subgraph group_g_teacher["Teacher Flow"]
  node_n_teacher_home["Teacher home<br/>teacher shell<br/>[main_page.dart]"]
  node_n_teacher_class["Classroom page<br/>teacher classroom"]
  node_n_teacher_assign["Assignments<br/>teacher work"]
  node_n_teacher_submit["Submissions<br/>grading pipeline"]
  node_n_teacher_feedback["Feedback"]
end

subgraph group_g_student["Student Flow"]
  node_n_student_home["Student home<br/>student shell<br/>[main_page.dart]"]
  node_n_student_class["Classroom screen<br/>student classroom"]
  node_n_student_submit["Upload work<br/>student submission"]
  node_n_student_grades["My grades<br/>student grades<br/>[my_grades.dart]"]
end

subgraph group_g_shared["Shared UI"]
  node_n_widgets["Widgets<br/>shared components"]
  node_n_utils["Utils<br/>style helpers"]
end

subgraph group_g_platform["Platform"]
  node_n_assets["Assets<br/>local data"]
  node_n_android_cfg["Android config<br/>platform config"]
end

node_n_main -->|"loads config"| node_n_firebase_opts
node_n_main -->|"starts UI"| node_n_responsive
node_n_responsive -->|"routes to"| node_n_start
node_n_responsive -->|"adapts to"| node_n_mobile
node_n_responsive -->|"adapts to"| node_n_web
node_n_start -->|"auth flow"| node_n_core_services
node_n_teacher_home -->|"uses"| node_n_core_services
node_n_teacher_class -->|"reads/writes"| node_n_core_services
node_n_teacher_assign -->|"uploads files"| node_n_core_services
node_n_teacher_submit -->|"evaluates"| node_n_core_services
node_n_teacher_feedback -->|"publishes feedback"| node_n_core_services
node_n_student_home -->|"uses"| node_n_core_services
node_n_student_class -->|"joins classes"| node_n_core_services
node_n_student_submit -->|"uploads work"| node_n_core_services
node_n_student_grades -->|"reads grades"| node_n_core_services
node_n_teacher_home -->|"composes"| node_n_widgets
node_n_student_home -->|"composes"| node_n_widgets
node_n_widgets -->|"styles with"| node_n_utils
node_n_main -->|"loads"| node_n_assets
node_n_android_cfg -->|"boots app"| node_n_main

click node_n_main "https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/main.dart"
click node_n_firebase_opts "https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/firebase_options.dart"
click node_n_responsive "https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/responsive_layout/responsive_screen.dart"
click node_n_start "https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/screens/starter_screen.dart"
click node_n_mobile "https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/screens/mobile_screen.dart"
click node_n_web "https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/screens/web_screen.dart"
click node_n_core_services "https://github.com/aditya290605/grade-vise/tree/main/grade_vise/lib/services"
click node_n_teacher_home "https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/teacher/main_page.dart"
click node_n_teacher_class "https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/teacher/Classroom_Page.dart"
click node_n_teacher_assign "https://github.com/aditya290605/grade-vise/tree/main/grade_vise/lib/teacher/Assignments"
click node_n_teacher_submit "https://github.com/aditya290605/grade-vise/tree/main/grade_vise/lib/teacher/Submissions"
click node_n_teacher_feedback "https://github.com/aditya290605/grade-vise/tree/main/grade_vise/lib/teacher/feedback"
click node_n_student_home "https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/student/main_page.dart"
click node_n_student_class "https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/student/classroom_screen.dart"
click node_n_student_submit "https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/student/uploade_submisson.dart"
click node_n_student_grades "https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/student/my_grades.dart"
click node_n_widgets "https://github.com/aditya290605/grade-vise/tree/main/grade_vise/lib/widgets"
click node_n_utils "https://github.com/aditya290605/grade-vise/tree/main/grade_vise/lib/utils"
click node_n_assets "https://github.com/aditya290605/grade-vise/tree/main/grade_vise/assets"
click node_n_android_cfg "https://github.com/aditya290605/grade-vise/blob/main/grade_vise/android/app/google-services.json"

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_n_main,node_n_firebase_opts,node_n_responsive,node_n_start,node_n_mobile,node_n_web toneBlue
class node_n_core_services toneAmber
class node_n_teacher_home,node_n_teacher_class,node_n_teacher_assign,node_n_teacher_submit,node_n_teacher_feedback toneMint
class node_n_student_home,node_n_student_class,node_n_student_submit,node_n_student_grades toneRose
class node_n_widgets,node_n_utils toneIndigo
class node_n_assets,node_n_android_cfg toneTeal
```

## Components

### App Shell

Flutter entrypoint and responsive startup flow.

- [main.dart](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/main.dart): flutter entry · App bootstrap and top-level launch point. · `grade_vise/lib/main.dart`
- [Firebase options](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/firebase_options.dart): config · FlutterFire-generated runtime configuration. · `grade_vise/lib/firebase_options.dart`
- [Responsive shell](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/responsive_layout/responsive_screen.dart): layout router · Chooses web/mobile presentation and startup screen. · `grade_vise/lib/responsive_layout/responsive_screen.dart`
- [Starter screen](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/screens/starter_screen.dart): entry screen · Initial role or auth landing page. · `grade_vise/lib/screens/starter_screen.dart`
- [Mobile screen](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/screens/mobile_screen.dart): device shell · Mobile-specific container for the app experience. · `grade_vise/lib/screens/mobile_screen.dart`
- [Web screen](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/screens/web_screen.dart): device shell · Web-specific container for the app experience. · `grade_vise/lib/screens/web_screen.dart`

### Core Services

Firebase integration and data-access boundary.

- [Services](https://github.com/aditya290605/grade-vise/tree/main/grade_vise/lib/services): firebase boundary · Firebase auth, Firestore, storage, messaging, and classroom wrappers. · `grade_vise/lib/services`

### Teacher Flow

Instructor-facing classroom, assignment, grading, and feedback features.

- [Teacher home](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/teacher/main_page.dart): teacher shell · Primary teacher navigation and landing experience. · `grade_vise/lib/teacher/main_page.dart`
- [Classroom page](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/teacher/Classroom_Page.dart): teacher classroom · Teacher classroom management and overview. · `grade_vise/lib/teacher/Classroom_Page.dart`
- [Assignments](https://github.com/aditya290605/grade-vise/tree/main/grade_vise/lib/teacher/Assignments): teacher work · Assignment creation and assignment list flow. · `grade_vise/lib/teacher/Assignments`
- [Submissions](https://github.com/aditya290605/grade-vise/tree/main/grade_vise/lib/teacher/Submissions): grading pipeline · Review, parse, and evaluate student submissions. · `grade_vise/lib/teacher/Submissions`
- [Feedback](https://github.com/aditya290605/grade-vise/tree/main/grade_vise/lib/teacher/feedback): teacher feedback · Return feedback and track classroom responses. · `grade_vise/lib/teacher/feedback`

### Student Flow

Learner-facing class, submission, and grade features.

- [Student home](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/student/main_page.dart): student shell · Primary student navigation and landing experience. · `grade_vise/lib/student/main_page.dart`
- [Classroom screen](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/student/classroom_screen.dart): student classroom · Student class browsing and class entry flow. · `grade_vise/lib/student/classroom_screen.dart`
- [Upload work](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/student/uploade_submisson.dart): student submission · Assignment submission and upload flow. · `grade_vise/lib/student/uploade_submisson.dart`
- [My grades](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/lib/student/my_grades.dart): student grades · Student grade and evaluation views. · `grade_vise/lib/student/my_grades.dart`

### Shared UI

Reusable widgets and styling used across roles.

- [Widgets](https://github.com/aditya290605/grade-vise/tree/main/grade_vise/lib/widgets): shared components · Reusable UI controls and classroom detail components. · `grade_vise/lib/widgets`
- [Utils](https://github.com/aditya290605/grade-vise/tree/main/grade_vise/lib/utils): style helpers · Shared styling, fonts, colors, and error display helpers. · `grade_vise/lib/utils`

### Platform

Firebase config, assets, and native app shells.

- [Assets](https://github.com/aditya290605/grade-vise/tree/main/grade_vise/assets): local data · Icons, images, fonts, and JSON content files. · `grade_vise/assets`
- [Android config](https://github.com/aditya290605/grade-vise/blob/main/grade_vise/android/app/google-services.json): platform config · Android Firebase and app packaging configuration. · `grade_vise/android/app/google-services.json`

## Connections

- main.dart → Firebase options: loads config · Bootstrap uses generated Firebase runtime options.
- main.dart → Responsive shell: starts UI · Entry point launches the responsive app shell.
- Responsive shell → Starter screen: routes to · Startup screen decides initial entry path.
- Responsive shell → Mobile screen: adapts to · Mobile presentation branch.
- Responsive shell → Web screen: adapts to · Web presentation branch.
- Starter screen → Services: auth flow · Initial entry depends on shared Firebase services.
- Teacher home → Services: uses · Teacher shell coordinates classroom operations through services.
- Classroom page → Services: reads/writes · Classroom state and content are stored through the service boundary.
- Assignments → Services: uploads files · Assignments and related documents use Firebase-backed services.
- Submissions → Services: evaluates · Submission review delegates to backend access and document handling services.
- Feedback → Services: publishes feedback · Teacher feedback is written back through the service layer.
- Student home → Services: uses · Student shell relies on the shared service boundary.
- Classroom screen → Services: joins classes · Student classroom membership and listings come from backend services.
- Upload work → Services: uploads work · Student submissions are stored through Firebase-backed services.
- My grades → Services: reads grades · Grades and evaluation results are fetched through the service layer.
- Teacher home → Widgets: composes · Teacher pages reuse shared UI components.
- Student home → Widgets: composes · Student pages reuse shared UI components.
- Widgets → Utils: styles with · Shared widgets use common colors, fonts, and error helpers.
- main.dart → Assets: loads · App startup and screens consume packaged assets.
- Android config → main.dart: boots app · Android packaging launches the Flutter application.
