# devivekrt/smartlib architecture

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

- Interactive diagram: https://gitdiagram.com/devivekrt/smartlib
- Repository: https://github.com/devivekrt/smartlib

## Overview

SmartLib is a Flutter study-space management app for students and librarians. The student journey is library discovery, seat selection and booking, then QR/location-aware attendance; students can also review study activity and booking history. Librarians manage bookings, seats, library operations, and notifications. The README documents these capabilities, while the supplied source excerpts cover only platform bootstrap, so the graph maps documented product responsibilities to paths from the tree without asserting unshown implementation calls.

Main entry points: [`lib/main.dart`](https://github.com/devivekrt/smartlib/blob/main/lib/main.dart) (SmartLib app), [`lib/student/library_market_place.dart`](https://github.com/devivekrt/smartlib/blob/main/lib/student/library_market_place.dart) (Library marketplace), [`lib/student/library_detail_screen.dart`](https://github.com/devivekrt/smartlib/blob/main/lib/student/library_detail_screen.dart) (Library details), [`lib/student/seat_booking_screen.dart`](https://github.com/devivekrt/smartlib/blob/main/lib/student/seat_booking_screen.dart) (Seat booking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_student["Student experience"]
  node_marketplace["Library marketplace"]
  node_library_details["Library details"]
  node_seat_booking["Seat booking"]
  node_booking_history["Booking history"]
  node_qr_checkin["QR check-in"]
  node_study_stats["Study statistics"]
  node_student_auth["Student access<br/>[Login.dart]"]
end

subgraph group_library_ops["Library operations"]
  node_librarian_dashboard["Librarian dashboard"]
  node_admin_bookings["Booking administration"]
  node_admin_seats["Admin seat board"]
  node_library_setup["Library setup"]
  node_library_data["Library repository"]
end

subgraph group_engagement["Activity and messaging"]
  node_attendance["Attendance tracking"]
  node_notifications["Notifications"]
end

subgraph group_platform["App and services"]
  node_smartlib["SmartLib app<br/>[main.dart]"]
  node_firebase[("Firebase services")]
end

node_student_actor(("Student"))
node_librarian_actor(("Librarian"))

node_student_actor -->|"uses"| node_smartlib
node_librarian_actor -->|"uses"| node_smartlib
node_smartlib -->|"offers access"| node_student_auth
node_student_actor -->|"finds libraries"| node_marketplace
node_marketplace -->|"views details"| node_library_details
node_student_actor -->|"books a seat"| node_seat_booking
node_student_actor -->|"checks in"| node_qr_checkin
node_student_actor -->|"reviews bookings"| node_booking_history
node_student_actor -->|"views progress"| node_study_stats
node_librarian_actor -->|"manages library"| node_librarian_dashboard
node_librarian_actor -->|"reviews bookings"| node_admin_bookings
node_librarian_actor -->|"views seat status"| node_admin_seats
node_librarian_actor -->|"configures library"| node_library_setup
node_smartlib -.->|"uses data layer"| node_library_data
node_smartlib -->|"uses Firebase"| node_firebase
node_smartlib -->|"sends alerts"| node_notifications
node_smartlib -->|"tracks check-ins"| node_attendance

click node_smartlib "https://github.com/devivekrt/smartlib/blob/main/lib/main.dart"
click node_marketplace "https://github.com/devivekrt/smartlib/blob/main/lib/student/library_market_place.dart"
click node_library_details "https://github.com/devivekrt/smartlib/blob/main/lib/student/library_detail_screen.dart"
click node_seat_booking "https://github.com/devivekrt/smartlib/blob/main/lib/student/seat_booking_screen.dart"
click node_booking_history "https://github.com/devivekrt/smartlib/blob/main/lib/student/my_bookings_screen.dart"
click node_qr_checkin "https://github.com/devivekrt/smartlib/blob/main/lib/student/qr_code_screen.dart"
click node_study_stats "https://github.com/devivekrt/smartlib/blob/main/lib/student/activity_screen.dart"
click node_student_auth "https://github.com/devivekrt/smartlib/blob/main/lib/student/Login.dart"
click node_librarian_dashboard "https://github.com/devivekrt/smartlib/blob/main/lib/librarian/bottom_navigation/librarain_dashboard_page.dart"
click node_admin_bookings "https://github.com/devivekrt/smartlib/blob/main/lib/librarian/bottom_navigation/librarain_booking_page.dart"
click node_admin_seats "https://github.com/devivekrt/smartlib/blob/main/lib/librarian/bottom_navigation/librarain_seats_page.dart"
click node_library_setup "https://github.com/devivekrt/smartlib/blob/main/lib/library/library_details_upload.dart"
click node_library_data "https://github.com/devivekrt/smartlib/blob/main/lib/features/libraries/data/library_repository.dart"
click node_attendance "https://github.com/devivekrt/smartlib/blob/main/lib/function/student_function.dart"
click node_notifications "https://github.com/devivekrt/smartlib/blob/main/lib/function/notification_service.dart"

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_marketplace,node_library_details,node_seat_booking,node_booking_history,node_qr_checkin,node_study_stats,node_student_auth toneBlue
class node_librarian_dashboard,node_admin_bookings,node_admin_seats,node_library_setup,node_library_data toneAmber
class node_attendance,node_notifications toneMint
class node_smartlib,node_firebase toneRose
class node_student_actor,node_librarian_actor toneIndigo
```

## Components

### Student experience

- [Library marketplace](https://github.com/devivekrt/smartlib/blob/main/lib/student/library_market_place.dart): `lib/student/library_market_place.dart`
- [Library details](https://github.com/devivekrt/smartlib/blob/main/lib/student/library_detail_screen.dart): `lib/student/library_detail_screen.dart`
- [Seat booking](https://github.com/devivekrt/smartlib/blob/main/lib/student/seat_booking_screen.dart): `lib/student/seat_booking_screen.dart`
- [Booking history](https://github.com/devivekrt/smartlib/blob/main/lib/student/my_bookings_screen.dart): `lib/student/my_bookings_screen.dart`
- [QR check-in](https://github.com/devivekrt/smartlib/blob/main/lib/student/qr_code_screen.dart): `lib/student/qr_code_screen.dart`
- [Study statistics](https://github.com/devivekrt/smartlib/blob/main/lib/student/activity_screen.dart): `lib/student/activity_screen.dart`
- [Student access](https://github.com/devivekrt/smartlib/blob/main/lib/student/Login.dart): `lib/student/Login.dart`

### Library operations

- [Librarian dashboard](https://github.com/devivekrt/smartlib/blob/main/lib/librarian/bottom_navigation/librarain_dashboard_page.dart): `lib/librarian/bottom_navigation/librarain_dashboard_page.dart`
- [Booking administration](https://github.com/devivekrt/smartlib/blob/main/lib/librarian/bottom_navigation/librarain_booking_page.dart): `lib/librarian/bottom_navigation/librarain_booking_page.dart`
- [Admin seat board](https://github.com/devivekrt/smartlib/blob/main/lib/librarian/bottom_navigation/librarain_seats_page.dart): `lib/librarian/bottom_navigation/librarain_seats_page.dart`
- [Library setup](https://github.com/devivekrt/smartlib/blob/main/lib/library/library_details_upload.dart): `lib/library/library_details_upload.dart`
- [Library repository](https://github.com/devivekrt/smartlib/blob/main/lib/features/libraries/data/library_repository.dart): `lib/features/libraries/data/library_repository.dart`

### Activity and messaging

- [Attendance tracking](https://github.com/devivekrt/smartlib/blob/main/lib/function/student_function.dart): `lib/function/student_function.dart`
- [Notifications](https://github.com/devivekrt/smartlib/blob/main/lib/function/notification_service.dart): `lib/function/notification_service.dart`

### App and services

- [SmartLib app](https://github.com/devivekrt/smartlib/blob/main/lib/main.dart): `lib/main.dart`
- **Firebase services**

### Other components

- **Student**
- **Librarian**

## Connections

- Student → SmartLib app: uses (evidence: `README.md`)
- Librarian → SmartLib app: uses (evidence: `README.md`)
- SmartLib app → Student access: offers access (evidence: `README.md`)
- Student → Library marketplace: finds libraries (evidence: `README.md`)
- Library marketplace → Library details: views details (evidence: `README.md`)
- Student → Seat booking: books a seat (evidence: `README.md`)
- Student → QR check-in: checks in (evidence: `README.md`)
- Student → Booking history: reviews bookings (evidence: `README.md`)
- Student → Study statistics: views progress (evidence: `README.md`)
- Librarian → Librarian dashboard: manages library (evidence: `README.md`)
- Librarian → Booking administration: reviews bookings (evidence: `README.md`)
- Librarian → Admin seat board: views seat status (evidence: `README.md`)
- Librarian → Library setup: configures library (evidence: `README.md`)
- SmartLib app → Library repository: uses data layer
- SmartLib app → Firebase services: uses Firebase (evidence: `README.md`)
- SmartLib app → Notifications: sends alerts (evidence: `README.md`)
- SmartLib app → Attendance tracking: tracks check-ins (evidence: `README.md`)
