Skip to content

jainambarbhaya1509/Scheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

92 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Scheduler - Faculty Timetable Management System

A comprehensive Flutter application for managing faculty schedules, class timetables, and administrative operations. This app provides role-based access for Super Admins, HODs (Heads of Department), Admins, and Faculty members.

πŸ“‹ Table of Contents

🎯 Overview

The Schedule application is a role-based timetable management system built with Flutter that enables institutions to efficiently manage faculty schedules, class availability, and department timetables. The app integrates with Firebase for real-time data synchronization and authentication.

App Name: Scheduler
Version: 1.0.0+1
Flutter SDK: ^3.9.2
Platform Support: iOS, Android, Web

✨ Features

Core Functionality

  • Role-Based Access Control: Super Admin, HOD, Admin, and Faculty roles
  • Real-Time Data Sync: Cloud Firestore integration for instant updates
  • Timetable Management: Create, view, and manage faculty schedules
  • Class Availability Tracking: Track class timing and availability
  • Request Management: Handle faculty requests with approval workflow
  • Department Management: Manage department-level scheduling
  • Status Tracking: Monitor scheduling status and conflicts
  • Excel Import/Export: Import and export timetables in Excel format
  • Notification System: Real-time notifications for approvals and changes

Admin Features

  • User management and permission control
  • Department and faculty management
  • Timetable approval and validation
  • Analytics and reporting

Faculty Features

  • View assigned schedules
  • Request schedule changes
  • Manage class availability
  • View request status
  • Download schedules

πŸ“ Project Structure

schedule/
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ main.dart                 # App entry point
β”‚   β”œβ”€β”€ firebase_options.dart     # Firebase configuration
β”‚   β”œβ”€β”€ initializations.dart      # App initialization
β”‚   β”œβ”€β”€ imports.dart              # Central imports file
β”‚   β”œβ”€β”€ .env                      # Environment variables
β”‚   β”‚
β”‚   β”œβ”€β”€ controller/               # Business logic & state management
β”‚   β”‚   β”œβ”€β”€ auth/                 # Authentication controller
β”‚   β”‚   β”œβ”€β”€ session/              # User session controller
β”‚   β”‚   β”œβ”€β”€ schedule/             # Schedule management controller
β”‚   β”‚   β”œβ”€β”€ requests/             # Request handling controller
β”‚   β”‚   └── superadmin/           # Super admin operations
β”‚   β”‚
β”‚   β”œβ”€β”€ pages/                    # UI Pages
β”‚   β”‚   β”œβ”€β”€ splash_page.dart      # App splash screen
β”‚   β”‚   β”œβ”€β”€ home.dart             # Main home page with role-based navigation
β”‚   β”‚   β”œβ”€β”€ login/                # Login page and authentication
β”‚   β”‚   β”œβ”€β”€ profile/              # User profile management
β”‚   β”‚   β”œβ”€β”€ schedule/             # Schedule viewing and management
β”‚   β”‚   β”œβ”€β”€ manage_timetable/     # Timetable creation and editing
β”‚   β”‚   β”œβ”€β”€ requests/             # Request management interface
β”‚   β”‚   β”œβ”€β”€ status/               # Status tracking page
β”‚   β”‚   └── superadmin/           # Super admin dashboard
β”‚   β”‚
β”‚   β”œβ”€β”€ models/                   # Data models
β”‚   β”‚   β”œβ”€β”€ faculty_model.dart
β”‚   β”‚   β”œβ”€β”€ class_timing_model.dart
β”‚   β”‚   β”œβ”€β”€ class_avalability_model.dart
β”‚   β”‚   β”œβ”€β”€ dept_availability_model.dart
β”‚   β”‚   └── users_applied_model.dart
β”‚   β”‚
β”‚   β”œβ”€β”€ services/                 # Backend services
β”‚   β”‚   β”œβ”€β”€ firestore_service.dart
β”‚   β”‚   β”œβ”€β”€ session_service.dart
β”‚   β”‚   └── error_handler.dart
β”‚   β”‚
β”‚   β”œβ”€β”€ helper/                   # Helper utilities
β”‚   β”œβ”€β”€ utils/                    # Utility functions
β”‚   └── widgets/                  # Reusable UI components
β”‚
β”œβ”€β”€ android/                      # Android native code
β”œβ”€β”€ ios/                          # iOS native code
β”œβ”€β”€ web/                          # Web platform code
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ icon.png
β”‚   └── template.xlsx
β”œβ”€β”€ pubspec.yaml                  # Flutter dependencies
└── firebase.json                 # Firebase config

πŸ“¦ Prerequisites

Before you begin, ensure you have the following installed:

  • Flutter SDK: Version 3.9.2 or higher
    flutter --version
  • Dart SDK: ^3.9.2 (comes with Flutter)
  • Android Studio or Xcode for mobile development
  • Firebase Account: For Firestore and authentication
  • Git: For version control
  • macOS 11+, Windows 10+, or Linux: For development machine

πŸš€ Getting Started

1. Clone the Repository

git clone <repository-url>
cd schedule

2. Install Dependencies

flutter pub get

3. Configure Firebase

Follow the Firebase setup instructions in the Firebase Setup section.

4. Set Environment Variables

Create a .env file in the lib/ directory with necessary variables.

5. Run the App

# Run on default device/emulator
flutter run

# Run on specific device
flutter run -d <device-id>

# Run in debug mode with verbose logging
flutter run -v

# Run release build
flutter run --release

πŸ—οΈ Architecture

State Management: GetX

The app uses GetX (GetIt alternative) for state management, dependency injection, and navigation:

// Register controller
Get.put(SessionController());

// Access controller
final controller = Get.find<SessionController>();

// Navigation
Get.to(() => HomePage());

Service Layer

  • FirestoreService: Handles all Firestore CRUD operations
  • SessionService: Manages user session and authentication state
  • ErrorHandler: Centralized error handling and user feedback

Data Flow

UI (Pages) β†’ Controllers (GetX) β†’ Services (Firestore) β†’ Firebase
                    ↓
              Reactive Updates via RxDart

πŸ‘₯ Key Features by Role

Super Admin

  • Manage all faculty and roles
  • Manage faculty and departments
  • Approve/reject timetables
  • Generate reports
  • System configuration
  • View analytics

HOD (Head of Department)

  • Manage department faculty
  • Create and approve department timetables
  • Monitor schedule conflicts
  • Request approvals
  • View department reports

Admin

  • Manage faculty within scope
  • Create/edit timetables
  • Process requests
  • View schedules and status
  • Export data

Faculty

  • View assigned schedule
  • Request schedule changes
  • Manage availability
  • Track request status
  • Download schedules

πŸ’Ύ Database Schema

Firestore Collections

Slots Collection (Main Scheduling Data)

slots/
β”œβ”€β”€ {day} (e.g., "Monday", "Tuesday")
β”‚   β”œβ”€β”€ departments/
β”‚   β”‚   β”œβ”€β”€ {deptId}
β”‚   β”‚   β”‚   β”œβ”€β”€ Classrooms/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ {roomId}: {room details}
β”‚   β”‚   β”‚   β”‚   └── _meta: {metadata}
β”‚   β”‚   β”‚   └── Labs/
β”‚   β”‚   β”‚       β”œβ”€β”€ {labId}: {lab details}
β”‚   β”‚   β”‚       └── _meta: {metadata}

Data Structure Example:

{
  "timing": "09:00-10:00",
  "applications": {
    "17-11-2025": [
      {
        "username": "Dr. Smith",
        "status": "Pending|Approved|Rejected",
        "reason": "Regular class"
      }
    ]
  }
}

Key Collections Used

  • slots/: Hierarchical storage for daily classroom/lab availability
    • By Day: Monday, Tuesday, Wednesday, etc.
    • By Department: Different departments
    • By Section: Classrooms, Labs
    • By Room/Lab ID: Specific room details

Timetable Collection

timetables/
β”œβ”€β”€ {deptId}_semester_{semesterNo}
β”‚   β”œβ”€β”€ department: string
β”‚   β”œβ”€β”€ semester: string
β”‚   β”œβ”€β”€ schedule: map (structured schedule data)
β”‚   β”œβ”€β”€ status: string (draft, pending, approved)
β”‚   └── metadata: map

Requests Collection

requests/
β”œβ”€β”€ {requestId}
β”‚   β”œβ”€β”€ username: string
β”‚   β”œβ”€β”€ department: string
β”‚   β”œβ”€β”€ type: string (ClassroomChange, TimeSlotChange, etc.)
β”‚   β”œβ”€β”€ status: string (pending, approved, rejected)
β”‚   β”œβ”€β”€ reason: string
β”‚   └── createdAt: timestamp

Users/Faculty Collection

faculty/ or faculty/
β”œβ”€β”€ {email}
β”‚   β”œβ”€β”€ username: string
β”‚   β”œβ”€β”€ email: string
β”‚   β”œβ”€β”€ department: string
β”‚   β”œβ”€β”€ isHOD: boolean
β”‚   β”œβ”€β”€ isAdmin: boolean
β”‚   β”œβ”€β”€ isSuperAdmin: boolean
β”‚   └── createdAt: timestamp

πŸ—οΈ Building & Deployment

Build APK (Android)

# Debug APK
flutter build apk --debug

# Release APK
flutter build apk --release

# Split APKs by architecture
flutter build apk --release --split-per-abi

Build App Bundle (Google Play)

flutter build appbundle --release

Build IPA (iOS)

# Build for physical device
flutter build ios --release

# Build for simulator
flutter build ios --simulator

Build for Web

# Build web app
flutter build web --release

# Serve locally
flutter run -d chrome

Deployment Checklist

  • Update version in pubspec.yaml
  • Update Firebase configuration for production
  • Set up production Firestore rules
  • Configure Android signing keys
  • Configure iOS provisioning profiles
  • Run flutter test to ensure all tests pass
  • Perform manual QA testing
  • Enable crash reporting and analytics
  • Set up monitoring and logging
  • Document any breaking changes

πŸ› Troubleshooting

Common Issues

"Firebase not initialized"

Solution: Ensure Firebase.initializeApp() is called before running the app in main.dart.

"Plugin not found" errors

flutter pub get
flutter pub upgrade
flutter clean
flutter pub get

Firestore permission denied

Solution: Check Firestore rules. For development:

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if true;
    }
  }
}

Build failing on iOS

cd ios
pod deintegrate
pod install
cd ..
flutter clean
flutter pub get
flutter run

Android build issues

flutter clean
cd android
./gradlew clean
cd ..
flutter pub get
flutter run

Hot reload not working

  • Ensure app is running in debug mode
  • Try hot restart: R key
  • If persistent, restart the app

πŸ“Š Key Dependencies

Package Version Purpose
get ^4.7.2 State management & navigation
firebase_core ^3.13.0 Firebase initialization
cloud_firestore ^5.6.12 Cloud database
excel ^4.0.6 Excel file handling
file_picker ^10.3.6 File selection
shared_preferences ^2.5.3 Local storage
intl ^0.20.2 Internationalization
mailer ^6.6.0 Email functionality
permission_handler ^12.0.1 App permissions
device_preview ^1.2.0 Device preview (dev)

Running Tests

# Run all tests
flutter test

# Run specific test file
flutter test test/unit/test_name.dart

# Run with coverage
flutter test --coverage

Code Analysis

# Analyze code
flutter analyze

# Format code
dart format lib/

# Fix issues automatically
dart fix --apply

Debug Logging

The app uses the logger package:

import 'package:schedule/initializations.dart';

logger.d('Debug message');
logger.i('Info message');
logger.w('Warning message');
logger.e('Error message');

8. Compiled Code Optimization

Enable Dart AOT Compilation:

# Build with optimizations
flutter build apk --release --split-per-abi

flutter build appbundle --release

flutter build ios --release

Use --obfuscate and --split-debug-info:

flutter build apk --release --obfuscate --split-debug-info=./symbols/

πŸ“ˆ Performance Optimization

Performance Benchmarks (Target)

Metric Target Current
First Load < 3s Monitor
Schedule Fetch < 2s Optimize queries
Page Transition < 300ms Reduce rebuilds
Memory Usage < 150MB Monitor profiles
Firebase RTD < 100ms Add caching
App Size < 100MB Remove unused deps

Performance Checklist

  • Add Firestore composite indexes
  • Implement pagination for large lists
  • Add image caching and compression
  • Enable offline persistence
  • Implement batch operations
  • Use const constructors throughout
  • Profile with DevTools regularly
  • Monitor Firestore read/write operations
  • Optimize build sizes with --split-per-abi
  • Add analytics and crash reporting
  • Set up automated performance testing
  • Reduce unnecessary widget rebuilds with Obx scoping
  • Implement lazy loading for lists

πŸ“± Supported Platforms

  • βœ… Android: 5.1+ (API level 22+)
  • βœ… iOS: 11.0+
  • βœ… Web: Chrome, Firefox, Safari, Edge

πŸ“„ License

This project is proprietary and confidential.

πŸ‘₯ Support & Contact

For issues, questions, or contributions:

  • Create an issue in the repository
  • Contact the development team
  • Review Firebase documentation at firebase.google.com
  • Check Flutter docs at flutter.dev

Last Updated: December 30, 2025
Maintained by: Development Team

Releases

No releases published

Packages

 
 
 

Contributors