Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ihfaz297/MND/llms.txt

Use this file to discover all available pages before exploring further.

The MND mobile application is built with Flutter, providing a cross-platform solution for Android and iOS devices. The app enables students to plan bus routes, view real-time schedules, save favorite routes, and visualize journeys on interactive maps.

Architecture

The application follows a clean, layered architecture:
lib/
├── config/          # App configuration and API settings
├── models/          # Data models
├── providers/       # State management (Provider pattern)
├── screens/         # UI screens
├── services/        # Business logic and API clients
├── widgets/         # Reusable UI components
└── main.dart        # App entry point

Cross-Platform Support

The Flutter app runs natively on:
  • Android (API level 21+)
  • iOS (iOS 11.0+)
Both platforms share the same codebase, ensuring consistent functionality and user experience.

Core Features

Route Planning

Users can search for optimal bus routes between campus locations, with support for:
  • Multiple route options (fastest, cheapest)
  • Transfer information
  • Time-based scheduling
  • Walking/local transport segments

Real-time Bus Schedules

View upcoming bus departures at any stop with:
  • Live countdown timers
  • Route information
  • Destination details

Map Visualization

Interactive Google Maps integration showing:
  • Route polylines color-coded by transport mode
  • Start/end/transfer markers
  • Distance and duration statistics

User Favorites

Authenticated users can save frequently used routes for quick access.

File Structure

Configuration (config/)

  • api_config.dart - API endpoints and Google Maps configuration
  • app_theme.dart - Material Design theme settings

Models (models/)

  • route_option.dart - Route search results
  • route_leg.dart - Individual route segments
  • bus_schedule.dart - Bus departure information
  • favorite.dart - Saved route data
  • node.dart - Campus locations/stops
  • user.dart - User profile data
  • campus_building.dart - Building information

Services (services/)

  • api_service.dart - Base HTTP client
  • route_service.dart - Route planning API
  • bus_service.dart - Bus schedule API
  • auth_service.dart - Authentication
  • favorite_service.dart - Favorites management
  • directions_service.dart - Google Maps Directions API

Screens (screens/)

  • home/ - Route search interface
  • buses/ - Upcoming bus schedules
  • favorites/ - Saved routes
  • route_map/ - Interactive map view
  • profile/ - User settings
  • auth/ - Login/authentication

Key Dependencies

From pubspec.yaml:
dependencies:
  # Core Framework
  flutter:
    sdk: flutter
  
  # State Management
  provider: ^6.1.1
  
  # Networking
  http: ^1.1.0
  
  # Local Storage
  shared_preferences: ^2.2.2
  sqflite: ^2.3.0
  
  # UI Components
  google_fonts: ^6.1.0
  flutter_svg: ^2.0.9
  shimmer: ^3.0.0
  
  # Maps
  google_maps_flutter: ^2.5.0
  
  # Utilities
  intl: ^0.18.1
  flutter_dotenv: ^5.1.0

App Initialization

The app initializes in main.dart:
void main() async {
  // Initialize Flutter binding
  WidgetsFlutterBinding.ensureInitialized();

  // Load environment variables from .env file
  await dotenv.load(fileName: ".env");

  // Initialize AuthProvider
  final authProvider = AuthProvider();
  await authProvider.init();

  // Run app with MultiProvider
  runApp(
    MultiProvider(
      providers: [
        ChangeNotifierProvider.value(value: authProvider),
      ],
      child: const MyApp(),
    ),
  );
}
The app uses a bottom navigation bar with 4 main screens:
final List<Widget> _screens = [
  HomeScreen(),          // Route planning
  UpcomingBusesScreen(), // Bus schedules
  FavoritesScreen(),     // Saved routes
  ProfileScreen(),       // User profile
];
Source: lib/main.dart:66-71

Environment Variables

Required configuration in .env file:
  • GOOGLE_DM_API_KEY - Google Maps/Directions API key
  • Backend API URL is configured in lib/config/api_config.dart

Next Steps

Build docs developers (and LLMs) love