LB Planner (App)

This is the source code for the frontend of LB Planner.

Development

Prerequisites

  • Flutter Version Manager (fvm): Installation Guide

    • You may want to set an alias for flutter to fvm in your shell configuration file.

      alias flutter="fvm flutter"
      alias dart="fvm dart"
      
  • VsCode

  • slidy (optional): Installation Guide

    dart pub global activate slidy
    

Setup

  1. Once you've cloned the repository open it in VsCode

  2. If not already, install the recommended extensions.

    • VsCode should prompt you upon opening the project.
  3. Copy the .env.example file to .env and fill in the required values.

     cp .env.example .env
    
  4. Run fvm use && fvm flutter pub get to install the flutter version used for this project.

  5. Restart VsCode so that it recognizes the flutter version.

  6. If you are running the app from a terminal, run fvm flutter run --dart-define-from-file=.env to start the app.

    1. VsCode should automatically detect the .env file and run the app with the correct environment variables.

Tools

  • flutter_modular_bricks: A tool to generate boilerplate code for flutter_modular.

    • mason make module to create a new module.
    • mason make service to create a new service.
    • mason make service-impl to implement a service.
    • mason make datasource to create a new datasource.
    • mason make datasource-impl to implement a datasource.
    • mason make repo to create a new repository.
    • mason make widget to create a new widget.
    • mason make screen to create a new screen.
    • mason make model to create a new model.
    • mason make util to create a new utility group.
    • mason make guard to create a new route guard
  • slidy run translate to generate the dart code for the translation files.

  • slidy run generate to run all generators.

  • slidy run clean to clean the project and refetch dependencies.

Guidelines

Coding style is enforced as defined per the Effective Dart guidelines and the analysis_options.yaml file.

Architecture

  • LB Planner uses flutter_modular and adheres to Clean Dart principles (a port of Clean Architecture to Dart).
  • The project is divided into modules, each module representing a feature or a group of features (e.g. auth, home, settings).
  • Each module has its own domain, infra, and presentation layers.
    • Domain: Defines contracts logic and entities.
    • Infra: Implements the contracts defined in the domain layer.
    • Presentation: Contains the UI and business logic.

Commits

Libraries

config/endpoints
Contains configs for all endpoints used by the app.
config/posthog
config/sentry
Configuration for Sentry.
config/version
gen/assets/assets.gen
GENERATED CODE - DO NOT MODIFY BY HAND
main
modules/app/app
modules/app/domain/datasources/datasources
modules/app/domain/domain
modules/app/domain/models/models
modules/app/domain/services/services
modules/app/infra/datasources/datasources
modules/app/infra/infra
modules/app/infra/services/services
modules/app/presentation/presentation
modules/app/presentation/repositories/repositories
modules/app/presentation/screens/screens
modules/app/presentation/widgets/generic_dialog
modules/app/presentation/widgets/title_bar
modules/app/presentation/widgets/widgets
modules/app/utils/analytics_utils
modules/app/utils/animate_utils
modules/app/utils/button_utils
modules/app/utils/context_utils
modules/app/utils/dialog_utils
modules/app/utils/json_serializable_utils
modules/app/utils/svg_utils
modules/app/utils/utils
modules/auth/auth
modules/auth/domain/datasources/datasources
modules/auth/domain/datasources/user_datasource
modules/auth/domain/domain
modules/auth/domain/models/models
modules/auth/domain/models/token
modules/auth/domain/models/user
modules/auth/domain/services/api_service
modules/auth/domain/services/auth_service
modules/auth/domain/services/services
modules/auth/infra/datasources/datasources
modules/auth/infra/datasources/moodle_user_datasource
modules/auth/infra/infra
modules/auth/infra/services/moodle_api_service
modules/auth/infra/services/moodle_auth_service
modules/auth/infra/services/services
modules/auth/presentation/guards/auth_guard
modules/auth/presentation/guards/guards
modules/auth/presentation/presentation
modules/auth/presentation/repositories/auth_repository
modules/auth/presentation/repositories/repositories
modules/auth/presentation/repositories/user_repository
modules/auth/presentation/screens/login_screen
modules/auth/presentation/screens/screens
modules/auth/presentation/widgets/login_form
modules/auth/presentation/widgets/widgets
modules/auth/utils/token_utils
modules/auth/utils/utils
modules/calendar/calendar
modules/calendar/domain/datasources/datasources
modules/calendar/domain/datasources/deadlines_datasource
modules/calendar/domain/datasources/invites_datasource
modules/calendar/domain/datasources/plan_datasource
modules/calendar/domain/domain
modules/calendar/domain/models/calendar_plan
modules/calendar/domain/models/models
modules/calendar/domain/models/plan_deadline
modules/calendar/domain/models/plan_invite
modules/calendar/domain/models/plan_member
modules/calendar/domain/services/services
modules/calendar/infra/datasources/datasources
modules/calendar/infra/datasources/std_deadlines_datasource
modules/calendar/infra/datasources/std_invites_datasource
modules/calendar/infra/datasources/std_plan_datasource
modules/calendar/infra/infra
modules/calendar/infra/services/services
modules/calendar/presentation/guards/guards
modules/calendar/presentation/presentation
modules/calendar/presentation/repositories/calendar_plan_repository
modules/calendar/presentation/repositories/repositories
modules/calendar/presentation/screens/calendar_screen
modules/calendar/presentation/screens/plan_screen
modules/calendar/presentation/screens/screens
modules/calendar/presentation/screens/tasks_overview_screen
modules/calendar/presentation/widgets/calendar_course_tasks_overview
modules/calendar/presentation/widgets/calendar_tasks_overview_cell
modules/calendar/presentation/widgets/calendar_tasks_overview_month_header
modules/calendar/presentation/widgets/invitable_member_widget
modules/calendar/presentation/widgets/plan_cell
modules/calendar/presentation/widgets/plan_invite_member_dialog
modules/calendar/presentation/widgets/plan_member
modules/calendar/presentation/widgets/plan_popup
modules/calendar/presentation/widgets/plan_popup_members
modules/calendar/presentation/widgets/plan_popup_tasks
modules/calendar/presentation/widgets/widgets
modules/calendar/utils/utils
modules/dashboard/dashboard
modules/dashboard/domain/datasources/datasources
modules/dashboard/domain/domain
modules/dashboard/domain/models/models
modules/dashboard/domain/services/services
modules/dashboard/infra/datasources/datasources
modules/dashboard/infra/infra
modules/dashboard/infra/services/services
modules/dashboard/presentation/guards/guards
modules/dashboard/presentation/presentation
modules/dashboard/presentation/repositories/repositories
modules/dashboard/presentation/screens/dashboard_screen
modules/dashboard/presentation/screens/screens
modules/dashboard/presentation/widgets/burndown_chart
modules/dashboard/presentation/widgets/exams
modules/dashboard/presentation/widgets/overdue_tasks
modules/dashboard/presentation/widgets/status_overview
modules/dashboard/presentation/widgets/todays_tasks
modules/dashboard/presentation/widgets/widgets
modules/dashboard/utils/utils
modules/moodle/domain/datasources/datasources
modules/moodle/domain/datasources/moodle_course_datasource
modules/moodle/domain/datasources/moodle_task_datasource
modules/moodle/domain/domain
modules/moodle/domain/models/models
modules/moodle/domain/models/moodle_course
modules/moodle/domain/models/moodle_task
modules/moodle/domain/services/api_service
modules/moodle/domain/services/services
modules/moodle/infra/datasources/datasources
modules/moodle/infra/datasources/std_moodle_course_datasource
modules/moodle/infra/datasources/std_moodle_task_datasource
modules/moodle/infra/infra
modules/moodle/infra/services/services
modules/moodle/moodle
modules/moodle/presentation/guards/guards
modules/moodle/presentation/presentation
modules/moodle/presentation/repositories/moodle_courses_repository
modules/moodle/presentation/repositories/moodle_tasks_repository
modules/moodle/presentation/repositories/repositories
modules/moodle/presentation/repositories/users_repository
modules/moodle/presentation/screens/screens
modules/moodle/presentation/widgets/course_selector
modules/moodle/presentation/widgets/course_tag
modules/moodle/presentation/widgets/course_widget
modules/moodle/presentation/widgets/moodle_task_widget
modules/moodle/presentation/widgets/user_profile_image
modules/moodle/presentation/widgets/widgets
modules/moodle/utils/api_service_utils
modules/moodle/utils/utils
modules/notifications/domain/datasources/datasources
modules/notifications/domain/datasources/notifications_datasource
modules/notifications/domain/domain
modules/notifications/domain/models/models
modules/notifications/domain/models/notification
modules/notifications/domain/services/services
modules/notifications/infra/datasources/datasources
modules/notifications/infra/datasources/moodle_notifications_datasource
modules/notifications/infra/infra
modules/notifications/infra/services/services
modules/notifications/notifications
modules/notifications/presentation/guards/guards
modules/notifications/presentation/presentation
modules/notifications/presentation/repositories/notifications_repository
modules/notifications/presentation/repositories/repositories
modules/notifications/presentation/screens/screens
modules/notifications/presentation/widgets/notification
modules/notifications/presentation/widgets/notifications_list
modules/notifications/presentation/widgets/widgets
modules/notifications/utils/utils
modules/settings/domain/datasources/datasources
modules/settings/domain/domain
modules/settings/domain/models/models
modules/settings/domain/services/services
modules/settings/infra/datasources/datasources
modules/settings/infra/infra
modules/settings/infra/services/services
modules/settings/presentation/guards/guards
modules/settings/presentation/presentation
modules/settings/presentation/repositories/repositories
modules/settings/presentation/screens/screens
modules/settings/presentation/screens/settings_screen
modules/settings/presentation/widgets/feedback_widget
modules/settings/presentation/widgets/general_settings
modules/settings/presentation/widgets/theme_preview
modules/settings/presentation/widgets/themes_settings
modules/settings/presentation/widgets/widgets
modules/settings/settings
modules/settings/utils/utils
modules/slots/domain/datasources/datasources
modules/slots/domain/datasources/slots_datasource
modules/slots/domain/domain
modules/slots/domain/models/course_to_slot
modules/slots/domain/models/models
modules/slots/domain/models/reservation
modules/slots/domain/models/slot
modules/slots/domain/models/slot_aggregate
modules/slots/domain/services/services
modules/slots/infra/datasources/datasources
modules/slots/infra/datasources/std_slots_datasource
modules/slots/infra/infra
modules/slots/infra/services/services
modules/slots/presentation/guards/guards
modules/slots/presentation/presentation
modules/slots/presentation/repositories/repositories
modules/slots/presentation/repositories/slots_repository
modules/slots/presentation/screens/screens
modules/slots/presentation/widgets/slot_widget
modules/slots/presentation/widgets/widgets
modules/slots/slots
modules/slots/utils/reservation_date_time_converter_utils
modules/slots/utils/utils
modules/statistics/domain/datasources/datasources
modules/statistics/domain/domain
modules/statistics/domain/models/chart_value
modules/statistics/domain/models/models
modules/statistics/domain/models/status_aggregate
modules/statistics/domain/models/task_aggregate
modules/statistics/domain/models/type_aggregate
modules/statistics/domain/services/services
modules/statistics/infra/datasources/datasources
modules/statistics/infra/infra
modules/statistics/infra/services/services
modules/statistics/presentation/guards/guards
modules/statistics/presentation/presentation
modules/statistics/presentation/repositories/course_stats_repository
modules/statistics/presentation/repositories/global_stats_repository
modules/statistics/presentation/repositories/repositories
modules/statistics/presentation/screens/screens
modules/statistics/presentation/widgets/bar_chart
modules/statistics/presentation/widgets/chart
modules/statistics/presentation/widgets/horizontal_bar_chart
modules/statistics/presentation/widgets/vertical_bar_chart
modules/statistics/presentation/widgets/widgets
modules/statistics/statistics
modules/statistics/utils/num_utils
modules/statistics/utils/utils
modules/theming/domain/datasources/datasources
modules/theming/domain/datasources/themes_datasource
modules/theming/domain/domain
modules/theming/domain/models/models
modules/theming/domain/models/task_status_theme
modules/theming/domain/models/theme_base
modules/theming/domain/services/services
modules/theming/domain/services/theme_generator_service
modules/theming/infra/datasources/datasources
modules/theming/infra/datasources/std_themes_datasource
modules/theming/infra/infra
modules/theming/infra/services/material_theme_generator_service
modules/theming/infra/services/services
modules/theming/presentation/guards/guards
modules/theming/presentation/presentation
modules/theming/presentation/repositories/repositories
modules/theming/presentation/repositories/theme_repository
modules/theming/presentation/screens/screens
modules/theming/presentation/widgets/widgets
modules/theming/theming
modules/theming/utils/theme_utils
modules/theming/utils/utils