Aidra Connect 10.0.2+16
Aidra Connect Mobile Application
Loading...
Searching...
No Matches
Aidra Connect

Welcome to the documentation for Aidra Connect, a comprehensive Flutter mobile application designed for environmental management, collection tracking, and educational resources.

Overview

Aidra Connect is a Flutter application (version 10.0.2+16) that provides a complete platform for managing environmental data, tracking collections, accessing e-learning resources, and monitoring CO2 emissions. The application follows modern Flutter development practices using the BLoC pattern for state management and provides a rich user experience with support for multiple languages and themes.

Key Features

🔐 Authentication & Security

  • Secure user authentication with session management
  • Biometric authentication support (Face ID, Fingerprint)
  • JWT token-based authentication
  • Secure storage for sensitive data

📊 Dashboard & Analytics

  • Main Dashboard: Overview of key metrics and statistics
  • Environmental Dashboard: Track environmental impact and sustainability metrics
  • CO2 Emissions Tracking: Monitor and analyze carbon footprint
  • Monthly Footprint Statistics: Detailed monthly environmental reports

📦 Collections Management

  • Create and manage collection requests
  • Track collection history and transactions
  • Update collection details
  • View proposed collection times
  • Transaction history tracking

📚 E-Learning Platform

  • Access to educational courses and materials
  • PDF viewer for course documents
  • QCM (Multiple Choice Questions) for assessments
  • Course details and progress tracking
  • Support for multiple learning modules

💰 Wallet & Transactions

  • Digital wallet functionality
  • Transaction history
  • Payment processing integration

🔔 Notifications

  • Push notifications via Firebase Cloud Messaging
  • In-app notification center
  • Real-time notification updates

⚙️ Settings & Configuration

  • Theme customization (Light/Dark mode)
  • Language selection and localization
  • FAQ section
  • Profile management
  • Document management

🌍 Environmental Features

  • Energy consumption tracking
  • Waste management monitoring
  • Transport impact analysis
  • Water usage statistics
  • Food consumption tracking
  • Operational details dashboard

🛒 Smart E-Commerce

  • Integrated e-commerce functionality
  • Product browsing and management

Architecture

The application follows a clean architecture pattern with the following structure:

lib/
├── core/ # Core functionality and utilities
│ ├── api/ # API client and network layer
│ ├── router/ # Navigation and routing
│ ├── services/ # Service locator and dependency injection
│ ├── storage/ # Local storage management
│ ├── ui/ # Reusable UI components
│ └── utils/ # Utility functions
├── features/ # Feature modules
│ ├── authentication/
│ ├── dashboard/
│ ├── collections/
│ ├── elearning/
│ ├── environmental_dashboard/
│ ├── wallet/
│ └── ...
└── main.dart # Application entry point

State Management

The application uses the BLoC (Business Logic Component) pattern for state management:

  • flutter_bloc for BLoC implementation
  • bloc for core BLoC functionality
  • Separate BLoCs/Cubits for each feature module

Dependency Injection

Routing

  • GoRouter for declarative routing
  • Route guards for authentication
  • Deep linking support

Installation

To set up and run the project locally, follow these steps:

Prerequisites

  • Flutter SDK (>=3.2.1 <4.0.0)
  • Dart SDK
  • Android Studio / Xcode (for mobile development)
  • Firebase account (for push notifications and cloud services)

Setup Steps

  1. Clone the repository:
    git clone <repository-url>
    cd Connect-V.1.0
  2. Install Flutter dependencies:
    flutter pub get
  3. Configure environment variables:
    • Create .env, .env.dev, and .env.test files in the root directory
    • Add your configuration values (API endpoints, keys, etc.)
  4. Configure Firebase:
    • Add google-services.json to android/app/
    • Add GoogleService-Info.plist to ios/Runner/
  5. Run the application:
    flutter run

Building for Production

Android:

flutter build apk --release
# or
flutter build appbundle --release

iOS:

flutter build ios --release

Development

Code Structure

The project follows a feature-based modular architecture:

  • Features: Each feature is self-contained with its own:
    • Presentation layer (UI screens and widgets)
    • Logic layer (BLoCs/Cubits)
    • Data layer (models and repositories)
  • Core: Shared functionality used across features:
    • API client
    • Routing
    • Services
    • Utilities
    • UI components

Key Dependencies

  • State Management: flutter_bloc, bloc
  • Networking: dio
  • Routing: go_router
  • Dependency Injection: get_it
  • Local Storage: flutter_secure_storage, shared_preferences, hive
  • UI Components: flutter_screenutil, flutter_svg, lottie
  • Firebase: firebase_core, firebase_messaging, cloud_firestore
  • Charts: fl_chart
  • PDF: syncfusion_flutter_pdfviewer, pdf

Environment Configuration

The application supports multiple environments:

  • Development (dev)
  • Test (test)
  • Production (default)

Environment is set via --dart-define flag:

flutter run --dart-define=ENVIRONMENT=dev

Usage Examples

Basic Authentication Flow

import 'package:connect/features/authentication/presentation/logic/authentication_bloc/authentication_bloc.dart';
// Initialize authentication
final authBloc = AuthenticationBloc();
authBloc.add(LoadSessionEvent());
// Handle login
authBloc.add(LoginEvent(email: 'user@example.com', password: 'password'));

Navigation Example

import 'package:go_router/go_router.dart';
import 'package:connect/core/router/routes.dart';
// Navigate to dashboard
context.go(Routes.dashboard.route);
// Navigate with parameters
context.go('${Routes.collectionDetails.route}/$collectionId');
Routes
Definition routes.dart:32

Using BLoC

import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:connect/features/dashboard/presentation/logic/dashboard_cubit/dashboard_cubit.dart';
// Access BLoC in widget
BlocBuilder<DashboardCubit, DashboardState>(
builder: (context, state) {
if (state is DashboardLoaded) {
return DashboardView(data: state.data);
}
return LoadingIndicator();
},
)

Localization

The application supports multiple languages through the flutter_localization package. Language files are located in lib/core/localization/.

To add a new language:

  1. Create a new localization file
  2. Add translations
  3. Update the language selection in settings

Testing

Run tests using:

flutter test

For integration tests:

flutter test integration_test/

Contributing

When contributing to this project:

  1. Follow the existing code structure and patterns
  2. Use BLoC pattern for state management
  3. Write meaningful commit messages
  4. Add documentation for new features
  5. Ensure all tests pass

License

[Add your license information here]

Support

For issues, questions, or contributions, please refer to the project repository or contact the development team.


Version: 10.0.2+16
Last Updated: 2024