# Flutter Project Structure - AI Study Assistant ## ๐Ÿ“ COMPLETE PROJECT ARCHITECTURE --- ## ๐Ÿ—๏ธ OVERVIEW This document outlines the complete Flutter project structure for the AI Study Assistant, following clean architecture principles and best practices for scalable, maintainable code. --- ## ๐Ÿ“ ROOT DIRECTORY STRUCTURE ``` teachit/ โ”œโ”€โ”€ android/ # Android-specific files โ”œโ”€โ”€ ios/ # iOS-specific files โ”œโ”€โ”€ web/ # Web-specific files โ”œโ”€โ”€ lib/ # Main Flutter source code โ”œโ”€โ”€ test/ # Test files โ”œโ”€โ”€ assets/ # Static assets โ”œโ”€โ”€ docs/ # Documentation โ”œโ”€โ”€ tools/ # Development tools and scripts โ”œโ”€โ”€ .gitignore # Git ignore file โ”œโ”€โ”€ .metadata # Flutter metadata โ”œโ”€โ”€ pubspec.yaml # Dependencies and project config โ”œโ”€โ”€ README.md # Project documentation โ”œโ”€โ”€ analysis_options.yaml # Dart analysis configuration โ””โ”€โ”€ .vscode/ # VS Code configuration โ”œโ”€โ”€ launch.json # Debug configurations โ”œโ”€โ”€ tasks.json # Build tasks โ””โ”€โ”€ settings.json # Editor settings ``` --- ## ๐Ÿ“š LIB DIRECTORY STRUCTURE ### Main Source Code Organization ``` lib/ โ”œโ”€โ”€ main.dart # Application entry point โ”œโ”€โ”€ app/ # App-level configuration โ”‚ โ”œโ”€โ”€ app.dart # Main app widget โ”‚ โ”œโ”€โ”€ router/ # Navigation configuration โ”‚ โ”‚ โ”œโ”€โ”€ app_router.dart # GoRouter configuration โ”‚ โ”‚ โ”œโ”€โ”€ routes.dart # Route definitions โ”‚ โ”‚ โ””โ”€โ”€ route_guard.dart # Route guards/middleware โ”‚ โ”œโ”€โ”€ theme/ # Theme and styling โ”‚ โ”‚ โ”œโ”€โ”€ app_theme.dart # Main theme configuration โ”‚ โ”‚ โ”œโ”€โ”€ app_colors.dart # Color palette โ”‚ โ”‚ โ”œโ”€โ”€ app_text_styles.dart # Typography โ”‚ โ”‚ โ”œโ”€โ”€ app_spacing.dart # Spacing constants โ”‚ โ”‚ โ””โ”€โ”€ dark_theme.dart # Dark mode theme โ”‚ โ”œโ”€โ”€ constants/ # App-wide constants โ”‚ โ”‚ โ”œโ”€โ”€ app_constants.dart # General app constants โ”‚ โ”‚ โ”œโ”€โ”€ api_constants.dart # API endpoints โ”‚ โ”‚ โ”œโ”€โ”€ firebase_constants.dart # Firebase references โ”‚ โ”‚ โ””โ”€โ”€ route_constants.dart # Route paths โ”‚ โ””โ”€โ”€ widgets/ # App-level reusable widgets โ”‚ โ”œโ”€โ”€ app_scaffold.dart # Main scaffold wrapper โ”‚ โ”œโ”€โ”€ app_bottom_navigation.dart # Bottom navigation โ”‚ โ”œโ”€โ”€ app_drawer.dart # Navigation drawer โ”‚ โ”œโ”€โ”€ app_sliver_app_bar.dart # Custom app bar โ”‚ โ””โ”€โ”€ loading_overlay.dart # Global loading overlay โ”œโ”€โ”€ core/ # Core functionality (cross-features) โ”‚ โ”œโ”€โ”€ errors/ # Error handling โ”‚ โ”‚ โ”œโ”€โ”€ exceptions.dart # Custom exceptions โ”‚ โ”‚ โ”œโ”€โ”€ failures.dart # Failure classes โ”‚ โ”‚ โ””โ”€โ”€ error_handler.dart # Global error handler โ”‚ โ”œโ”€โ”€ utils/ # Utility functions โ”‚ โ”‚ โ”œโ”€โ”€ logger.dart # Logging utility โ”‚ โ”‚ โ”œโ”€โ”€ validators.dart # Input validators โ”‚ โ”‚ โ”œโ”€โ”€ extensions.dart # Dart extensions โ”‚ โ”‚ โ”œโ”€โ”€ helpers.dart # Helper functions โ”‚ โ”‚ โ”œโ”€โ”€ date_utils.dart # Date utilities โ”‚ โ”‚ โ””โ”€โ”€ formatters.dart # Data formatters โ”‚ โ”œโ”€โ”€ services/ # Global services โ”‚ โ”‚ โ”œโ”€โ”€ storage_service.dart # Local storage โ”‚ โ”‚ โ”œโ”€โ”€ notification_service.dart # Notifications โ”‚ โ”‚ โ”œโ”€โ”€ network_service.dart # Network connectivity โ”‚ โ”‚ โ”œโ”€โ”€ biometric_service.dart # Biometric auth โ”‚ โ”‚ โ””โ”€โ”€ analytics_service.dart # Analytics tracking โ”‚ โ”œโ”€โ”€ network/ # Network layer โ”‚ โ”‚ โ”œโ”€โ”€ dio_client.dart # HTTP client configuration โ”‚ โ”‚ โ”œโ”€โ”€ interceptors.dart # Request/response interceptors โ”‚ โ”‚ โ”œโ”€โ”€ api_client.dart # API client wrapper โ”‚ โ”‚ โ””โ”€โ”€ network_info.dart # Network connectivity โ”‚ โ””โ”€โ”€ security/ # Security features โ”‚ โ”œโ”€โ”€ encryption.dart # Encryption utilities โ”‚ โ”œโ”€โ”€ secure_storage.dart # Secure storage โ”‚ โ””โ”€โ”€ auth_manager.dart # Authentication manager โ”œโ”€โ”€ features/ # Feature-based organization โ”‚ โ”œโ”€โ”€ auth/ # Authentication feature โ”‚ โ”‚ โ”œโ”€โ”€ data/ # Data layer โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ datasources/ # Data sources โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ auth_remote_datasource.dart # Remote API โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ auth_local_datasource.dart # Local storage โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ auth_cache_datasource.dart # Cache layer โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ models/ # Data models โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ user_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ auth_result_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ token_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ role_model.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ repositories/ # Repository implementations โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ auth_repository_impl.dart โ”‚ โ”‚ โ”œโ”€โ”€ domain/ # Business logic โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ entities/ # Domain entities โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ user.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ auth_result.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ token.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ role.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ repositories/ # Repository interfaces โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ auth_repository.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ usecases/ # Use cases (business logic) โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ sign_in.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ sign_up.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ sign_out.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ reset_password.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ get_current_user.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ update_profile.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ refresh_token.dart โ”‚ โ”‚ โ””โ”€โ”€ presentation/ # UI layer โ”‚ โ”‚ โ”œโ”€โ”€ providers/ # State management (Riverpod) โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ auth_provider.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ user_provider.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ session_provider.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ auth_state_provider.dart โ”‚ โ”‚ โ”œโ”€โ”€ screens/ # Screen widgets โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ login_screen.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ signup_screen.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ forgot_password_screen.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ profile_setup_screen.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ email_verification_screen.dart โ”‚ โ”‚ โ””โ”€โ”€ widgets/ # Feature-specific widgets โ”‚ โ”‚ โ”œโ”€โ”€ auth_form.dart โ”‚ โ”‚ โ”œโ”€โ”€ social_login_button.dart โ”‚ โ”‚ โ”œโ”€โ”€ password_input_field.dart โ”‚ โ”‚ โ”œโ”€โ”€ email_input_field.dart โ”‚ โ”‚ โ”œโ”€โ”€ terms_checkbox.dart โ”‚ โ”‚ โ””โ”€โ”€ verification_code_input.dart โ”‚ โ”œโ”€โ”€ student/ # Student feature โ”‚ โ”‚ โ”œโ”€โ”€ data/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ datasources/ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ student_remote_datasource.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ student_local_datasource.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ learning_state_datasource.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ models/ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ student_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ learning_state_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ concept_mastery_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ quiz_attempt_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ interaction_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ feedback_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ recommendation_model.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ repositories/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ student_repository_impl.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ learning_state_repository_impl.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ quiz_repository_impl.dart โ”‚ โ”‚ โ”œโ”€โ”€ domain/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ entities/ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ student.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ learning_state.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ concept_mastery.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ quiz_attempt.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ interaction.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ feedback.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ recommendation.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ learning_goal.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ spaced_repetition.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ repositories/ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ student_repository.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ learning_state_repository.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ quiz_repository.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ usecases/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ get_learning_state.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ update_learning_state.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ submit_quiz_attempt.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ get_quiz_history.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ get_recommendations.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ submit_feedback.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ track_interaction.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ update_mastery.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ get_progress_analytics.dart โ”‚ โ”‚ โ””โ”€โ”€ presentation/ โ”‚ โ”‚ โ”œโ”€โ”€ providers/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ student_provider.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ learning_state_provider.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ quiz_provider.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ chat_provider.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ recommendation_provider.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ progress_provider.dart โ”‚ โ”‚ โ”œโ”€โ”€ screens/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ student_dashboard_screen.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ ask_tutor_screen.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ quiz_screen.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ progress_screen.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ profile_screen.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ recommendations_screen.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ quiz_history_screen.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ settings_screen.dart โ”‚ โ”‚ โ””โ”€โ”€ widgets/ โ”‚ โ”‚ โ”œโ”€โ”€ mastery_progress_bar.dart โ”‚ โ”‚ โ”œโ”€โ”€ concept_card.dart โ”‚ โ”‚ โ”œโ”€โ”€ quiz_question_card.dart โ”‚ โ”‚ โ”œโ”€โ”€ chat_bubble.dart โ”‚ โ”‚ โ”œโ”€โ”€ feedback_widget.dart โ”‚ โ”‚ โ”œโ”€โ”€ recommendation_card.dart โ”‚ โ”‚ โ”œโ”€โ”€ learning_streak_widget.dart โ”‚ โ”‚ โ”œโ”€โ”€ misconception_alert.dart โ”‚ โ”‚ โ””โ”€โ”€ progress_chart.dart โ”‚ โ”œโ”€โ”€ teacher/ # Teacher feature โ”‚ โ”‚ โ”œโ”€โ”€ data/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ datasources/ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ teacher_remote_datasource.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ teacher_local_datasource.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ content_datasource.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ analytics_datasource.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ models/ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ teacher_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ content_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ quiz_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ class_analytics_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ student_summary_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ content_upload_model.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ repositories/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ teacher_repository_impl.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ content_repository_impl.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ analytics_repository_impl.dart โ”‚ โ”‚ โ”œโ”€โ”€ domain/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ entities/ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ teacher.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ content.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ quiz.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ class_analytics.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ student_summary.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ content_upload.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ repositories/ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ teacher_repository.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ content_repository.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ analytics_repository.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ usecases/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ upload_content.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ create_quiz.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ get_class_analytics.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ manage_students.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ get_content_list.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ update_content.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ get_student_progress.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ export_analytics.dart โ”‚ โ”‚ โ””โ”€โ”€ presentation/ โ”‚ โ”‚ โ”œโ”€โ”€ providers/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ teacher_provider.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ content_provider.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ analytics_provider.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ class_management_provider.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ quiz_creation_provider.dart โ”‚ โ”‚ โ”œโ”€โ”€ screens/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ teacher_dashboard_screen.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ upload_content_screen.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ create_quiz_screen.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ class_analytics_screen.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ manage_students_screen.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ content_library_screen.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ quiz_management_screen.dart โ”‚ โ”‚ โ””โ”€โ”€ widgets/ โ”‚ โ”‚ โ”œโ”€โ”€ content_upload_card.dart โ”‚ โ”‚ โ”œโ”€โ”€ quiz_builder.dart โ”‚ โ”‚ โ”œโ”€โ”€ analytics_chart.dart โ”‚ โ”‚ โ”œโ”€โ”€ student_list_item.dart โ”‚ โ”‚ โ”œโ”€โ”€ content_preview.dart โ”‚ โ”‚ โ”œโ”€โ”€ class_summary_card.dart โ”‚ โ”‚ โ””โ”€โ”€ export_button.dart โ”‚ โ”œโ”€โ”€ shared/ # Shared components across features โ”‚ โ”‚ โ”œโ”€โ”€ data/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ models/ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ message_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ feedback_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ notification_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ file_model.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ app_settings_model.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ datasources/ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ shared_remote_datasource.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ shared_local_datasource.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ file_storage_datasource.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ repositories/ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ shared_repository_impl.dart โ”‚ โ”‚ โ”œโ”€โ”€ domain/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ entities/ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ message.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ feedback.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ notification.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ file.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ app_settings.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ repositories/ โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ shared_repository.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ usecases/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ send_message.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ submit_feedback.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ upload_file.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ get_notifications.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ update_settings.dart โ”‚ โ”‚ โ””โ”€โ”€ presentation/ โ”‚ โ”‚ โ”œโ”€โ”€ widgets/ # Reusable UI components โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ buttons/ # Button components โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ primary_button.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ secondary_button.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ icon_button.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ text_button.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ floating_action_button.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ inputs/ # Input components โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ custom_text_field.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ search_field.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ password_field.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ text_area_field.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ dropdown_field.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ cards/ # Card components โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ standard_card.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ interactive_card.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ media_card.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ expandable_card.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ lists/ # List components โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ standard_list_tile.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ expandable_list_tile.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ selection_list_tile.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ swipe_list_tile.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ dialogs/ # Dialog components โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ confirmation_dialog.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ info_dialog.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ input_dialog.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ selection_dialog.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ bottomsheets/ # Bottom sheet components โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ standard_bottom_sheet.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ picker_bottom_sheet.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ action_bottom_sheet.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ indicators/ # Loading and progress โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ loading_widget.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ progress_bar.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ shimmer_loading.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ pull_to_refresh.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ layout/ # Layout components โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ responsive_layout.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ adaptive_layout.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ section_layout.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ grid_layout.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ media/ # Media components โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ image_viewer.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ video_player.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ audio_player.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ file_preview.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ animations/ # Animation components โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ fade_in.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ slide_in.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ scale_in.dart โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ staggered_animation.dart โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ page_transition.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ charts/ # Chart components โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ line_chart.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ bar_chart.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ pie_chart.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ progress_chart.dart โ”‚ โ”‚ โ””โ”€โ”€ providers/ # Shared state providers โ”‚ โ”‚ โ”œโ”€โ”€ theme_provider.dart โ”‚ โ”‚ โ”œโ”€โ”€ connectivity_provider.dart โ”‚ โ”‚ โ”œโ”€โ”€ notification_provider.dart โ”‚ โ”‚ โ”œโ”€โ”€ settings_provider.dart โ”‚ โ”‚ โ”œโ”€โ”€ file_provider.dart โ”‚ โ”‚ โ””โ”€โ”€ biometric_provider.dart โ””โ”€โ”€ l10n/ # Internationalization โ”œโ”€โ”€ app_localizations.dart # Localization setup โ”œโ”€โ”€ app_en.arb # English translations โ”œโ”€โ”€ app_pt.arb # Portuguese translations โ””โ”€โ”€ app_es.arb # Spanish translations ``` --- ## ๐Ÿ”ง CONFIGURATION FILES ### pubspec.yaml ```yaml name: teachit description: AI Study Assistant - Educational Intelligence Platform version: 1.0.0+1 environment: sdk: '>=3.11.5 <4.0.0' flutter: ">=3.41.0" dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter # State Management flutter_riverpod: ^2.4.9 riverpod_annotation: ^2.3.3 # Navigation go_router: ^12.1.3 flutter_animate: ^4.2.0+1 # Firebase firebase_core: ^2.24.2 firebase_auth: ^4.15.3 cloud_firestore: ^4.13.6 firebase_storage: ^11.5.6 firebase_analytics: ^10.7.4 firebase_messaging: ^14.7.6 firebase_crashlytics: ^3.4.8 # UI Components cupertino_icons: ^1.0.6 google_fonts: ^6.1.0 cached_network_image: ^3.3.0 flutter_svg: ^2.0.9 lottie: ^2.7.0 shimmer: ^3.0.0 flutter_staggered_animations: ^1.1.1 # HTTP & Networking dio: ^5.4.0 http: ^1.1.2 connectivity_plus: ^5.0.2 retry: ^3.1.2 # Local Storage shared_preferences: ^2.2.2 hive: ^2.2.3 hive_flutter: ^1.1.0 secure_storage: ^9.0.0 path_provider: ^2.1.1 # Utilities intl: ^0.19.0 uuid: ^4.2.1 equatable: ^2.0.5 json_annotation: ^4.8.1 freezed_annotation: ^2.4.1 collection: ^1.18.0 # File Handling file_picker: ^6.1.1 image_picker: ^1.0.4 permission_handler: ^11.0.1 path: ^1.8.3 # Charts & Graphs fl_chart: ^0.64.0 syncfusion_flutter_charts: ^24.1.44 # Biometrics local_auth: ^2.1.7 # WebView webview_flutter: ^4.4.2 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^3.0.1 build_runner: ^2.4.7 riverpod_generator: ^2.3.9 json_serializable: ^6.7.1 freezed: ^2.4.6 hive_generator: ^2.0.1 mockito: ^5.4.4 integration_test: sdk: flutter flutter: uses-material-design: true assets: - assets/images/ - assets/icons/ - assets/animations/ - assets/fonts/ fonts: - family: Inter fonts: - asset: assets/fonts/Inter-Regular.ttf - asset: assets/fonts/Inter-Medium.ttf weight: 500 - asset: assets/fonts/Inter-SemiBold.ttf weight: 600 - asset: assets/fonts/Inter-Bold.ttf weight: 700 ``` ### analysis_options.yaml ```yaml include: package:flutter_lints/flutter.yaml analyzer: exclude: - "**/*.g.dart" - "**/*.freezed.dart" errors: invalid_annotation_target: ignore unused_import: ignore unused_element: ignore linter: rules: # Style rules - prefer_single_quotes - sort_constructors_first - sort_unnamed_constructors_first - always_declare_return_types - avoid_print - avoid_unnecessary_containers - prefer_const_constructors - prefer_const_literals_to_create_immutables - prefer_final_fields - prefer_final_locals - unnecessary_const - unnecessary_new - prefer_if_elements_to_conditional_expressions # Documentation rules - slash_for_doc_comments - package_api_docs - comment_references # Design rules - avoid_web_libraries_in_flutter - avoid_type_to_string - cast_nullable_to_non_nullable - deprecated_consistency - implicit_call_tearoffs - library_prefixes - omit_local_variable_types - prefer_adjacent_string_concatenation - prefer_function_declarations_over_variables - prefer_mixin - type_annotate_public_apis - unnecessary_await_in_return - unnecessary_lambdas - use_super_parameters ``` --- ## ๐Ÿ“ฑ PLATFORM-SPECIFIC FILES ### Android Configuration **android/app/build.gradle** ```gradle android { namespace 'com.example.teachit' compileSdkVersion flutter.compileSdkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = '17' } defaultConfig { applicationId "com.example.teachit" minSdkVersion 21 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName multiDexEnabled true } buildTypes { release { signingConfig signingConfigs.debug minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } debug { minifyEnabled false } } } dependencies { implementation 'androidx.multidex:multidex:2.0.1' implementation 'com.google.firebase:firebase-messaging' implementation 'com.google.firebase:firebase-analytics' } ``` ### iOS Configuration **ios/Runner/Info.plist** ```xml CFBundleDisplayName TeachIt CFBundleIdentifier com.example.teachit CFBundleVersion 1.0 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIStatusBarStyle UIStatusBarStyleLightContent NSCameraUsageDescription This app needs camera access for profile photos NSPhotoLibraryUsageDescription This app needs photo library access for profile photos ``` --- ## ๐Ÿงช TEST STRUCTURE ### Test Organization ``` test/ โ”œโ”€โ”€ unit/ # Unit tests โ”‚ โ”œโ”€โ”€ features/ โ”‚ โ”‚ โ”œโ”€โ”€ auth/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ test_auth_provider.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ test_sign_in_usecase.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ test_user_model.dart โ”‚ โ”‚ โ”œโ”€โ”€ student/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ test_learning_state_provider.dart โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ test_quiz_provider.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ test_concept_mastery.dart โ”‚ โ”‚ โ””โ”€โ”€ shared/ โ”‚ โ”‚ โ”œโ”€โ”€ test_widgets.dart โ”‚ โ”‚ โ””โ”€โ”€ test_utils.dart โ”‚ โ”œโ”€โ”€ core/ โ”‚ โ”‚ โ”œโ”€โ”€ test_services.dart โ”‚ โ”‚ โ”œโ”€โ”€ test_utils.dart โ”‚ โ”‚ โ””โ”€โ”€ test_network.dart โ”‚ โ””โ”€โ”€ helpers/ โ”‚ โ”œโ”€โ”€ test_helpers.dart โ”‚ โ”œโ”€โ”€ mock_data.dart โ”‚ โ””โ”€โ”€ test_fixtures.dart โ”œโ”€โ”€ widget/ # Widget tests โ”‚ โ”œโ”€โ”€ features/ โ”‚ โ”‚ โ”œโ”€โ”€ auth/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ test_login_screen.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ test_signup_screen.dart โ”‚ โ”‚ โ”œโ”€โ”€ student/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ test_dashboard_screen.dart โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ test_chat_screen.dart โ”‚ โ”‚ โ””โ”€โ”€ shared/ โ”‚ โ”‚ โ”œโ”€โ”€ test_buttons.dart โ”‚ โ”‚ โ”œโ”€โ”€ test_cards.dart โ”‚ โ”‚ โ””โ”€โ”€ test_inputs.dart โ”‚ โ””โ”€โ”€ helpers/ โ”‚ โ”œโ”€โ”€ widget_test_helpers.dart โ”‚ โ””โ”€โ”€ mock_providers.dart โ”œโ”€โ”€ integration/ # Integration tests โ”‚ โ”œโ”€โ”€ test_auth_flow.dart โ”‚ โ”œโ”€โ”€ test_student_dashboard.dart โ”‚ โ”œโ”€โ”€ test_teacher_dashboard.dart โ”‚ โ””โ”€โ”€ test_chat_functionality.dart โ””โ”€โ”€ e2e/ # End-to-end tests โ”œโ”€โ”€ app_test.dart โ”œโ”€โ”€ auth_flow_test.dart โ””โ”€โ”€ learning_flow_test.dart ``` --- ## ๐Ÿ“ฆ ASSETS ORGANIZATION ### Asset Structure ``` assets/ โ”œโ”€โ”€ images/ โ”‚ โ”œโ”€โ”€ logos/ โ”‚ โ”‚ โ”œโ”€โ”€ app_logo.png โ”‚ โ”‚ โ”œโ”€โ”€ app_logo_dark.png โ”‚ โ”‚ โ””โ”€โ”€ epvc_logo.png โ”‚ โ”œโ”€โ”€ icons/ โ”‚ โ”‚ โ”œโ”€โ”€ app_icon.png โ”‚ โ”‚ โ”œโ”€โ”€ notification_icon.png โ”‚ โ”‚ โ””โ”€โ”€ placeholder.png โ”‚ โ”œโ”€โ”€ illustrations/ โ”‚ โ”‚ โ”œโ”€โ”€ learning_illustration.svg โ”‚ โ”‚ โ”œโ”€โ”€ studying_illustration.svg โ”‚ โ”‚ โ””โ”€โ”€ success_illustration.svg โ”‚ โ””โ”€โ”€ backgrounds/ โ”‚ โ”œโ”€โ”€ login_bg.png โ”‚ โ”œโ”€โ”€ dashboard_bg.png โ”‚ โ””โ”€โ”€ onboarding_bg.png โ”œโ”€โ”€ animations/ โ”‚ โ”œโ”€โ”€ loading_animation.json โ”‚ โ”œโ”€โ”€ success_animation.json โ”‚ โ”œโ”€โ”€ error_animation.json โ”‚ โ””โ”€โ”€ onboarding_animation.json โ”œโ”€โ”€ fonts/ โ”‚ โ”œโ”€โ”€ Inter-Regular.ttf โ”‚ โ”œโ”€โ”€ Inter-Medium.ttf โ”‚ โ”œโ”€โ”€ Inter-SemiBold.ttf โ”‚ โ”œโ”€โ”€ Inter-Bold.ttf โ”‚ โ””โ”€โ”€ Inter-Italic.ttf โ””โ”€โ”€ data/ โ”œโ”€โ”€ sample_quiz_data.json โ”œโ”€โ”€ mock_user_data.json โ””โ”€โ”€ test_content.json ``` --- ## ๐Ÿ”ง DEVELOPMENT TOOLS ### Tool Scripts ``` tools/ โ”œโ”€โ”€ scripts/ โ”‚ โ”œโ”€โ”€ build_runner.sh # Run code generation โ”‚ โ”œโ”€โ”€ test_runner.sh # Run all tests โ”‚ โ”œโ”€โ”€ format_code.sh # Format Dart code โ”‚ โ”œโ”€โ”€ analyze_code.sh # Static analysis โ”‚ โ”œโ”€โ”€ generate_icons.sh # Generate app icons โ”‚ โ””โ”€โ”€ deploy_staging.sh # Deploy to staging โ”œโ”€โ”€ generators/ โ”‚ โ”œโ”€โ”€ model_generator.dart # Generate model files โ”‚ โ”œโ”€โ”€ provider_generator.dart # Generate provider files โ”‚ โ””โ”€โ”€ screen_generator.dart # Generate screen templates โ””โ”€โ”€ utils/ โ”œโ”€โ”€ json_to_dart.dart # Convert JSON to Dart models โ”œโ”€โ”€ asset_generator.dart # Generate asset references โ””โ”€โ”€ localization_helper.dart # Help with translations ``` --- ## ๐Ÿ“‹ CODE GENERATION TEMPLATES ### Feature Template Generator ```dart // tools/generators/feature_template.dart class FeatureTemplate { static const String providerTemplate = ''' import 'package:flutter_riverpod/flutter_riverpod.dart'; import '../domain/repositories/{{feature_name}}_repository.dart'; import '../data/repositories/{{feature_name}}_repository_impl.dart'; class {{FeatureName}}Provider extends StateNotifier<{{FeatureName}}State> { {{FeatureName}}Provider(this.repository) : super(const {{FeatureName}}State.initial()); final {{FeatureName}}Repository repository; // Add methods here } final {{featureName}}Provider = StateNotifierProvider<{{FeatureName}}Provider, {{FeatureName}}State>( (ref) => {{FeatureName}}Provider(ref.watch({{featureName}}RepositoryProvider)), ); final {{featureName}}RepositoryProvider = Provider<{{FeatureName}}Repository>( (ref) => {{FeatureName}}RepositoryImpl(), ); '''; } ``` --- ## ๐Ÿš€ BUILD CONFIGURATION ### Build Scripts ```bash #!/bin/bash # tools/scripts/build_runner.sh echo "Running build runner..." flutter packages pub run build_runner build --delete-conflicting-outputs echo "Build runner completed!" ``` ### Test Scripts ```bash #!/bin/bash # tools/scripts/test_runner.sh echo "Running unit tests..." flutter test test/unit/ echo "Running widget tests..." flutter test test/widget/ echo "Running integration tests..." flutter test test/integration/ echo "All tests completed!" ``` --- ## ๐Ÿ“ฑ PLATFORM CONFIGURATION ### Responsive Design Breakpoints ```dart // lib/core/constants/breakpoints.dart class Breakpoints { static const double mobile = 480; static const double tablet = 768; static const double desktop = 1024; static const double largeDesktop = 1440; static bool isMobile(double width) => width < mobile; static bool isTablet(double width) => width >= mobile && width < desktop; static bool isDesktop(double width) => width >= desktop; } ``` ### Device Configuration ```dart // lib/core/constants/device_config.dart class DeviceConfig { static const double defaultPadding = 16.0; static const double cardBorderRadius = 12.0; static const double buttonHeight = 48.0; static const double iconSize = 24.0; static const double appBarHeight = 56.0; } ``` --- ## ๐Ÿ” SECURITY CONFIGURATION ### Security Constants ```dart // lib/core/constants/security.dart class SecurityConstants { static const int maxLoginAttempts = 5; static const Duration lockoutDuration = Duration(minutes: 15); static const int sessionTimeoutMinutes = 30; static const int passwordMinLength = 8; static const int maxFileSize = 10 * 1024 * 1024; // 10MB } ``` ### Encryption Keys ```dart // lib/core/constants/encryption.dart class EncryptionKeys { // These should be stored securely and not hardcoded static const String storageKey = 'your_storage_encryption_key'; static const String apiKey = 'your_api_encryption_key'; } ``` --- ## ๐Ÿ“Š PERFORMANCE CONFIGURATION ### Caching Strategy ```dart // lib/core/constants/cache.dart class CacheConstants { static const Duration shortCache = Duration(minutes: 5); static const Duration mediumCache = Duration(hours: 1); static const Duration longCache = Duration(days: 7); static const int maxCacheSize = 100 * 1024 * 1024; // 100MB } ``` ### Network Configuration ```dart // lib/core/constants/network.dart class NetworkConstants { static const Duration connectTimeout = Duration(seconds: 30); static const Duration receiveTimeout = Duration(seconds: 30); static const Duration sendTimeout = Duration(seconds: 30); static const int maxRetries = 3; static const Duration retryDelay = Duration(seconds: 1); } ``` --- ## ๐ŸŽจ THEME CONFIGURATION ### Color System ```dart // lib/app/theme/app_colors.dart class AppColors { // Primary palette from EPVC design static const Color primaryBlue = Color(0xFF4A90E2); static const Color primaryTeal = Color(0xFF5AC8FA); static const Color primaryOrange = Color(0xFFFF9500); // Semantic colors static const Color success = Color(0xFF10B981); static const Color warning = Color(0xFFF59E0B); static const Color error = Color(0xFFEF4444); static const Color info = Color(0xFF3B82F6); // Neutral colors static const Color background = Color(0xFFF8F9FA); static const Color surface = Color(0xFFFFFFFF); static const Color onSurface = Color(0xFF1A1A1A); static const Color onSurfaceVariant = Color(0xFF6B7280); } ``` ### Typography System ```dart // lib/app/theme/app_text_styles.dart class AppTextStyles { static const TextStyle h1 = TextStyle( fontSize: 32, fontWeight: FontWeight.bold, height: 1.2, ); static const TextStyle h2 = TextStyle( fontSize: 24, fontWeight: FontWeight.semiBold, height: 1.3, ); static const TextStyle body = TextStyle( fontSize: 16, fontWeight: FontWeight.normal, height: 1.5, ); static const TextStyle caption = TextStyle( fontSize: 12, fontWeight: FontWeight.normal, height: 1.4, ); } ``` --- ## ๐Ÿ“ฑ INTERNATIONALIZATION ### Supported Languages ```dart // lib/l10n/app_localizations.dart abstract class AppLocalizations { static const List supportedLocales = [ Locale('en'), // English Locale('pt'), // Portuguese Locale('es'), // Spanish ]; static const Locale fallbackLocale = Locale('en'); } ``` ### Translation Keys ```json // lib/l10n/app_en.arb { "app_name": "AI Study Assistant", "welcome_back": "Welcome back", "sign_in": "Sign In", "sign_up": "Sign Up", "ask_tutor": "Ask Tutor", "dashboard": "Dashboard", "progress": "Progress", "settings": "Settings" } ``` --- ## ๐Ÿ”ง DEVELOPMENT WORKFLOW ### Git Hooks ```bash #!/bin/bash # .git/hooks/pre-commit echo "Running pre-commit checks..." # Format code dart format --set-exit-if-changed . # Analyze code dart analyze --fatal-infos # Run tests flutter test --coverage echo "Pre-commit checks completed!" ``` ### CI/CD Configuration ```yaml # .github/workflows/ci.yml name: CI/CD Pipeline on: push: branches: [main, develop] pull_request: branches: [main] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: flutter-version: '3.41.0' - name: Install dependencies run: flutter pub get - name: Run tests run: flutter test --coverage - name: Build app run: flutter build apk --release ``` --- ## ๐Ÿ“‹ BEST PRACTICES ### Code Organization Rules 1. **Feature-first structure**: Group related files by feature 2. **Clean architecture**: Separate data, domain, and presentation layers 3. **Consistent naming**: Use descriptive, consistent naming conventions 4. **Small files**: Keep files focused and under 300 lines when possible 5. **Documentation**: Add comments for complex logic ### State Management Rules 1. **Riverpod providers**: Use appropriate provider types 2. **Immutable state**: Keep state immutable 3. **Async handling**: Use proper async/await patterns 4. **Error handling**: Handle errors gracefully 5. **Loading states**: Show loading indicators appropriately ### UI/UX Rules 1. **Responsive design**: Support all screen sizes 2. **Accessibility**: Follow accessibility guidelines 3. **Performance**: Optimize for smooth animations 4. **Consistency**: Use design system components 5. **User feedback**: Provide clear feedback for actions --- ## ๐Ÿš€ DEPLOYMENT CONFIGURATION ### Environment Variables ```dart // lib/core/constants/environment.dart class Environment { static const bool isDebugMode = kDebugMode; static const bool isProductionMode = kReleaseMode; static const String apiBaseUrl = isDebugMode ? 'http://localhost:8080' : 'https://api.teachit.app'; } ``` ### Build Variants ```yaml # android/app/build.gradle android { buildTypes { debug { applicationIdSuffix ".debug" debuggable true } profile { applicationIdSuffix ".profile" debuggable false signingConfig signingConfigs.debug } release { debuggable false minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } } } ``` --- ## ๐Ÿ“Š MONITORING CONFIGURATION ### Analytics Setup ```dart // lib/core/services/analytics_service.dart class AnalyticsService { static void logScreenView(String screenName) { FirebaseAnalytics.instance.logScreenView(screenName: screenName); } static void logEvent(String name, {Map? parameters}) { FirebaseAnalytics.instance.logEvent(name, parameters: parameters); } static void setUserProperty(String name, String value) { FirebaseAnalytics.instance.setUserProperty(name: name, value: value); } } ``` ### Error Reporting ```dart // lib/core/services/error_reporting_service.dart class ErrorReportingService { static void recordError(dynamic error, StackTrace? stackTrace) { FirebaseCrashlytics.instance.recordError(error, stackTrace); } static void recordFlutterError(FlutterErrorDetails details) { FirebaseCrashlytics.instance.recordFlutterError(details); } } ``` --- *Last Updated: 2026-05-06* *Version: 1.0.0* *Architecture Lead: Flutter Development Team*