├── .vscode ├── settings.json └── launch.json ├── linux ├── .gitignore ├── main.cc ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ └── generated_plugins.cmake └── my_application.h ├── api ├── lib │ ├── src │ │ ├── data │ │ │ ├── db_restaurants_fake_data_insert.dart │ │ │ ├── database │ │ │ │ ├── actions │ │ │ │ │ └── actions.dart │ │ │ │ ├── database.dart │ │ │ │ └── queries │ │ │ │ │ ├── queries.dart │ │ │ │ │ └── notifications_queries.dart │ │ │ └── models │ │ │ │ ├── postgres │ │ │ │ ├── postgres.dart │ │ │ │ ├── db_menu.dart │ │ │ │ ├── db_notification.dart │ │ │ │ ├── db_credit_card.dart │ │ │ │ ├── db_menu_item.dart │ │ │ │ └── db_order_menu_item.dart │ │ │ │ ├── models.dart │ │ │ │ ├── order_status.dart │ │ │ │ ├── location.dart │ │ │ │ ├── location.g.dart │ │ │ │ ├── menu.dart │ │ │ │ ├── connection_channel.dart │ │ │ │ └── menu.g.dart │ │ ├── common │ │ │ ├── remote │ │ │ │ ├── remote.dart │ │ │ │ └── token_interceptor.dart │ │ │ ├── common.dart │ │ │ ├── config │ │ │ │ ├── config.dart │ │ │ │ ├── missing_fields.dart │ │ │ │ └── env.dart │ │ │ └── utils │ │ │ │ ├── extensions │ │ │ │ ├── async_read_extension.dart │ │ │ │ ├── extensions.dart │ │ │ │ ├── response_extension.dart │ │ │ │ └── string_extension.dart │ │ │ │ ├── password_hash_system.dart │ │ │ │ ├── utils.dart │ │ │ │ └── jwt_generator.dart │ │ ├── client │ │ │ └── client.dart │ │ └── middleware │ │ │ ├── middleware.dart │ │ │ └── database_provider.dart │ ├── client.dart │ └── api.dart ├── .dockerignore ├── routes │ ├── index.dart │ └── api │ │ └── v1 │ │ ├── restaurants │ │ └── [place_id] │ │ │ └── menu.dart │ │ ├── _middleware.dart │ │ ├── cards │ │ └── index.dart │ │ ├── orders │ │ └── index.dart │ │ ├── tags │ │ └── index.dart │ │ └── search │ │ ├── relevant.dart │ │ └── by-tags.dart ├── analysis_options.yaml ├── docker-compose.yml ├── .gitignore ├── build.yaml ├── README.md ├── test │ └── routes │ │ └── index_test.dart ├── pubspec.yaml └── Dockerfile ├── lib └── src │ ├── home │ ├── home.dart │ └── view │ │ └── home_view.dart │ ├── drawer │ └── drawer.dart │ ├── error │ ├── error.dart │ └── view │ │ └── error_view.dart │ ├── navigation │ └── navigation.dart │ ├── restaurants │ ├── tags │ │ ├── widgets │ │ │ └── widgets.dart │ │ └── tags.dart │ ├── filter │ │ ├── filter.dart │ │ └── widgets │ │ │ ├── widgets.dart │ │ │ ├── filter_section.dart │ │ │ └── reset_filters_button.dart │ ├── restaurants.dart │ ├── widgets │ │ ├── restaurants_error_view.dart │ │ ├── widgets.dart │ │ ├── restaurants_loading_view.dart │ │ ├── filtered_restaurants_list_view.dart │ │ ├── restaurants_section_header.dart │ │ ├── restaurants_no_internet_view.dart │ │ ├── restaurants_timeout_view.dart │ │ ├── restaurants_loader_item.dart │ │ └── restaurants_empty_view.dart │ └── bloc │ │ └── restaurants_bloc_mixin.dart │ ├── app │ ├── view │ │ └── view.dart │ ├── routes │ │ ├── routes.dart │ │ └── app_routes.dart │ └── app.dart │ ├── network_error │ └── network_error.dart │ ├── notifications │ ├── notifications.dart │ └── bloc │ │ ├── notifications_event.dart │ │ └── notifications_state.dart │ ├── orders │ ├── widgets │ │ └── widgets.dart │ ├── order │ │ ├── widgets │ │ │ └── widgets.dart │ │ ├── order.dart │ │ └── bloc │ │ │ └── order_event.dart │ ├── orders.dart │ └── bloc │ │ └── orders_event.dart │ ├── profile │ ├── profile.dart │ └── widgets │ │ └── widgets.dart │ ├── search │ ├── widgets │ │ └── widgets.dart │ ├── search.dart │ └── bloc │ │ └── search_event.dart │ ├── auth │ ├── login │ │ ├── login.dart │ │ ├── widgets │ │ │ ├── widgets.dart │ │ │ ├── welcome_image.dart │ │ │ ├── forgot_password_view.dart │ │ │ └── login_footer.dart │ │ └── cubit │ │ │ └── login_state.dart │ ├── auth.dart │ ├── sign_up │ │ ├── sign_up.dart │ │ └── widgets │ │ │ ├── widgets.dart │ │ │ └── sign_up_footer.dart │ └── cubit │ │ ├── auth_cubit.dart │ │ └── manage_password_cubit.dart │ ├── payments │ ├── view │ │ └── view.dart │ ├── payments.dart │ └── widgets │ │ └── widgets.dart │ ├── menu │ ├── menu.dart │ ├── widgets │ │ ├── widgets.dart │ │ ├── menu_props.dart │ │ └── menu_section_header.dart │ └── bloc │ │ ├── menu_event.dart │ │ └── menu_state.dart │ ├── cart │ ├── cart.dart │ ├── widgets │ │ └── widgets.dart │ └── bloc │ │ └── order_progress_cubit.dart │ └── map │ ├── map.dart │ ├── widgets │ └── widgets.dart │ └── bloc │ ├── auto_complete_event.dart │ ├── location_event.dart │ └── auto_complete_state.dart ├── packages ├── app_ui │ ├── lib │ │ ├── src │ │ │ ├── constants │ │ │ │ └── constants.dart │ │ │ ├── generated │ │ │ │ ├── generated.dart │ │ │ │ └── fonts.gen.dart │ │ │ ├── typography │ │ │ │ ├── typography.dart │ │ │ │ └── app_font_weight.dart │ │ │ ├── theme │ │ │ │ └── theme.dart │ │ │ ├── extensions │ │ │ │ ├── extensions.dart │ │ │ │ ├── string_extension.dart │ │ │ │ └── ignore_pointer_extension.dart │ │ │ ├── widgets │ │ │ │ ├── widgets.dart │ │ │ │ └── app_circular_progress_indicator.dart │ │ │ ├── size │ │ │ │ └── app_size.dart │ │ │ └── spacing │ │ │ │ └── app_spacing.dart │ │ └── app_ui.dart │ ├── analysis_options.yaml │ ├── assets │ │ ├── images │ │ │ ├── welcome.png │ │ │ ├── placeholder.png │ │ │ ├── profile-photo.png │ │ │ └── papa-burger-logo.jpg │ │ ├── fonts │ │ │ ├── Inter-Bold.ttf │ │ │ ├── Inter-Light.ttf │ │ │ ├── Inter-Medium.ttf │ │ │ ├── Inter-Regular.ttf │ │ │ ├── Inter-SemiBold.ttf │ │ │ ├── Inter-ExtraBold.ttf │ │ │ ├── Inter-ExtraLight.ttf │ │ │ └── Montserrat-Medium.ttf │ │ └── icons │ │ │ ├── pin-icon.svg │ │ │ └── filter-icon.svg │ ├── test │ │ └── src │ │ │ └── app_ui_test.dart │ ├── .gitignore │ └── coverage_badge.svg ├── user_repository │ ├── lib │ │ ├── src │ │ │ └── models │ │ │ │ ├── models.dart │ │ │ │ └── user.dart │ │ └── user_repository.dart │ ├── analysis_options.yaml │ ├── .gitignore │ ├── test │ │ └── src │ │ │ └── user_repository_test.dart │ ├── pubspec.yaml │ └── coverage_badge.svg ├── env │ ├── analysis_options.yaml │ ├── lib │ │ ├── env.dart │ │ └── src │ │ │ └── env.dart │ ├── test │ │ └── src │ │ │ └── env_test.dart │ ├── pubspec.yaml │ ├── .gitignore │ └── coverage_badge.svg ├── shared │ ├── lib │ │ ├── src │ │ │ ├── config │ │ │ │ ├── utilities │ │ │ │ │ ├── animations │ │ │ │ │ │ └── animations.dart │ │ │ │ │ ├── utils.dart │ │ │ │ │ └── extensions │ │ │ │ │ │ ├── extensions.dart │ │ │ │ │ │ └── num_duration_extension.dart │ │ │ │ ├── config.dart │ │ │ │ └── debouncer.dart │ │ │ └── models │ │ │ │ ├── models.dart │ │ │ │ ├── menu_tab_category.dart │ │ │ │ └── address.dart │ │ └── shared.dart │ ├── analysis_options.yaml │ ├── test │ │ └── src │ │ │ └── shared_test.dart │ ├── pubspec.yaml │ ├── .gitignore │ └── coverage_badge.svg ├── form_fields │ ├── analysis_options.yaml │ ├── lib │ │ ├── form_fields.dart │ │ └── src │ │ │ ├── form_fields.dart │ │ │ └── formz_validation_mixin.dart │ ├── test │ │ └── src │ │ │ └── form_fields_test.dart │ ├── pubspec.yaml │ ├── .gitignore │ └── coverage_badge.svg ├── authentication_client │ ├── authentication_client │ │ ├── lib │ │ │ ├── src │ │ │ │ └── models │ │ │ │ │ └── models.dart │ │ │ └── authentication_client.dart │ │ ├── analysis_options.yaml │ │ ├── pubspec.yaml │ │ ├── .gitignore │ │ └── test │ │ │ └── src │ │ │ ├── models │ │ │ └── authentication_user_test.dart │ │ │ └── authentication_client_test.dart │ ├── firebase_authentication_client │ │ ├── .github │ │ │ ├── ISSUE_TEMPLATE │ │ │ │ ├── config.yml │ │ │ │ ├── ci.md │ │ │ │ ├── build.md │ │ │ │ ├── chore.md │ │ │ │ ├── documentation.md │ │ │ │ ├── style.md │ │ │ │ ├── test.md │ │ │ │ ├── performance.md │ │ │ │ ├── refactor.md │ │ │ │ ├── revert.md │ │ │ │ ├── feature_request.md │ │ │ │ └── bug_report.md │ │ │ ├── dependabot.yaml │ │ │ ├── workflows │ │ │ │ └── main.yaml │ │ │ ├── cspell.json │ │ │ └── PULL_REQUEST_TEMPLATE.md │ │ ├── analysis_options.yaml │ │ ├── lib │ │ │ └── firebase_authentication_client.dart │ │ ├── test │ │ │ └── src │ │ │ │ └── firebase_authentication_client_test.dart │ │ ├── pubspec.yaml │ │ └── .gitignore │ └── token_storage │ │ ├── analysis_options.yaml │ │ ├── lib │ │ ├── token_storage.dart │ │ └── src │ │ │ └── token_storage.dart │ │ ├── .gitignore │ │ └── pubspec.yaml ├── orders_repository │ ├── analysis_options.yaml │ ├── lib │ │ └── orders_repository.dart │ ├── .gitignore │ ├── test │ │ └── src │ │ │ └── orders_repository_test.dart │ ├── pubspec.yaml │ └── coverage_badge.svg ├── payments_repository │ ├── analysis_options.yaml │ ├── lib │ │ └── payments_repository.dart │ ├── .gitignore │ ├── test │ │ └── src │ │ │ └── payments_repository_test.dart │ └── pubspec.yaml ├── permission_client │ ├── analysis_options.yaml │ ├── lib │ │ └── permission_client.dart │ ├── .gitignore │ ├── pubspec.yaml │ └── test │ │ └── src │ │ └── permission_client_test.dart ├── storage │ ├── storage │ │ ├── analysis_options.yaml │ │ ├── lib │ │ │ └── storage.dart │ │ ├── .gitignore │ │ ├── pubspec.yaml │ │ ├── test │ │ │ └── src │ │ │ │ └── storage_test.dart │ │ └── coverage_badge.svg │ ├── secure_storage │ │ ├── analysis_options.yaml │ │ ├── lib │ │ │ └── secure_storage.dart │ │ ├── pubspec.yaml │ │ └── .gitignore │ └── persistent_storage │ │ ├── analysis_options.yaml │ │ ├── lib │ │ └── persistent_storage.dart │ │ ├── pubspec.yaml │ │ └── .gitignore ├── location_repository │ ├── lib │ │ ├── src │ │ │ └── models │ │ │ │ └── models.dart │ │ └── location_repository.dart │ ├── analysis_options.yaml │ ├── .gitignore │ ├── test │ │ └── src │ │ │ └── location_repository_test.dart │ ├── pubspec.yaml │ └── coverage_badge.svg ├── notifications_client │ ├── analysis_options.yaml │ ├── lib │ │ └── notifications_client.dart │ ├── test │ │ └── src │ │ │ └── notifications_client_test.dart │ ├── pubspec.yaml │ ├── .gitignore │ └── coverage_badge.svg ├── notifications_repository │ ├── analysis_options.yaml │ ├── lib │ │ └── notifications_repository.dart │ ├── .gitignore │ ├── test │ │ └── src │ │ │ └── notifications_repository_test.dart │ └── pubspec.yaml ├── restaurants_repository │ ├── analysis_options.yaml │ ├── lib │ │ └── restaurants_repository.dart │ ├── .gitignore │ ├── test │ │ └── src │ │ │ └── restaurants_repository_test.dart │ └── pubspec.yaml └── payments_client │ └── stripe_payments_client │ ├── analysis_options.yaml │ ├── lib │ └── stripe_payments_client.dart │ ├── pubspec.yaml │ ├── test │ └── src │ │ └── stripe_payments_client_test.dart │ └── .gitignore ├── ios ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ └── AppDelegate.swift ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── RunnerTests │ └── RunnerTests.swift └── .gitignore ├── .github ├── CODEOWNERS ├── workflows │ ├── main.yaml │ └── spell_checker.yaml ├── ISSUE_TEMPLATE │ ├── continuous-integration.md │ ├── build-system.md │ ├── chore.md │ ├── documentation.md │ ├── test.md │ ├── style-changes.md │ ├── refactor.md │ ├── performance-update.md │ ├── revert-commit.md │ ├── feature_request.md │ └── bug_report.md ├── PULL_REQUEST_TEMPLATE.md └── FUNDING.yml ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ └── kotlin │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── yandex_food_delivery_clone │ │ │ │ └── MainActivity.kt │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── proguard-rules.pro ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── build.gradle └── settings.gradle ├── macos ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ └── app_icon_64.png │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── DebugProfile.entitlements │ └── MainFlutterWindow.swift ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ └── Flutter-Release.xcconfig ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ └── project.xcworkspace │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── RunnerTests │ └── RunnerTests.swift ├── server ├── nodemon.json ├── tsconfig.json └── package.json ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── utils.h │ ├── runner.exe.manifest │ └── flutter_window.h ├── .gitignore └── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ └── generated_plugin_registrant.cc ├── devtools_options.yaml ├── analysis_options.yaml ├── test └── ensure_build_test.dart └── .metadata /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | } -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /api/lib/src/data/db_restaurants_fake_data_insert.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/home/home.dart: -------------------------------------------------------------------------------- 1 | export 'view/home_view.dart'; 2 | -------------------------------------------------------------------------------- /lib/src/drawer/drawer.dart: -------------------------------------------------------------------------------- 1 | export 'view/drawer_view.dart'; 2 | -------------------------------------------------------------------------------- /lib/src/error/error.dart: -------------------------------------------------------------------------------- 1 | export 'view/error_view.dart'; 2 | -------------------------------------------------------------------------------- /api/lib/src/common/remote/remote.dart: -------------------------------------------------------------------------------- 1 | export 'app_dio.dart'; 2 | -------------------------------------------------------------------------------- /api/lib/src/client/client.dart: -------------------------------------------------------------------------------- 1 | export 'yandex_eats_api_client.dart'; 2 | -------------------------------------------------------------------------------- /lib/src/navigation/navigation.dart: -------------------------------------------------------------------------------- 1 | export 'view/bottom_nav_bar.dart'; 2 | -------------------------------------------------------------------------------- /lib/src/restaurants/tags/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'tag_card.dart'; 2 | -------------------------------------------------------------------------------- /packages/app_ui/lib/src/constants/constants.dart: -------------------------------------------------------------------------------- 1 | export 'data.dart'; 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/src/app/view/view.dart: -------------------------------------------------------------------------------- 1 | export 'app.dart'; 2 | export 'app_view.dart'; 3 | -------------------------------------------------------------------------------- /lib/src/network_error/network_error.dart: -------------------------------------------------------------------------------- 1 | export 'view/network_error.dart'; 2 | -------------------------------------------------------------------------------- /packages/user_repository/lib/src/models/models.dart: -------------------------------------------------------------------------------- 1 | export 'user.dart'; 2 | -------------------------------------------------------------------------------- /lib/src/notifications/notifications.dart: -------------------------------------------------------------------------------- 1 | export 'bloc/notifications_bloc.dart'; 2 | -------------------------------------------------------------------------------- /api/lib/src/data/database/actions/actions.dart: -------------------------------------------------------------------------------- 1 | export 'credit_card_actions.dart'; 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Every request must be reviewed and accepted by: 2 | 3 | * @Gambley1 4 | -------------------------------------------------------------------------------- /lib/src/app/routes/routes.dart: -------------------------------------------------------------------------------- 1 | export 'app_router.dart'; 2 | export 'app_routes.dart'; 3 | -------------------------------------------------------------------------------- /lib/src/orders/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'order_card.dart'; 2 | export 'orders_list_view.dart'; 3 | -------------------------------------------------------------------------------- /lib/src/profile/profile.dart: -------------------------------------------------------------------------------- 1 | export 'view/profile_view.dart'; 2 | export 'widgets/widgets.dart'; 3 | -------------------------------------------------------------------------------- /lib/src/restaurants/tags/tags.dart: -------------------------------------------------------------------------------- 1 | export 'view/tags_view.dart'; 2 | export 'widgets/widgets.dart'; 3 | -------------------------------------------------------------------------------- /lib/src/search/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'search_bar.dart'; 2 | export 'search_text_field.dart'; 3 | -------------------------------------------------------------------------------- /packages/env/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.6.0.0.yaml 2 | -------------------------------------------------------------------------------- /packages/shared/lib/src/config/utilities/animations/animations.dart: -------------------------------------------------------------------------------- 1 | export 'fade_animation.dart'; 2 | -------------------------------------------------------------------------------- /api/lib/src/middleware/middleware.dart: -------------------------------------------------------------------------------- 1 | export 'database_provider.dart'; 2 | export 'user_provider.dart'; 3 | -------------------------------------------------------------------------------- /packages/app_ui/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /packages/app_ui/lib/src/generated/generated.dart: -------------------------------------------------------------------------------- 1 | export 'assets.gen.dart'; 2 | export 'fonts.gen.dart'; 3 | -------------------------------------------------------------------------------- /packages/shared/lib/src/models/models.dart: -------------------------------------------------------------------------------- 1 | export 'address.dart'; 2 | export 'menu_tab_category.dart'; 3 | -------------------------------------------------------------------------------- /api/lib/src/data/database/database.dart: -------------------------------------------------------------------------------- 1 | export 'actions/actions.dart'; 2 | export 'queries/queries.dart'; 3 | -------------------------------------------------------------------------------- /packages/form_fields/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /lib/src/app/app.dart: -------------------------------------------------------------------------------- 1 | export 'bloc/app_bloc.dart'; 2 | export 'routes/routes.dart'; 3 | export 'view/view.dart'; 4 | -------------------------------------------------------------------------------- /lib/src/restaurants/filter/filter.dart: -------------------------------------------------------------------------------- 1 | export 'view/filter_modal_view.dart'; 2 | export 'widgets/widgets.dart'; 3 | -------------------------------------------------------------------------------- /packages/authentication_client/authentication_client/lib/src/models/models.dart: -------------------------------------------------------------------------------- 1 | export 'authentication_user.dart'; 2 | -------------------------------------------------------------------------------- /packages/orders_repository/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /packages/payments_repository/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /packages/permission_client/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /packages/storage/storage/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /packages/user_repository/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /lib/src/orders/order/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'order_action_button.dart'; 2 | export 'order_menu_item_tile.dart'; 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/app_ui/lib/src/typography/typography.dart: -------------------------------------------------------------------------------- 1 | export 'app_font_weight.dart'; 2 | export 'app_text_styles.dart'; 3 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false -------------------------------------------------------------------------------- /packages/env/lib/env.dart: -------------------------------------------------------------------------------- 1 | /// A package that manages application secrets. 2 | library; 3 | 4 | export 'src/env.dart'; 5 | -------------------------------------------------------------------------------- /packages/location_repository/lib/src/models/models.dart: -------------------------------------------------------------------------------- 1 | export 'auto_complete.dart'; 2 | export 'place_details.dart'; 3 | -------------------------------------------------------------------------------- /packages/notifications_client/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /packages/notifications_repository/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /packages/restaurants_repository/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /packages/storage/secure_storage/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /api/lib/src/common/common.dart: -------------------------------------------------------------------------------- 1 | export 'config/config.dart'; 2 | export 'remote/remote.dart'; 3 | export 'utils/utils.dart'; 4 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/storage/persistent_storage/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /lib/src/orders/orders.dart: -------------------------------------------------------------------------------- 1 | export 'bloc/orders_bloc.dart'; 2 | export 'view/orders_view.dart'; 3 | export 'widgets/widgets.dart'; 4 | -------------------------------------------------------------------------------- /lib/src/search/search.dart: -------------------------------------------------------------------------------- 1 | export 'bloc/search_bloc.dart'; 2 | export 'view/search_page.dart'; 3 | export 'widgets/widgets.dart'; 4 | -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /packages/shared/lib/src/config/utilities/utils.dart: -------------------------------------------------------------------------------- 1 | export 'animations/animations.dart'; 2 | export 'extensions/extensions.dart'; 3 | -------------------------------------------------------------------------------- /packages/storage/storage/lib/storage.dart: -------------------------------------------------------------------------------- 1 | /// A Dart Storage Client Interface 2 | library; 3 | 4 | export 'src/storage.dart'; 5 | -------------------------------------------------------------------------------- /api/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | Dockerfile 3 | build/ 4 | .dart_tool/ 5 | .git/ 6 | .github/ 7 | .gitignore 8 | .idea/ 9 | .packages -------------------------------------------------------------------------------- /lib/src/auth/login/login.dart: -------------------------------------------------------------------------------- 1 | export 'cubit/login_cubit.dart'; 2 | export 'view/login_page.dart'; 3 | export 'widgets/widgets.dart'; 4 | -------------------------------------------------------------------------------- /lib/src/orders/order/order.dart: -------------------------------------------------------------------------------- 1 | export 'bloc/order_bloc.dart'; 2 | export 'view/order_view.dart'; 3 | export 'widgets/widgets.dart'; 4 | -------------------------------------------------------------------------------- /packages/app_ui/lib/src/theme/theme.dart: -------------------------------------------------------------------------------- 1 | export 'package:flex_color_scheme/flex_color_scheme.dart'; 2 | 3 | export 'app_theme.dart'; 4 | -------------------------------------------------------------------------------- /packages/authentication_client/token_storage/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /packages/payments_client/stripe_payments_client/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.6.0.0.yaml 2 | -------------------------------------------------------------------------------- /server/nodemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "watch": ["src"], 3 | "ext": ".ts,.js", 4 | "ignore": [], 5 | "exec": "ts-node ./src/index.ts" 6 | } 7 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /lib/src/auth/auth.dart: -------------------------------------------------------------------------------- 1 | export 'cubit/auth_cubit.dart'; 2 | export 'cubit/manage_password_cubit.dart'; 3 | export 'view/auth_page.dart'; 4 | -------------------------------------------------------------------------------- /packages/authentication_client/authentication_client/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /lib/src/auth/sign_up/sign_up.dart: -------------------------------------------------------------------------------- 1 | export 'cubit/sign_up_cubit.dart'; 2 | export 'view/sign_up_page.dart'; 3 | export 'widgets/widgets.dart'; 4 | -------------------------------------------------------------------------------- /lib/src/auth/sign_up/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'sign_up_footer.dart'; 2 | export 'sign_up_form.dart'; 3 | export 'sign_up_form_listener.dart'; 4 | -------------------------------------------------------------------------------- /packages/app_ui/assets/images/welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/packages/app_ui/assets/images/welcome.png -------------------------------------------------------------------------------- /lib/src/restaurants/restaurants.dart: -------------------------------------------------------------------------------- 1 | export 'bloc/restaurants_bloc.dart'; 2 | export 'view/restaurants_page.dart'; 3 | export 'widgets/widgets.dart'; 4 | -------------------------------------------------------------------------------- /packages/app_ui/assets/fonts/Inter-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/packages/app_ui/assets/fonts/Inter-Bold.ttf -------------------------------------------------------------------------------- /packages/app_ui/assets/fonts/Inter-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/packages/app_ui/assets/fonts/Inter-Light.ttf -------------------------------------------------------------------------------- /packages/app_ui/assets/fonts/Inter-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/packages/app_ui/assets/fonts/Inter-Medium.ttf -------------------------------------------------------------------------------- /packages/app_ui/assets/images/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/packages/app_ui/assets/images/placeholder.png -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /packages/shared/lib/src/config/utilities/extensions/extensions.dart: -------------------------------------------------------------------------------- 1 | export 'country_code_extension.dart'; 2 | export 'num_duration_extension.dart'; 3 | -------------------------------------------------------------------------------- /packages/storage/secure_storage/lib/secure_storage.dart: -------------------------------------------------------------------------------- 1 | /// A Key/Value Secure Storage Client 2 | library; 3 | 4 | export 'src/secure_storage.dart'; 5 | -------------------------------------------------------------------------------- /lib/src/payments/view/view.dart: -------------------------------------------------------------------------------- 1 | export 'add_credit_card_modal_view.dart'; 2 | export 'payment_process_modal_view.dart'; 3 | export 'payments_modal.dart'; 4 | -------------------------------------------------------------------------------- /lib/src/profile/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'user_credentials_form.dart'; 2 | export 'user_profile_avatar.dart'; 3 | export 'user_update_email_form.dart'; 4 | -------------------------------------------------------------------------------- /packages/app_ui/assets/fonts/Inter-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/packages/app_ui/assets/fonts/Inter-Regular.ttf -------------------------------------------------------------------------------- /packages/app_ui/assets/fonts/Inter-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/packages/app_ui/assets/fonts/Inter-SemiBold.ttf -------------------------------------------------------------------------------- /packages/app_ui/assets/images/profile-photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/packages/app_ui/assets/images/profile-photo.png -------------------------------------------------------------------------------- /packages/orders_repository/lib/orders_repository.dart: -------------------------------------------------------------------------------- 1 | /// A repository that manages orders. 2 | library; 3 | 4 | export 'src/orders_repository.dart'; 5 | -------------------------------------------------------------------------------- /packages/app_ui/assets/fonts/Inter-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/packages/app_ui/assets/fonts/Inter-ExtraBold.ttf -------------------------------------------------------------------------------- /packages/app_ui/assets/fonts/Inter-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/packages/app_ui/assets/fonts/Inter-ExtraLight.ttf -------------------------------------------------------------------------------- /packages/app_ui/assets/fonts/Montserrat-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/packages/app_ui/assets/fonts/Montserrat-Medium.ttf -------------------------------------------------------------------------------- /packages/app_ui/assets/images/papa-burger-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/packages/app_ui/assets/images/papa-burger-logo.jpg -------------------------------------------------------------------------------- /packages/form_fields/lib/form_fields.dart: -------------------------------------------------------------------------------- 1 | /// A package that manages form fields like email, password etc. 2 | library; 3 | 4 | export 'src/form_fields.dart'; 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /api/lib/src/data/database/queries/queries.dart: -------------------------------------------------------------------------------- 1 | export 'credit_card_queries.dart'; 2 | export 'notifications_queries.dart'; 3 | export 'restaurants_queires.dart'; 4 | -------------------------------------------------------------------------------- /lib/src/menu/menu.dart: -------------------------------------------------------------------------------- 1 | export 'bloc/menu_bloc.dart'; 2 | export 'bloc/menu_controller.dart'; 3 | export 'view/menu_page.dart'; 4 | export 'widgets/widgets.dart'; 5 | -------------------------------------------------------------------------------- /packages/form_fields/lib/src/form_fields.dart: -------------------------------------------------------------------------------- 1 | export 'email.dart'; 2 | export 'formz_validation_mixin.dart'; 3 | export 'password.dart'; 4 | export 'username.dart'; 5 | -------------------------------------------------------------------------------- /packages/shared/lib/src/config/config.dart: -------------------------------------------------------------------------------- 1 | export 'background_timer.dart'; 2 | export 'debouncer.dart'; 3 | export 'logger.dart'; 4 | export 'utilities/utils.dart'; 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /lib/src/cart/cart.dart: -------------------------------------------------------------------------------- 1 | export 'bloc/cart_bloc.dart'; 2 | export 'bloc/order_progress_cubit.dart'; 3 | export 'view/cart_page.dart'; 4 | export 'widgets/widgets.dart'; 5 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/payments_repository/lib/payments_repository.dart: -------------------------------------------------------------------------------- 1 | /// A repository that manages payments data flow. 2 | library; 3 | 4 | export 'src/payments_repository.dart'; 5 | -------------------------------------------------------------------------------- /packages/shared/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | 3 | linter: 4 | rules: 5 | public_member_api_docs: false 6 | -------------------------------------------------------------------------------- /lib/src/payments/payments.dart: -------------------------------------------------------------------------------- 1 | export 'bloc/payments_bloc.dart'; 2 | export 'bloc/selected_card_cubit.dart'; 3 | export 'view/view.dart'; 4 | export 'widgets/widgets.dart'; 5 | -------------------------------------------------------------------------------- /lib/src/payments/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'delete_card_button.dart'; 2 | export 'link_credit_card_list_tile.dart'; 3 | export 'smooth_payment_progress_indicator.dart'; 4 | -------------------------------------------------------------------------------- /packages/authentication_client/token_storage/lib/token_storage.dart: -------------------------------------------------------------------------------- 1 | /// Token storage for the authentication client 2 | library; 3 | 4 | export 'src/token_storage.dart'; 5 | -------------------------------------------------------------------------------- /packages/notifications_client/lib/notifications_client.dart: -------------------------------------------------------------------------------- 1 | /// A Very Good Project created by Very Good CLI. 2 | library; 3 | 4 | export 'src/notifications_client.dart'; 5 | -------------------------------------------------------------------------------- /packages/permission_client/lib/permission_client.dart: -------------------------------------------------------------------------------- 1 | /// A client that handles requesting permissions on a device. 2 | library; 3 | 4 | export 'src/permission_client.dart'; 5 | -------------------------------------------------------------------------------- /lib/src/cart/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'cart_bottom_bar.dart'; 2 | export 'cart_item_card.dart'; 3 | export 'cart_items_list_view.dart'; 4 | export 'checkout_modal_view.dart'; 5 | -------------------------------------------------------------------------------- /packages/location_repository/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | linter: 3 | rules: 4 | public_member_api_docs: false 5 | -------------------------------------------------------------------------------- /packages/payments_client/stripe_payments_client/lib/stripe_payments_client.dart: -------------------------------------------------------------------------------- 1 | /// Payments client based on Stripe. 2 | library; 3 | 4 | export 'src/stripe_payments_client.dart'; 5 | -------------------------------------------------------------------------------- /packages/restaurants_repository/lib/restaurants_repository.dart: -------------------------------------------------------------------------------- 1 | /// A repository that manages restaurants data flow. 2 | library; 3 | 4 | export 'src/restaurants_repository.dart'; 5 | -------------------------------------------------------------------------------- /api/lib/src/common/config/config.dart: -------------------------------------------------------------------------------- 1 | export 'delivery_estimator.dart'; 2 | export 'env.dart'; 3 | export 'missing_fields.dart'; 4 | export 'url_builder.dart'; 5 | export 'uuid_gen.dart'; 6 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /lib/src/restaurants/filter/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'filter_button.dart'; 2 | export 'filter_section.dart'; 3 | export 'more_filters_button.dart'; 4 | export 'reset_filters_button.dart'; 5 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /packages/shared/lib/shared.dart: -------------------------------------------------------------------------------- 1 | /// A package that stores shared components, models and logic. 2 | library; 3 | 4 | export 'src/config/config.dart'; 5 | export 'src/models/models.dart'; 6 | -------------------------------------------------------------------------------- /packages/user_repository/lib/user_repository.dart: -------------------------------------------------------------------------------- 1 | /// A repository that manages user data flow. 2 | library; 3 | 4 | export 'src/models/models.dart'; 5 | export 'src/user_repository.dart'; 6 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /packages/notifications_repository/lib/notifications_repository.dart: -------------------------------------------------------------------------------- 1 | /// A repository that manages notifications with web socket. 2 | library; 3 | 4 | export 'src/notifications_repository.dart'; 5 | -------------------------------------------------------------------------------- /packages/env/test/src/env_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | 3 | import 'package:flutter_test/flutter_test.dart'; 4 | 5 | void main() { 6 | group('Env', () {}); 7 | } 8 | -------------------------------------------------------------------------------- /packages/storage/storage/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | build/ 7 | pubspec.lock -------------------------------------------------------------------------------- /packages/user_repository/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | build/ 7 | pubspec.lock -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsezlife/yandex-eats-clone/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /packages/location_repository/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | build/ 7 | pubspec.lock -------------------------------------------------------------------------------- /packages/orders_repository/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | build/ 7 | pubspec.lock -------------------------------------------------------------------------------- /packages/payments_repository/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | build/ 7 | pubspec.lock -------------------------------------------------------------------------------- /packages/permission_client/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | build/ 7 | pubspec.lock -------------------------------------------------------------------------------- /packages/shared/test/src/shared_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | 3 | import 'package:flutter_test/flutter_test.dart'; 4 | 5 | void main() { 6 | group('Shared', () {}); 7 | } 8 | -------------------------------------------------------------------------------- /api/routes/index.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:dart_frog/dart_frog.dart'; 4 | 5 | Response onRequest(RequestContext context) { 6 | return Response(statusCode: HttpStatus.noContent); 7 | } 8 | -------------------------------------------------------------------------------- /lib/src/auth/login/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'forgot_password_view.dart'; 2 | export 'login_footer.dart'; 3 | export 'login_form.dart'; 4 | export 'login_form_listener.dart'; 5 | export 'welcome_image.dart'; 6 | -------------------------------------------------------------------------------- /lib/src/map/map.dart: -------------------------------------------------------------------------------- 1 | export 'bloc/auto_complete_bloc.dart'; 2 | export 'bloc/location_bloc.dart'; 3 | export 'bloc/map_bloc.dart'; 4 | export 'view/google_map_page.dart'; 5 | export 'widgets/widgets.dart'; 6 | -------------------------------------------------------------------------------- /packages/notifications_repository/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | build/ 7 | pubspec.lock -------------------------------------------------------------------------------- /packages/restaurants_repository/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | build/ 7 | pubspec.lock -------------------------------------------------------------------------------- /packages/user_repository/test/src/user_repository_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('UserRepository', () {}); 6 | } 7 | -------------------------------------------------------------------------------- /devtools_options.yaml: -------------------------------------------------------------------------------- 1 | description: This file stores settings for Dart & Flutter DevTools. 2 | documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states 3 | extensions: 4 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /packages/authentication_client/token_storage/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | build/ 7 | pubspec.lock -------------------------------------------------------------------------------- /packages/form_fields/test/src/form_fields_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | 3 | import 'package:flutter_test/flutter_test.dart'; 4 | 5 | void main() { 6 | group('FormFields', () {}); 7 | } 8 | -------------------------------------------------------------------------------- /packages/orders_repository/test/src/orders_repository_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('OrdersRepository', () {}); 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/location_repository/test/src/location_repository_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('LocationRepository', () {}); 6 | } 7 | -------------------------------------------------------------------------------- /packages/payments_repository/test/src/payments_repository_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('PaymentsRepository', () {}); 6 | } 7 | -------------------------------------------------------------------------------- /api/lib/src/common/utils/extensions/async_read_extension.dart: -------------------------------------------------------------------------------- 1 | import 'package:dart_frog/dart_frog.dart'; 2 | 3 | extension AsyncContextReadExtension on RequestContext { 4 | Future futureRead() => read>(); 5 | } 6 | -------------------------------------------------------------------------------- /packages/restaurants_repository/test/src/restaurants_repository_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('RestaurantsRepository', () {}); 6 | } 7 | -------------------------------------------------------------------------------- /packages/storage/persistent_storage/lib/persistent_storage.dart: -------------------------------------------------------------------------------- 1 | /// Storage that saves data in the device's persistent memory. 2 | library; 3 | 4 | export 'src/persistent_storage.dart'; 5 | export 'src/persistent_storage_list.dart'; 6 | -------------------------------------------------------------------------------- /packages/notifications_repository/test/src/notifications_repository_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('NotificationsRepository', () {}); 6 | } 7 | -------------------------------------------------------------------------------- /api/lib/src/common/utils/extensions/extensions.dart: -------------------------------------------------------------------------------- 1 | export 'async_read_extension.dart'; 2 | export 'formatter_extension.dart'; 3 | export 'request_contex_extension.dart'; 4 | export 'response_extension.dart'; 5 | export 'string_extension.dart'; 6 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/lib/firebase_authentication_client.dart: -------------------------------------------------------------------------------- 1 | /// A Firebase implementation of the authentication client interface 2 | library; 3 | 4 | export 'src/firebase_authentication_client.dart'; 5 | -------------------------------------------------------------------------------- /packages/authentication_client/authentication_client/lib/authentication_client.dart: -------------------------------------------------------------------------------- 1 | /// An Authentication Client Interface. 2 | library authentication_client; 3 | 4 | export 'src/authentication_client.dart'; 5 | export 'src/models/models.dart'; 6 | -------------------------------------------------------------------------------- /packages/notifications_client/test/src/notifications_client_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | 3 | import 'package:flutter_test/flutter_test.dart'; 4 | 5 | void main() { 6 | group('NotificationsClient', () {}); 7 | } 8 | -------------------------------------------------------------------------------- /lib/src/map/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'auto_completes_list_view.dart'; 2 | export 'google_map_address.dart'; 3 | export 'google_map_back_button.dart'; 4 | export 'google_map_save_location_button.dart'; 5 | export 'search_location_autocomplete.dart'; 6 | -------------------------------------------------------------------------------- /packages/location_repository/lib/location_repository.dart: -------------------------------------------------------------------------------- 1 | /// A repository that manages user location. 2 | library; 3 | 4 | export 'package:geolocator/geolocator.dart'; 5 | 6 | export 'src/location_repository.dart'; 7 | export 'src/models/models.dart'; 8 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /packages/app_ui/test/src/app_ui_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | 3 | import 'package:flutter_test/flutter_test.dart'; 4 | 5 | void main() { 6 | group('AppUi', () { 7 | test('can be instantiated', () {}); 8 | }); 9 | } 10 | -------------------------------------------------------------------------------- /lib/src/menu/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'menu_discounts.dart'; 2 | export 'menu_item_card.dart'; 3 | export 'menu_item_preview.dart'; 4 | export 'menu_props.dart'; 5 | export 'menu_section_header.dart'; 6 | export 'menu_section_items.dart'; 7 | export 'menu_tab_bar.dart'; 8 | -------------------------------------------------------------------------------- /api/lib/src/data/models/postgres/postgres.dart: -------------------------------------------------------------------------------- 1 | export 'db_credit_card.dart'; 2 | export 'db_menu.dart'; 3 | export 'db_menu_item.dart'; 4 | export 'db_notification.dart'; 5 | export 'db_order_details.dart'; 6 | export 'db_order_menu_item.dart'; 7 | export 'db_restaurant.dart'; 8 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/app_ui/lib/src/extensions/extensions.dart: -------------------------------------------------------------------------------- 1 | export 'build_context_extension.dart'; 2 | export 'ignore_pointer_extension.dart'; 3 | export 'show_dialog_extension.dart'; 4 | export 'snack_bar_extension.dart'; 5 | export 'string_extension.dart'; 6 | export 'text_style_extension.dart'; 7 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/test/src/firebase_authentication_client_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | 3 | import 'package:flutter_test/flutter_test.dart'; 4 | 5 | void main() { 6 | group('FirebaseAuthenticationClient', () {}); 7 | } 8 | -------------------------------------------------------------------------------- /packages/storage/storage/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: storage 2 | description: A Dart Storage Client Interface 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ^3.4.0 8 | 9 | dev_dependencies: 10 | mocktail: ^1.0.3 11 | test: ^1.25.2 12 | very_good_analysis: ^5.1.0 13 | -------------------------------------------------------------------------------- /api/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | analyzer: 3 | exclude: 4 | - lib/**/*.g.dart 5 | - lib/**/*.schema.dart 6 | linter: 7 | rules: 8 | file_names: false 9 | avoid_print: false 10 | public_member_api_docs: false 11 | -------------------------------------------------------------------------------- /api/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # version: '3.9' 2 | 3 | # services: 4 | # redis: 5 | # image: "redis:alpine" 6 | # ports: 7 | # - "6379:6379" 8 | 9 | # papaburgerserver: 10 | # image: papaburgerserver 11 | # build: 12 | # context: . 13 | # dockerfile: ./Dockerfile -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/src/menu/bloc/menu_event.dart: -------------------------------------------------------------------------------- 1 | part of 'menu_bloc.dart'; 2 | 3 | sealed class MenuEvent extends Equatable { 4 | const MenuEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | final class MenuFetchRequested extends MenuEvent { 11 | const MenuFetchRequested(); 12 | } 13 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/yandex_food_delivery_clone/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.yandex_food_delivery_clone 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | import io.flutter.embedding.android.FlutterFragmentActivity 5 | 6 | class MainActivity: FlutterFragmentActivity() { 7 | } 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | analyzer: 3 | exclude: 4 | - lib/l10n/generated/* 5 | - lib/generated/* 6 | - lib/**/*.g.dart 7 | - assets/**/*.gen.dart 8 | - packages/**/*.gen.dart 9 | linter: 10 | rules: 11 | public_member_api_docs: false -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /local.properties 5 | GeneratedPluginRegistrant.java 6 | 7 | # Remember to never publicly share your keystore. 8 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 9 | key.properties 10 | **/*.keystore 11 | **/*.jks 12 | -------------------------------------------------------------------------------- /api/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | pubspec.lock 7 | 8 | # Files and directories created by dart_frog 9 | build/ 10 | .dart_frog 11 | *.env 12 | .vscode 13 | 14 | # Test related files 15 | coverage/ 16 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/authentication_client/token_storage/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: token_storage 2 | description: Token storage for the authentication client 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: "^3.3.0" 8 | 9 | dev_dependencies: 10 | mocktail: ^1.0.3 11 | test: ^1.25.2 12 | very_good_analysis: ^5.1.0 13 | -------------------------------------------------------------------------------- /api/lib/client.dart: -------------------------------------------------------------------------------- 1 | /// Yandex Eats Clone API Client-Side Library 2 | library client; 3 | 4 | export 'src/client/yandex_eats_api_client.dart'; 5 | export 'src/common/config/uuid_gen.dart'; 6 | export 'src/common/remote/app_dio.dart'; 7 | export 'src/common/utils/extensions/formatter_extension.dart'; 8 | export 'src/data/models/models.dart'; 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.github/workflows/main.yaml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | 7 | on: 8 | pull_request: 9 | branches: 10 | - main 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: noop 17 | run: echo 'noop' -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/src/menu/widgets/menu_props.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:yandex_food_api/client.dart'; 3 | 4 | class MenuProps extends Equatable { 5 | const MenuProps({required this.restaurant}); 6 | 7 | final Restaurant restaurant; 8 | 9 | @override 10 | List get props => [restaurant]; 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/notifications/bloc/notifications_event.dart: -------------------------------------------------------------------------------- 1 | part of 'notifications_bloc.dart'; 2 | 3 | sealed class NotificationsEvent { 4 | const NotificationsEvent(); 5 | } 6 | 7 | final class NotificationMessageChanged extends NotificationsEvent { 8 | const NotificationMessageChanged(this.message); 9 | 10 | final String message; 11 | } 12 | -------------------------------------------------------------------------------- /packages/app_ui/lib/src/extensions/string_extension.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs 2 | 3 | extension StringExtension on String { 4 | String capitalized() => '${this[0].toUpperCase()}${substring(1)}'; 5 | bool trimmedContains(String other) => trim().toLowerCase().contains( 6 | other.trim().toLowerCase(), 7 | ); 8 | } 9 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/dependabot.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | enable-beta-ecosystems: true 3 | updates: 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "daily" 8 | - package-ecosystem: "pub" 9 | directory: "/" 10 | schedule: 11 | interval: "daily" 12 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /api/lib/src/data/models/models.dart: -------------------------------------------------------------------------------- 1 | export 'connection_channel.dart'; 2 | export 'credit_card.dart'; 3 | export 'location.dart'; 4 | export 'menu.dart'; 5 | export 'menu_item.dart'; 6 | export 'notification.dart'; 7 | export 'order.dart'; 8 | export 'order_menu_item.dart'; 9 | export 'order_status.dart'; 10 | export 'restaurant.dart'; 11 | export 'restaurants_page.dart'; 12 | -------------------------------------------------------------------------------- /macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /packages/app_ui/lib/src/extensions/ignore_pointer_extension.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs 2 | 3 | import 'package:flutter/material.dart' show IgnorePointer, Widget; 4 | 5 | extension IgnorePointerX on Widget { 6 | Widget ignorePointer({required bool isMoving, bool isMarker = false}) => 7 | IgnorePointer(ignoring: isMarker || isMoving, child: this); 8 | } 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/continuous-integration.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Continuous Integration 3 | about: Changes to the CI configuration files and scripts 4 | title: 'ci: ' 5 | labels: ci 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Description** 11 | 12 | Describe what changes need to be done to the ci/cd system and why. 13 | 14 | **Requirements** 15 | 16 | - [ ] The ci system is passing 17 | -------------------------------------------------------------------------------- /lib/src/search/bloc/search_event.dart: -------------------------------------------------------------------------------- 1 | part of 'search_bloc.dart'; 2 | 3 | sealed class SearchEvent extends Equatable { 4 | const SearchEvent(); 5 | } 6 | 7 | final class SearchTermChanged extends SearchEvent { 8 | const SearchTermChanged({this.searchTerm = ''}); 9 | 10 | final String searchTerm; 11 | 12 | @override 13 | List get props => [searchTerm]; 14 | } 15 | -------------------------------------------------------------------------------- /packages/permission_client/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: permission_client 2 | description: A client that handles requesting permissions on a device. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ^3.4.0 8 | 9 | dev_dependencies: 10 | mocktail: ^1.0.3 11 | test: ^1.25.2 12 | very_good_analysis: ^6.0.0 13 | dependencies: 14 | permission_handler: ^11.3.1 15 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/build-system.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Build System 3 | about: Changes that affect the build system or external dependencies 4 | title: 'build: ' 5 | labels: build 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Description** 11 | 12 | Describe what changes need to be done to the build system and why. 13 | 14 | **Requirements** 15 | 16 | - [ ] The build system is passing 17 | -------------------------------------------------------------------------------- /packages/permission_client/test/src/permission_client_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | import 'package:permission_client/permission_client.dart'; 3 | import 'package:test/test.dart'; 4 | 5 | void main() { 6 | group('PermissionClient', () { 7 | test('can be instantiated', () { 8 | expect(PermissionClient(), isNotNull); 9 | }); 10 | }); 11 | } 12 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /lib/src/cart/bloc/order_progress_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | 3 | class OrderProgressCubit extends Cubit { 4 | OrderProgressCubit() : super('00:00'); 5 | 6 | void addCount(Duration duration) { 7 | final elapsed = '${(duration.inSeconds / 60).floor()}' 8 | ':${(duration.inSeconds % 60).toString().padLeft(2, '0')}'; 9 | emit(elapsed); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/chore.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Chore 3 | about: Other changes that don't modify src or test files 4 | title: 'chore: ' 5 | labels: chore 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Description** 11 | 12 | Clearly describe what change is needed and why. If this changes code then please use another issue type. 13 | 14 | **Requirements** 15 | 16 | - [ ] No functional changes to the code 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation 3 | about: Improve the documentation so all collaborators have a common understanding 4 | title: 'docs: ' 5 | labels: documentation 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Description** 11 | 12 | Clearly describe what documentation you are looking to add or improve. 13 | 14 | **Requirements** 15 | 16 | - [ ] Requirements go here 17 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/ISSUE_TEMPLATE/ci.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Continuous Integration 3 | about: Changes to the CI configuration files and scripts 4 | title: "ci: " 5 | labels: ci 6 | --- 7 | 8 | **Description** 9 | 10 | Describe what changes need to be done to the ci/cd system and why. 11 | 12 | **Requirements** 13 | 14 | - [ ] The ci system is passing 15 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /packages/app_ui/assets/icons/pin-icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = '../build' 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | } 12 | subprojects { 13 | project.evaluationDependsOn(':app') 14 | } 15 | 16 | tasks.register("clean", Delete) { 17 | delete rootProject.buildDir 18 | } 19 | -------------------------------------------------------------------------------- /api/lib/src/data/models/order_status.dart: -------------------------------------------------------------------------------- 1 | import 'package:yandex_food_api/api.dart'; 2 | 3 | enum OrderStatus { 4 | pending, 5 | canceled, 6 | completed; 7 | 8 | static OrderStatus fromJson(String jsonString) => 9 | OrderStatus.values.firstWhere((e) => e.name == jsonString.toLowerCase()); 10 | String toJson() => 11 | OrderStatus.values.firstWhere((e) => e == this).name.capitalized(); 12 | } 13 | -------------------------------------------------------------------------------- /lib/src/auth/login/widgets/welcome_image.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class WelcomeImage extends StatelessWidget { 5 | const WelcomeImage({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | const size = 286.0; 10 | 11 | return Assets.images.welcome.image(height: size, cacheHeight: size.toInt()); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/map/bloc/auto_complete_event.dart: -------------------------------------------------------------------------------- 1 | part of 'auto_complete_bloc.dart'; 2 | 3 | sealed class AutoCompleteEvent extends Equatable { 4 | const AutoCompleteEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | final class AutoCompleteFetchRequested extends AutoCompleteEvent { 11 | const AutoCompleteFetchRequested({this.searchTerm = ''}); 12 | 13 | final String searchTerm; 14 | } 15 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/ISSUE_TEMPLATE/build.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Build System 3 | about: Changes that affect the build system or external dependencies 4 | title: "build: " 5 | labels: build 6 | --- 7 | 8 | **Description** 9 | 10 | Describe what changes need to be done to the build system and why. 11 | 12 | **Requirements** 13 | 14 | - [ ] The build system is passing 15 | -------------------------------------------------------------------------------- /api/lib/api.dart: -------------------------------------------------------------------------------- 1 | /// Yandex Eats Clone API Server-Side Library 2 | library api; 3 | 4 | export 'src/common/common.dart' hide Env; 5 | export 'src/common/remote/remote.dart'; 6 | export 'src/data/database/database.dart'; 7 | export 'src/data/db_restaurants_fake_data_insert.dart'; 8 | export 'src/data/models/models.dart'; 9 | export 'src/data/models/postgres/postgres.dart'; 10 | export 'src/middleware/middleware.dart'; 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/test.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Test 3 | about: Adding missing tests or correcting existing tests 4 | title: 'test: ' 5 | labels: test 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Description** 11 | 12 | List out the tests that need to be added or changed. Please also include any information as to why this was not covered in the past. 13 | 14 | **Requirements** 15 | 16 | - [ ] There is no drop in test coverage. 17 | -------------------------------------------------------------------------------- /lib/src/orders/order/bloc/order_event.dart: -------------------------------------------------------------------------------- 1 | part of 'order_bloc.dart'; 2 | 3 | sealed class OrderEvent extends Equatable { 4 | const OrderEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | final class OrderFetchRequested extends OrderEvent { 11 | const OrderFetchRequested(); 12 | } 13 | 14 | final class OrderDeleteRequested extends OrderEvent { 15 | const OrderDeleteRequested(); 16 | } 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/style-changes.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Style Changes 3 | about: Changes that do not affect the meaning of the code (white space, formatting, 4 | missing semi-colons, etc) 5 | title: 'style: ' 6 | labels: style 7 | assignees: '' 8 | 9 | --- 10 | 11 | **Description** 12 | 13 | Clearly describe what you are looking to change and why. 14 | 15 | **Requirements** 16 | 17 | - [ ] There is no drop in test coverage. 18 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | -dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivity$g 2 | -dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Args 3 | -dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Error 4 | -dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter 5 | -dontwarn com.stripe.android.pushProvisioning.PushProvisioningEphemeralKeyProvider -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/ISSUE_TEMPLATE/chore.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Chore 3 | about: Other changes that don't modify src or test files 4 | title: "chore: " 5 | labels: chore 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what change is needed and why. If this changes code then please use another issue type. 11 | 12 | **Requirements** 13 | 14 | - [ ] No functional changes to the code 15 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/ISSUE_TEMPLATE/documentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation 3 | about: Improve the documentation so all collaborators have a common understanding 4 | title: "docs: " 5 | labels: documentation 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what documentation you are looking to add or improve. 11 | 12 | **Requirements** 13 | 14 | - [ ] Requirements go here 15 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/ISSUE_TEMPLATE/style.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Style Changes 3 | about: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc) 4 | title: "style: " 5 | labels: style 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what you are looking to change and why. 11 | 12 | **Requirements** 13 | 14 | - [ ] There is no drop in test coverage. 15 | -------------------------------------------------------------------------------- /packages/orders_repository/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: orders_repository 2 | description: A repository that manages orders. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: "^3.3.0" 8 | 9 | dependencies: 10 | shared: 11 | path: ../shared 12 | web_socket_client: ^0.1.4 13 | yandex_food_api: 14 | path: ../../api 15 | 16 | dev_dependencies: 17 | mocktail: ^1.0.3 18 | test: ^1.25.2 19 | very_good_analysis: ^6.0.0 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/refactor.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Refactor 3 | about: A code change that neither fixes a bug nor adds a feature 4 | title: 'refactor: ' 5 | labels: refactor 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Description** 11 | 12 | Clearly describe what needs to be refactored and why. Please provide links to related issues (bugs or upcoming features) in order to help prioritize. 13 | 14 | **Requirements** 15 | 16 | - [ ] There is no drop in test coverage. 17 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/ISSUE_TEMPLATE/test.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Test 3 | about: Adding missing tests or correcting existing tests 4 | title: "test: " 5 | labels: test 6 | --- 7 | 8 | **Description** 9 | 10 | List out the tests that need to be added or changed. Please also include any information as to why this was not covered in the past. 11 | 12 | **Requirements** 13 | 14 | - [ ] There is no drop in test coverage. 15 | -------------------------------------------------------------------------------- /packages/notifications_client/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: notifications_client 2 | description: Flutter in-app local Notifications Client. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ^3.4.0 8 | flutter: ^3.22.0 9 | 10 | dependencies: 11 | flutter: 12 | sdk: flutter 13 | flutter_local_notifications: ^17.1.2 14 | 15 | dev_dependencies: 16 | flutter_test: 17 | sdk: flutter 18 | mocktail: ^1.0.3 19 | very_good_analysis: ^6.0.0 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/performance-update.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Performance Update 3 | about: A code change that improves performance 4 | title: 'perf: ' 5 | labels: performance 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Description** 11 | 12 | Clearly describe what code needs to be changed and what the performance impact is going to be. Bonus point's if you can tie this directly to user experience. 13 | 14 | **Requirements** 15 | 16 | - [ ] There is no drop in test coverage. 17 | -------------------------------------------------------------------------------- /packages/app_ui/lib/src/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'app_bottom_bar.dart'; 2 | export 'app_circular_progress_indicator.dart'; 3 | export 'app_constrained_scroll_view.dart'; 4 | export 'app_icon.dart'; 5 | export 'app_info_section.dart'; 6 | export 'app_input_text.dart'; 7 | export 'app_scaffold.dart'; 8 | export 'discount_price.dart'; 9 | export 'image_thumbnail.dart'; 10 | export 'shimmer_placeholder.dart'; 11 | export 'tappable.dart'; 12 | export 'thumbnail_error.dart'; 13 | -------------------------------------------------------------------------------- /packages/authentication_client/authentication_client/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: authentication_client 2 | description: An Authentication Client Interface. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ">=3.3.1 <4.0.0" 8 | flutter: ^3.22.0 9 | 10 | dependencies: 11 | equatable: ^2.0.5 12 | flutter: 13 | sdk: flutter 14 | 15 | dev_dependencies: 16 | flutter_test: 17 | sdk: flutter 18 | mocktail: ^1.0.2 19 | very_good_analysis: ^5.1.0 20 | -------------------------------------------------------------------------------- /packages/form_fields/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: form_fields 2 | description: A package that manages form fields like email, password etc. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: "^3.3.0" 8 | flutter: "^3.19.0" 9 | 10 | dependencies: 11 | equatable: ^2.0.5 12 | flutter: 13 | sdk: flutter 14 | formz: ^0.4.1 15 | 16 | dev_dependencies: 17 | flutter_test: 18 | sdk: flutter 19 | mocktail: ^1.0.3 20 | very_good_analysis: ^5.1.0 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/revert-commit.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Revert Commit 3 | about: Reverts a previous commit 4 | title: 'revert: ' 5 | labels: revert 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Description** 11 | 12 | Provide a link to a PR/Commit that you are looking to revert and why. 13 | 14 | **Requirements** 15 | 16 | - [ ] Change has been reverted 17 | - [ ] No change in test coverage has happened 18 | - [ ] A new ticket is created for any follow on work that needs to happen 19 | -------------------------------------------------------------------------------- /lib/src/app/routes/app_routes.dart: -------------------------------------------------------------------------------- 1 | enum AppRoutes { 2 | restaurants('/restaurants'), 3 | auth('/auth'), 4 | cart('/cart'), 5 | profile('/profile'), 6 | orders('/orders'), 7 | order('/order'), 8 | notifications('/notifications'), 9 | searchLocation('/search_location'), 10 | search('/search'), 11 | googleMap('/google_map'), 12 | updateEmail('/update_email'), 13 | menu('/menu'); 14 | 15 | const AppRoutes(this.route); 16 | 17 | final String route; 18 | } 19 | -------------------------------------------------------------------------------- /packages/env/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: env 2 | description: A package that manages application secrets. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ^3.4.0 8 | flutter: ^3.22.0 9 | 10 | dependencies: 11 | envied: ^0.5.4+1 12 | flutter: 13 | sdk: flutter 14 | 15 | dev_dependencies: 16 | build_runner: ^2.4.11 17 | envied_generator: ^0.5.4+1 18 | flutter_test: 19 | sdk: flutter 20 | mocktail: ^1.0.4 21 | very_good_analysis: ^6.0.0 22 | -------------------------------------------------------------------------------- /packages/payments_repository/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: payments_repository 2 | description: A repository that manages payments data flow. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ^3.4.0 8 | 9 | dependencies: 10 | stripe_payments_client: 11 | path: ../payments_client/stripe_payments_client 12 | yandex_food_api: 13 | path: ../../api 14 | 15 | dev_dependencies: 16 | mocktail: ^1.0.3 17 | test: ^1.25.2 18 | very_good_analysis: ^6.0.0 19 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/auth/cubit/auth_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | 3 | /// {@template auth_cubit} 4 | /// Cubit for auth state management. It is used to change auth from login to 5 | /// signup or reversed. 6 | /// {@endtemplate} 7 | class AuthCubit extends Cubit { 8 | /// {@macro cubit} 9 | AuthCubit() : super(true); 10 | 11 | /// Defines method to change auth from login to signup or reversed. 12 | void changeAuth({required bool showLogin}) => emit(showLogin); 13 | } 14 | -------------------------------------------------------------------------------- /packages/storage/secure_storage/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: secure_storage 2 | description: A Key/Value Secure Storage Client 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ^3.4.0 8 | flutter: ^3.22.0 9 | 10 | dependencies: 11 | flutter: 12 | sdk: flutter 13 | flutter_secure_storage: ^9.2.2 14 | storage: 15 | path: ../storage 16 | 17 | dev_dependencies: 18 | flutter_test: 19 | sdk: flutter 20 | mocktail: ^1.0.3 21 | very_good_analysis: ^5.1.0 22 | -------------------------------------------------------------------------------- /.github/workflows/spell_checker.yaml: -------------------------------------------------------------------------------- 1 | name: spell_checker 2 | 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | 7 | on: [push, pull_request] 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v4 15 | - uses: zwaldowski/cspell-action@v1 16 | with: 17 | paths: "**/*.{md,dart}" 18 | config: .vscode/cspell.json 19 | exclude: ".gitignore" 20 | -------------------------------------------------------------------------------- /api/lib/src/common/utils/extensions/response_extension.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:dart_frog/dart_frog.dart'; 4 | 5 | extension ResponseX on Response { 6 | Response notFound() => Response(statusCode: HttpStatus.notFound); 7 | Response badRequest() => Response(statusCode: HttpStatus.badRequest); 8 | Response methodNotAllowed() => 9 | Response(statusCode: HttpStatus.methodNotAllowed); 10 | Response noContent() => Response(statusCode: HttpStatus.noContent); 11 | } 12 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/ISSUE_TEMPLATE/performance.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Performance Update 3 | about: A code change that improves performance 4 | title: "perf: " 5 | labels: performance 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what code needs to be changed and what the performance impact is going to be. Bonus point's if you can tie this directly to user experience. 11 | 12 | **Requirements** 13 | 14 | - [ ] There is no drop in test coverage. 15 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/ISSUE_TEMPLATE/refactor.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Refactor 3 | about: A code change that neither fixes a bug nor adds a feature 4 | title: "refactor: " 5 | labels: refactor 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what needs to be refactored and why. Please provide links to related issues (bugs or upcoming features) in order to help prioritize. 11 | 12 | **Requirements** 13 | 14 | - [ ] There is no drop in test coverage. 15 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/ISSUE_TEMPLATE/revert.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Revert Commit 3 | about: Reverts a previous commit 4 | title: "revert: " 5 | labels: revert 6 | --- 7 | 8 | **Description** 9 | 10 | Provide a link to a PR/Commit that you are looking to revert and why. 11 | 12 | **Requirements** 13 | 14 | - [ ] Change has been reverted 15 | - [ ] No change in test coverage has happened 16 | - [ ] A new ticket is created for any follow on work that needs to happen 17 | -------------------------------------------------------------------------------- /packages/restaurants_repository/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: restaurants_repository 2 | description: A repository that manages restaurants data flow. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: "^3.3.0" 8 | 9 | dependencies: 10 | rxdart: ^0.27.7 11 | shared: 12 | path: ../shared 13 | storage: 14 | path: ../storage/storage 15 | yandex_food_api: 16 | path: ../../api 17 | 18 | dev_dependencies: 19 | mocktail: ^1.0.3 20 | test: ^1.25.2 21 | very_good_analysis: ^6.0.0 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: A new feature to be added to the project 4 | title: 'feat: ' 5 | labels: enhancement, feature 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Description** 11 | 12 | Clearly describe what you are looking to add. The more context the better. 13 | 14 | **Requirements** 15 | 16 | - [ ] Checklist of requirements to be fulfilled 17 | 18 | **Additional Context** 19 | 20 | Add any other context or screenshots about the feature request go here. 21 | -------------------------------------------------------------------------------- /packages/storage/persistent_storage/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: persistent_storage 2 | description: Storage that saves data in the device's persistent memory. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ^3.4.0 8 | flutter: ^3.22.0 9 | 10 | dependencies: 11 | flutter: 12 | sdk: flutter 13 | shared_preferences: ^2.2.3 14 | storage: 15 | path: ../storage 16 | 17 | dev_dependencies: 18 | flutter_test: 19 | sdk: flutter 20 | mocktail: ^1.0.3 21 | very_good_analysis: ^5.1.0 22 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /packages/payments_client/stripe_payments_client/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: stripe_payments_client 2 | description: Payments client based on Stripe. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ^3.4.0 8 | flutter: ^3.22.0 9 | 10 | dependencies: 11 | env: 12 | path: ../../env 13 | flutter: 14 | sdk: flutter 15 | yandex_food_api: 16 | path: ../../../api 17 | 18 | dev_dependencies: 19 | flutter_test: 20 | sdk: flutter 21 | mocktail: ^1.0.4 22 | very_good_analysis: ^6.0.0 23 | -------------------------------------------------------------------------------- /lib/src/restaurants/widgets/restaurants_error_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yandex_food_delivery_clone/src/error/error.dart'; 3 | 4 | class RestaurantsErrorView extends StatelessWidget { 5 | const RestaurantsErrorView({ 6 | required this.onTryAgain, 7 | super.key, 8 | }); 9 | 10 | final VoidCallback onTryAgain; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return SliverFillRemaining(child: ErrorView(onTryAgain: onTryAgain)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /packages/app_ui/lib/app_ui.dart: -------------------------------------------------------------------------------- 1 | /// Application UI components holder. 2 | library; 3 | 4 | export 'package:cached_network_image/cached_network_image.dart'; 5 | 6 | export 'src/colors/app_colors.dart'; 7 | export 'src/constants/constants.dart'; 8 | export 'src/extensions/extensions.dart'; 9 | export 'src/generated/generated.dart'; 10 | export 'src/size/app_size.dart'; 11 | export 'src/spacing/app_spacing.dart'; 12 | export 'src/theme/theme.dart'; 13 | export 'src/typography/typography.dart'; 14 | export 'src/widgets/widgets.dart'; 15 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 14 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: A new feature to be added to the project 4 | title: "feat: " 5 | labels: feature 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what you are looking to add. The more context the better. 11 | 12 | **Requirements** 13 | 14 | - [ ] Checklist of requirements to be fulfilled 15 | 16 | **Additional Context** 17 | 18 | Add any other context or screenshots about the feature request go here. 19 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/restaurants/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'filtered_restaurants_count.dart'; 2 | export 'filtered_restaurants_list_view.dart'; 3 | export 'restaurant_card.dart'; 4 | export 'restaurants_app_bar.dart'; 5 | export 'restaurants_empty_view.dart'; 6 | export 'restaurants_error_view.dart'; 7 | export 'restaurants_list_view.dart'; 8 | export 'restaurants_loader_item.dart'; 9 | export 'restaurants_loading_view.dart'; 10 | export 'restaurants_no_internet_view.dart'; 11 | export 'restaurants_section_header.dart'; 12 | export 'restaurants_timeout_view.dart'; 13 | -------------------------------------------------------------------------------- /api/lib/src/common/utils/password_hash_system.dart: -------------------------------------------------------------------------------- 1 | import 'package:bcrypt/bcrypt.dart'; 2 | 3 | /// Password Has System 4 | class PasswordHashSystem { 5 | /// Password Hash mechanism using ['password_hash_plus'] library 6 | static String hash(String password) { 7 | final salt = BCrypt.gensalt(); 8 | return BCrypt.hashpw(password, salt); 9 | } 10 | 11 | /// Verify two password hashed and return match result 12 | static bool verify(String password, String dbPassword) { 13 | return BCrypt.checkpw(password, dbPassword); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/auth/cubit/manage_password_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | 3 | /// {@template manage_password_cubit} 4 | /// Changes screen from forgot to change password or reversed. 5 | /// {@endtemplate} 6 | class ManagePasswordCubit extends Cubit { 7 | /// {@macro manage_password_cubit} 8 | ManagePasswordCubit() : super(true); 9 | 10 | /// Defines method to change screen from forgot to change password or 11 | /// reversed. 12 | void changeScreen({required bool showForgotPassword}) => 13 | emit(showForgotPassword); 14 | } 15 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import GoogleMaps 4 | 5 | @main 6 | @objc class AppDelegate: FlutterAppDelegate { 7 | override func application( 8 | _ application: UIApplication, 9 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 10 | ) -> Bool { 11 | GeneratedPluginRegistrant.register(with: self) 12 | GMSServices.provideAPIKey("AIzaSyCThbQUZlTxyDRpiPQKPaFeFflAK0TfPkw") 13 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/user_repository/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: user_repository 2 | description: A repository that manages user data flow. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ^3.4.0 8 | 9 | dependencies: 10 | authentication_client: 11 | path: ../authentication_client/authentication_client 12 | equatable: ^2.0.5 13 | rxdart: ^0.27.7 14 | storage: 15 | path: ../storage/storage 16 | yandex_food_api: 17 | path: ../../api 18 | 19 | dev_dependencies: 20 | mocktail: ^1.0.3 21 | test: ^1.25.2 22 | very_good_analysis: ^6.0.0 23 | -------------------------------------------------------------------------------- /lib/src/map/bloc/location_event.dart: -------------------------------------------------------------------------------- 1 | part of 'location_bloc.dart'; 2 | 3 | sealed class LocationEvent extends Equatable { 4 | const LocationEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | final class LocationChanged extends LocationEvent { 11 | const LocationChanged({required this.location}); 12 | 13 | final Location location; 14 | 15 | @override 16 | List get props => [location]; 17 | } 18 | 19 | final class LocationFetchAddressRequested extends LocationEvent { 20 | const LocationFetchAddressRequested(); 21 | } 22 | -------------------------------------------------------------------------------- /test/ensure_build_test.dart: -------------------------------------------------------------------------------- 1 | @Tags(['presubmit-only']) 2 | library; 3 | 4 | import 'package:build_verify/build_verify.dart'; 5 | import 'package:flutter_test/flutter_test.dart'; 6 | 7 | void main() { 8 | test( 9 | 'ensure_build', 10 | () { 11 | expectBuildClean( 12 | customCommand: [ 13 | 'flutter', 14 | 'pub', 15 | 'run', 16 | 'build_runner', 17 | 'build', 18 | '--delete-conflicting-outputs', 19 | ], 20 | ); 21 | }, 22 | tags: ['presubmit-only'], 23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /packages/app_ui/assets/icons/filter-icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/src/error/view/error_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:shadcn_ui/shadcn_ui.dart'; 4 | 5 | class ErrorView extends StatelessWidget { 6 | const ErrorView({this.onTryAgain, super.key}); 7 | 8 | final VoidCallback? onTryAgain; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return AppInfoSection( 13 | info: 'Something went wrong!', 14 | onPressed: onTryAgain, 15 | buttonLabel: 'Try again', 16 | icon: LucideIcons.refreshCcw, 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/restaurants/widgets/restaurants_loading_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class RestaurantsLoadingView extends StatelessWidget { 5 | const RestaurantsLoadingView({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return const SliverPadding( 10 | padding: EdgeInsets.only(top: AppSpacing.xxlg), 11 | sliver: SliverFillRemaining( 12 | hasScrollBody: false, 13 | child: AppCircularProgressIndicator.adaptive(), 14 | ), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/notifications/bloc/notifications_state.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | part of 'notifications_bloc.dart'; 3 | 4 | class NotificationsState extends Equatable { 5 | const NotificationsState._({required this.message}); 6 | 7 | const NotificationsState.initial() : this._(message: ''); 8 | 9 | final String message; 10 | 11 | @override 12 | List get props => [message]; 13 | 14 | NotificationsState copyWith({String? message}) { 15 | return NotificationsState._(message: message ?? this.message); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /api/lib/src/data/models/postgres/db_menu.dart: -------------------------------------------------------------------------------- 1 | import 'package:stormberry/stormberry.dart'; 2 | import 'package:yandex_food_api/api.dart'; 3 | 4 | part 'db_menu.schema.dart'; 5 | 6 | /// PostgreSQL DB Menu model 7 | @Model(tableName: 'Menu') 8 | abstract class DBMenu { 9 | /// Primary, auto incrementing key identifier for DB Menu model 10 | @PrimaryKey() 11 | @AutoIncrement() 12 | int get id; 13 | 14 | /// Menu category field, identifier for items 15 | String get category; 16 | 17 | /// Menu items field, storing all items of each section by each category 18 | List get items; 19 | } 20 | -------------------------------------------------------------------------------- /packages/shared/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: shared 2 | description: A package that stores shared components, models and logic. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: "^3.3.0" 8 | flutter: "^3.19.0" 9 | 10 | dependencies: 11 | equatable: ^2.0.5 12 | fast_immutable_collections: ^10.2.3 13 | flutter: 14 | sdk: flutter 15 | hive: ^2.2.3 16 | intl: ^0.19.0 17 | logger: ^2.3.0 18 | uuid: ^4.4.0 19 | yandex_food_api: 20 | path: ../../api 21 | 22 | dev_dependencies: 23 | flutter_test: 24 | sdk: flutter 25 | mocktail: ^1.0.3 26 | very_good_analysis: ^6.0.0 27 | -------------------------------------------------------------------------------- /api/lib/src/data/models/postgres/db_notification.dart: -------------------------------------------------------------------------------- 1 | import 'package:stormberry/stormberry.dart'; 2 | 3 | part 'db_notification.schema.dart'; 4 | 5 | /// {@macro db_notification} 6 | @Model(tableName: 'Notification') 7 | abstract class DBNotification { 8 | /// Unique identifier of notification. 9 | @AutoIncrement() 10 | @PrimaryKey() 11 | int get id; 12 | 13 | String get userId; 14 | 15 | /// Message text of notification. 16 | String get message; 17 | 18 | /// Date of notification. 19 | String get date; 20 | 21 | /// Whether notification is important. 22 | bool get isImportant; 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/auth/login/widgets/forgot_password_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ForgotPassword extends StatelessWidget { 5 | const ForgotPassword({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Align( 10 | alignment: Alignment.centerRight, 11 | child: TextButton( 12 | child: Text( 13 | 'Forgot password?', 14 | style: context.bodyMedium?.copyWith(fontWeight: AppFontWeight.bold), 15 | ), 16 | onPressed: () {}, 17 | ), 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/location_repository/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: location_repository 2 | description: A repository that manages user location. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ^3.4.0 8 | 9 | dev_dependencies: 10 | build_runner: ^2.4.11 11 | json_serializable: ^6.8.0 12 | mocktail: ^1.0.3 13 | test: ^1.25.2 14 | very_good_analysis: ^6.0.0 15 | 16 | dependencies: 17 | dio: ^5.5.0+1 18 | env: 19 | path: ../env 20 | equatable: ^2.0.5 21 | geolocator: ^12.0.0 22 | json_annotation: ^4.9.0 23 | shared: 24 | path: ../shared 25 | yandex_food_api: 26 | path: ../../api 27 | -------------------------------------------------------------------------------- /api/build.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | $default: 3 | builders: 4 | source_gen|combining_builder: 5 | options: 6 | ignore_for_file: 7 | - cast_nullable_to_non_nullable 8 | - implicit_dynamic_parameter 9 | - lines_longer_than_80_chars 10 | - prefer_const_constructors 11 | - require_trailing_commas 12 | json_serializable: 13 | options: 14 | create_to_json: true 15 | create_factory: true 16 | checked: true 17 | explicit_to_json: true 18 | field_rename: snake 19 | include_if_null: false 20 | -------------------------------------------------------------------------------- /packages/notifications_repository/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: notifications_repository 2 | description: A repository that manages notifications with web socket. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ^3.4.0 8 | 9 | dev_dependencies: 10 | mocktail: ^1.0.3 11 | test: ^1.25.2 12 | very_good_analysis: ^6.0.0 13 | 14 | dependencies: 15 | notifications_client: 16 | path: ../notifications_client 17 | permission_client: 18 | path: ../permission_client 19 | storage: 20 | path: ../storage/storage 21 | user_repository: 22 | path: ../user_repository 23 | web_socket_client: ^0.1.4 24 | -------------------------------------------------------------------------------- /api/README.md: -------------------------------------------------------------------------------- 1 | # server 2 | 3 | [![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link] 4 | [![License: MIT][license_badge]][license_link] 5 | [![Powered by Dart Frog](https://img.shields.io/endpoint?url=https://tinyurl.com/dartfrog-badge)](https://dartfrog.vgv.dev) 6 | 7 | An example application built with dart_frog 8 | 9 | [license_badge]: https://img.shields.io/badge/license-MIT-blue.svg 10 | [license_link]: https://opensource.org/licenses/MIT 11 | [very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg 12 | [very_good_analysis_link]: https://pub.dev/packages/very_good_analysis -------------------------------------------------------------------------------- /lib/src/restaurants/widgets/filtered_restaurants_list_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart' hide SearchBar; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:yandex_food_delivery_clone/src/restaurants/restaurants.dart'; 4 | 5 | class FilteredRestaurantsView extends StatelessWidget { 6 | const FilteredRestaurantsView({super.key}); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | final filteredRestaurants = context 11 | .select((RestaurantsBloc bloc) => bloc.state.filteredRestaurants); 12 | 13 | return RestaurantsListView(restaurants: filteredRestaurants); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/app_ui/lib/src/generated/fonts.gen.dart: -------------------------------------------------------------------------------- 1 | /// GENERATED CODE - DO NOT MODIFY BY HAND 2 | /// ***************************************************** 3 | /// FlutterGen 4 | /// ***************************************************** 5 | 6 | // coverage:ignore-file 7 | // ignore_for_file: type=lint 8 | // ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use 9 | 10 | class FontFamily { 11 | FontFamily._(); 12 | 13 | /// Font family: Inter 14 | static const String inter = 'Inter'; 15 | 16 | /// Font family: Montserrat 17 | static const String montserrat = 'Montserrat'; 18 | } 19 | -------------------------------------------------------------------------------- /api/lib/src/common/utils/utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | export 'extensions/extensions.dart'; 4 | export 'jwt_generator.dart'; 5 | export 'password_hash_system.dart'; 6 | 7 | String generateOrderId() { 8 | var counter = 0; 9 | final timestamp = 10 | DateTime.now().millisecondsSinceEpoch ~/ 1000; // Shortened timestamp 11 | final randomDigits = 12 | Random().nextInt(900) + 100; // Generate a 3-digit random number 13 | final uniqueId = (timestamp % 100000) * 1000 + randomDigits + counter; 14 | counter = (counter + 1) % 1000; // Ensure the counter stays within 3 digits 15 | return uniqueId.toString().padLeft(6, '0'); 16 | } 17 | -------------------------------------------------------------------------------- /api/lib/src/data/models/postgres/db_credit_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:stormberry/stormberry.dart'; 2 | 3 | part 'db_credit_card.schema.dart'; 4 | 5 | /// PostgreSQL DB Credit Card Model 6 | @Model(tableName: 'Credit card') 7 | abstract class DBCreditCard { 8 | @PrimaryKey() 9 | @AutoIncrement() 10 | 11 | /// User credit card id identifier 12 | int get id; 13 | 14 | /// User credit card number 15 | String get number; 16 | 17 | /// User credit card expiry date 18 | String get expiryDate; 19 | 20 | /// User credit card cvv code 21 | String get cvv; 22 | 23 | /// The user id that owns the credit card. 24 | String get userId; 25 | } 26 | -------------------------------------------------------------------------------- /api/routes/api/v1/restaurants/[place_id]/menu.dart: -------------------------------------------------------------------------------- 1 | import 'package:dart_frog/dart_frog.dart'; 2 | import 'package:stormberry/stormberry.dart'; 3 | import 'package:yandex_food_api/api.dart'; 4 | 5 | Future onRequest(RequestContext context, String placeId) async { 6 | final db = await context.futureRead(); 7 | 8 | final menusView = await db.dbmenus.query( 9 | const FindRestaurantMenuById(), 10 | QueryParams(values: {'place_id': placeId}), 11 | ); 12 | if (menusView.isEmpty) return Response().notFound(); 13 | 14 | final menus = menusView.map(Menu.fromView).toList(); 15 | return Response.json(body: {'menus': menus}); 16 | } 17 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: firebase_authentication_client 2 | description: A Firebase implementation of the authentication client interface 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: "^3.3.0" 8 | flutter: "^3.19.0" 9 | 10 | dependencies: 11 | authentication_client: 12 | path: ../authentication_client 13 | firebase_auth: ^5.0.0 14 | flutter: 15 | sdk: flutter 16 | google_sign_in: ^6.2.1 17 | token_storage: 18 | path: ../token_storage 19 | 20 | dev_dependencies: 21 | flutter_test: 22 | sdk: flutter 23 | mocktail: ^1.0.3 24 | very_good_analysis: ^5.1.0 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: 'fix: ' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Description** 11 | 12 | A clear and concise description of what the bug is. 13 | 14 | **Steps To Reproduce** 15 | 16 | 1. Go to '...' 17 | 2. Click on '....' 18 | 3. Scroll down to '....' 19 | 4. See error 20 | 21 | **Expected Behavior** 22 | 23 | A clear and concise description of what you expected to happen. 24 | 25 | **Screenshots** 26 | 27 | If applicable, add screenshots to help explain your problem. 28 | 29 | **Additional Context** 30 | 31 | Add any other context about the problem here. 32 | -------------------------------------------------------------------------------- /api/routes/api/v1/_middleware.dart: -------------------------------------------------------------------------------- 1 | import 'package:dart_frog/dart_frog.dart'; 2 | import 'package:shelf_cors_headers/shelf_cors_headers.dart' as shelf; 3 | import 'package:yandex_food_api/src/middleware/middleware.dart'; 4 | 5 | Handler middleware(Handler handler) { 6 | return handler 7 | .use(requestLogger()) 8 | .use(databaseProvider()) 9 | .use(userProvider()) 10 | .use( 11 | fromShelfMiddleware( 12 | shelf.corsHeaders( 13 | headers: { 14 | shelf.ACCESS_CONTROL_ALLOW_ORIGIN: 15 | 'https://yandex-eats-admin.vercel.app', 16 | }, 17 | ), 18 | ), 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /packages/payments_client/stripe_payments_client/test/src/stripe_payments_client_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | 3 | import 'package:flutter_test/flutter_test.dart'; 4 | import 'package:mocktail/mocktail.dart'; 5 | import 'package:stripe_payments_client/stripe_payments_client.dart'; 6 | import 'package:yandex_food_api/client.dart'; 7 | 8 | class MockAppDio extends Mock implements AppDio {} 9 | 10 | void main() { 11 | group('StripePaymentsClient', () { 12 | late AppDio appDio; 13 | 14 | setUp(() => appDio = MockAppDio()); 15 | test('can be instantiated', () { 16 | expect(StripePaymentsClient(appDio: appDio), isNotNull); 17 | }); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /packages/storage/storage/test/src/storage_test.dart: -------------------------------------------------------------------------------- 1 | // This package is just an abstraction. 2 | // See secure_storage for a concrete implementation 3 | 4 | // ignore_for_file: prefer_const_constructors 5 | 6 | import 'package:storage/storage.dart'; 7 | import 'package:test/fake.dart'; 8 | import 'package:test/test.dart'; 9 | 10 | // Storage is exported and can be implemented 11 | class FakeStorage extends Fake implements Storage {} 12 | 13 | void main() { 14 | test('Storage can be implemented', () { 15 | expect(FakeStorage.new, returnsNormally); 16 | }); 17 | 18 | test('exports StorageException', () { 19 | expect(() => StorageException('oops'), returnsNormally); 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /api/lib/src/common/utils/jwt_generator.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: lines_longer_than_80_chars 2 | 3 | import 'package:dart_jsonwebtoken/dart_jsonwebtoken.dart'; 4 | 5 | /// JWT generator 6 | class JWTUtils { 7 | /// Generate random JWT token 8 | static String generateJwt( 9 | String subject, 10 | String issuer, 11 | String secret, { 12 | String? jwtId, 13 | Duration expiry = const Duration(seconds: 30), 14 | }) { 15 | final jwt = JWT( 16 | { 17 | 'iat': DateTime.now().millisecondsSinceEpoch, 18 | }, 19 | subject: subject, 20 | issuer: issuer, 21 | jwtId: jwtId, 22 | ); 23 | return jwt.sign(SecretKey(secret), expiresIn: expiry); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = yandex_food_delivery_clone 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.yandexFoodDeliveryClone 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /packages/app_ui/lib/src/size/app_size.dart: -------------------------------------------------------------------------------- 1 | /// {@template app_size} 2 | /// The AppSize class that contains the size of the different UI components. 3 | /// {@endtemplate} 4 | abstract class AppSize { 5 | /// {@macro app_size} 6 | const AppSize(); 7 | 8 | /// The big size of icon (30.0) 9 | static const xlg = 30.0; 10 | 11 | /// The big size of icon (24.0) 12 | static const lg = 24.0; 13 | 14 | /// The medium size of icon (22.0) 15 | static const md = 22.0; 16 | 17 | /// The medium size of icon (18.0) 18 | static const sm = 18.0; 19 | 20 | /// The small size of icon (16.0) 21 | static const xs = 16.0; 22 | 23 | /// The extra small size of icon (12.0) 24 | static const xxs = 12.0; 25 | } 26 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Create a report to help us improve 4 | title: "fix: " 5 | labels: bug 6 | --- 7 | 8 | **Description** 9 | 10 | A clear and concise description of what the bug is. 11 | 12 | **Steps To Reproduce** 13 | 14 | 1. Go to '...' 15 | 2. Click on '....' 16 | 3. Scroll down to '....' 17 | 4. See error 18 | 19 | **Expected Behavior** 20 | 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | 25 | If applicable, add screenshots to help explain your problem. 26 | 27 | **Additional Context** 28 | 29 | Add any other context about the problem here. 30 | -------------------------------------------------------------------------------- /api/lib/src/data/models/postgres/db_menu_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:stormberry/stormberry.dart'; 2 | 3 | part 'db_menu_item.schema.dart'; 4 | 5 | /// PostgreSQL DB Menu Item model 6 | @Model(tableName: 'MenuItem') 7 | abstract class DBMenuItem { 8 | /// Id primary, auto incrementing key, using as an identifier of menu 9 | @PrimaryKey() 10 | @AutoIncrement() 11 | int get id; 12 | 13 | /// Menu Item name field 14 | String get name; 15 | 16 | /// Menu Item description field 17 | String get description; 18 | 19 | /// Menu Item image url field 20 | String get imageUrl; 21 | 22 | /// Menu Item price field 23 | double get price; 24 | 25 | /// Menu Item discount field 26 | double get discount; 27 | } 28 | -------------------------------------------------------------------------------- /api/lib/src/data/models/postgres/db_order_menu_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:stormberry/stormberry.dart'; 2 | 3 | part 'db_order_menu_item.schema.dart'; 4 | 5 | /// PostgreSQL DB Order Menu Items 6 | @Model(tableName: 'Order menu items') 7 | abstract class DBOrderMenuItem { 8 | /// Associated order menu items id identifier 9 | @PrimaryKey() 10 | @AutoIncrement() 11 | int get id; 12 | 13 | /// Associated order menu items item's name 14 | String get name; 15 | 16 | /// Assosisated order menu items item's quanityt 17 | int get quantity; 18 | 19 | /// Associated order menu items item's price 20 | double get price; 21 | 22 | /// Associated order menu items item's image url 23 | String get imageUrl; 24 | } 25 | -------------------------------------------------------------------------------- /packages/app_ui/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # VSCode related 20 | .vscode/* 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | **/ios/Flutter/.last_build_id 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | pubspec.lock 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Test related 44 | coverage -------------------------------------------------------------------------------- /packages/shared/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # VSCode related 20 | .vscode/* 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | **/ios/Flutter/.last_build_id 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | pubspec.lock 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Test related 44 | coverage -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /packages/form_fields/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # VSCode related 20 | .vscode/* 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | **/ios/Flutter/.last_build_id 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | pubspec.lock 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Test related 44 | coverage -------------------------------------------------------------------------------- /api/test/routes/index_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:dart_frog/dart_frog.dart'; 4 | import 'package:mocktail/mocktail.dart'; 5 | import 'package:test/test.dart'; 6 | 7 | import '../../routes/index.dart' as route; 8 | 9 | class _MockRequestContext extends Mock implements RequestContext {} 10 | 11 | void main() { 12 | group('GET /', () { 13 | test('responds with a 200 and "Welcome to Dart Frog!".', () { 14 | final context = _MockRequestContext(); 15 | final response = route.onRequest(context); 16 | expect(response.statusCode, equals(HttpStatus.ok)); 17 | expect( 18 | response.body(), 19 | completion(equals('Welcome to Dart Frog!')), 20 | ); 21 | }); 22 | }); 23 | } 24 | -------------------------------------------------------------------------------- /packages/notifications_client/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # VSCode related 20 | .vscode/* 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | **/ios/Flutter/.last_build_id 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | pubspec.lock 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Test related 44 | coverage -------------------------------------------------------------------------------- /packages/storage/secure_storage/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # VSCode related 20 | .vscode/* 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | **/ios/Flutter/.last_build_id 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | pubspec.lock 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Test related 44 | coverage -------------------------------------------------------------------------------- /packages/storage/persistent_storage/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # VSCode related 20 | .vscode/* 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | **/ios/Flutter/.last_build_id 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | pubspec.lock 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Test related 44 | coverage -------------------------------------------------------------------------------- /packages/payments_client/stripe_payments_client/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # VSCode related 20 | .vscode/* 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | **/ios/Flutter/.last_build_id 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | pubspec.lock 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Test related 44 | coverage -------------------------------------------------------------------------------- /packages/authentication_client/authentication_client/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # VSCode related 20 | .vscode/* 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | **/ios/Flutter/.last_build_id 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | pubspec.lock 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Test related 44 | coverage -------------------------------------------------------------------------------- /packages/authentication_client/authentication_client/test/src/models/authentication_user_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:authentication_client/authentication_client.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | void main() { 5 | group('AuthenticationUser', () { 6 | test('supports value equality', () { 7 | const userA = AuthenticationUser(id: 'A'); 8 | const secondUserA = AuthenticationUser(id: 'A'); 9 | const userB = AuthenticationUser(id: 'B'); 10 | 11 | expect(userA, equals(secondUserA)); 12 | expect(userA, isNot(equals(userB))); 13 | }); 14 | 15 | test('isAnonymous returns true for anonymous user', () { 16 | expect(AuthenticationUser.anonymous.isAnonymous, isTrue); 17 | }); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /api/lib/src/common/remote/token_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:dio/dio.dart'; 4 | import 'package:yandex_food_api/src/common/common.dart'; 5 | import 'package:yandex_food_api/src/common/remote/remote.dart'; 6 | 7 | class TokenInterceptor extends QueuedInterceptor { 8 | TokenInterceptor({required TokenProvider tokenProvider}) 9 | : _tokenProvider = tokenProvider; 10 | 11 | final TokenProvider _tokenProvider; 12 | 13 | @override 14 | Future onRequest( 15 | RequestOptions options, 16 | RequestInterceptorHandler handler, 17 | ) async { 18 | final token = await _tokenProvider(); 19 | options.headers.addAll({HttpHeaders.authorizationHeader: 'Bearer $token'}); 20 | handler.next(options); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # VSCode related 20 | .vscode/* 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | **/ios/Flutter/.last_build_id 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | pubspec.lock 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Test related 44 | coverage -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | ## Description 10 | 11 | 12 | 13 | ## Type of Change 14 | 15 | 16 | 17 | - [ ] ✨ New feature (non-breaking change which adds functionality) 18 | - [ ] 🛠️ Bug fix (non-breaking change which fixes an issue) 19 | - [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change) 20 | - [ ] 🧹 Code refactor 21 | - [ ] ✅ Build configuration change 22 | - [ ] 📝 Documentation 23 | - [ ] 🗑️ Chore 24 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/workflows/main.yaml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | 7 | on: 8 | pull_request: 9 | branches: 10 | - main 11 | 12 | jobs: 13 | semantic_pull_request: 14 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1 15 | 16 | spell-check: 17 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1 18 | with: 19 | includes: "**/*.md" 20 | modified_files_only: false 21 | 22 | build: 23 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 24 | with: 25 | flutter_channel: stable 26 | -------------------------------------------------------------------------------- /packages/env/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # VSCode related 20 | .vscode/* 21 | 22 | # Env generated 23 | lib/src/env.g.dart 24 | 25 | # Flutter/Dart/Pub related 26 | **/doc/api/ 27 | **/ios/Flutter/.last_build_id 28 | .dart_tool/ 29 | .flutter-plugins 30 | .flutter-plugins-dependencies 31 | .packages 32 | .pub-cache/ 33 | .pub/ 34 | /build/ 35 | pubspec.lock 36 | 37 | # Web related 38 | lib/generated_plugin_registrant.dart 39 | 40 | # Symbolication related 41 | app.*.symbols 42 | 43 | # Obfuscation related 44 | app.*.map.json 45 | 46 | # Test related 47 | coverage -------------------------------------------------------------------------------- /lib/src/home/view/home_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:go_router/go_router.dart'; 4 | import 'package:yandex_food_delivery_clone/src/drawer/drawer.dart'; 5 | import 'package:yandex_food_delivery_clone/src/navigation/navigation.dart'; 6 | 7 | class HomeView extends StatelessWidget { 8 | const HomeView({required this.navigationShell, super.key}); 9 | 10 | final StatefulNavigationShell navigationShell; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return AppScaffold( 15 | releaseFocus: true, 16 | drawer: const DrawerView(), 17 | bottomNavigationBar: BottomNavBar(navigationShell: navigationShell), 18 | body: navigationShell, 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /api/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: yandex_food_api 2 | description: An new Dart Frog application 3 | version: 1.0.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ">=3.0.0 <4.0.0" 8 | 9 | dependencies: 10 | bcrypt: ^1.1.3 11 | broadcast_bloc: ^0.1.0-dev.2 12 | dart_frog: ^1.1.0 13 | dart_frog_web_socket: ^1.0.0 14 | dart_jsonwebtoken: ^2.14.0 15 | dio: ^5.4.3 16 | dotenv: ^4.2.0 17 | envied: ^0.5.4+1 18 | equatable: ^2.0.5 19 | intl: ^0.19.0 20 | json_annotation: ^4.9.0 21 | logger: ^2.3.0 22 | shelf_cors_headers: ^0.1.5 23 | stormberry: ^0.14.0 24 | uuid: ^4.4.0 25 | 26 | dev_dependencies: 27 | build_runner: ^2.4.11 28 | envied_generator: ^0.5.4+1 29 | json_serializable: ^6.8.0 30 | mocktail: ^1.0.3 31 | test: ^1.25.5 32 | very_good_analysis: ^5.1.0 33 | -------------------------------------------------------------------------------- /lib/src/auth/login/widgets/login_footer.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class LoginFooter extends StatelessWidget { 5 | const LoginFooter({ 6 | required this.text, 7 | required this.onTap, 8 | super.key, 9 | }); 10 | 11 | final String text; 12 | final void Function()? onTap; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Row( 17 | mainAxisSize: MainAxisSize.min, 18 | children: [ 19 | const Text("Don't have an account? "), 20 | Tappable.faded( 21 | onTap: onTap, 22 | child: Text( 23 | text, 24 | style: context.bodyMedium?.copyWith(fontWeight: AppFontWeight.bold), 25 | ), 26 | ), 27 | ], 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /api/routes/api/v1/cards/index.dart: -------------------------------------------------------------------------------- 1 | import 'package:dart_frog/dart_frog.dart'; 2 | import 'package:stormberry/stormberry.dart'; 3 | import 'package:yandex_food_api/api.dart'; 4 | 5 | Future onRequest(RequestContext context) async { 6 | if (context.request.method != HttpMethod.get) { 7 | return Response().methodNotAllowed(); 8 | } 9 | final user = context.read(); 10 | if (user.isAnonymous) return Response().badRequest(); 11 | 12 | final db = await context.futureRead(); 13 | 14 | final creditCardsView = await db.dbcreditCards.query( 15 | const FindUserCreditCards(), 16 | QueryParams(values: {'user_id': user.id}), 17 | ); 18 | final creditCards = creditCardsView.map(CreditCard.fromView).toList(); 19 | return Response.json(body: {'credit_cards': creditCards}); 20 | } 21 | -------------------------------------------------------------------------------- /lib/src/auth/sign_up/widgets/sign_up_footer.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class SignUpFooter extends StatelessWidget { 5 | const SignUpFooter({ 6 | required this.text, 7 | required this.onTap, 8 | super.key, 9 | }); 10 | 11 | final String text; 12 | final void Function()? onTap; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Row( 17 | mainAxisSize: MainAxisSize.min, 18 | children: [ 19 | const Text('Already have an account? '), 20 | Tappable.faded( 21 | onTap: onTap, 22 | child: Text( 23 | text, 24 | style: context.bodyMedium?.copyWith(fontWeight: AppFontWeight.bold), 25 | ), 26 | ), 27 | ], 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/src/restaurants/widgets/restaurants_section_header.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class RestaurantsSectionHeader extends StatelessWidget { 5 | const RestaurantsSectionHeader({ 6 | required this.text, 7 | super.key, 8 | }); 9 | 10 | final String text; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return SliverToBoxAdapter( 15 | child: Padding( 16 | padding: const EdgeInsets.only( 17 | left: AppSpacing.md, 18 | right: AppSpacing.md, 19 | top: AppSpacing.lg, 20 | ), 21 | child: Text( 22 | text, 23 | style: 24 | context.headlineMedium?.copyWith(fontWeight: AppFontWeight.bold), 25 | ), 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, 4 | "module": "commonjs" /* Specify what module code is generated. */, 5 | "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, 6 | "strict": true /* Enable all strict type-checking options. */, 7 | "skipLibCheck": true /* Skip type checking all .d.ts files. */, 8 | "allowJs": true, 9 | "outDir": "build", 10 | "noImplicitAny": true, 11 | "esModuleInterop": true, 12 | "resolveJsonModule": true, 13 | "rootDir": "src", 14 | "types": ["node"], 15 | "typeRoots": ["./node_modules/@types"] 16 | }, 17 | "include": ["src/**/*"], 18 | "exclude": ["src/**/*.spec.ts"] 19 | } 20 | -------------------------------------------------------------------------------- /api/routes/api/v1/orders/index.dart: -------------------------------------------------------------------------------- 1 | import 'package:dart_frog/dart_frog.dart'; 2 | import 'package:stormberry/stormberry.dart'; 3 | import 'package:yandex_food_api/api.dart'; 4 | 5 | Future onRequest(RequestContext context) async { 6 | if (context.request.method != HttpMethod.get) { 7 | return Response().methodNotAllowed(); 8 | } 9 | final db = await context.futureRead(); 10 | 11 | final user = context.read(); 12 | if (user.isAnonymous) return Response().badRequest(); 13 | 14 | final ordersView = await db.dborderDetailses.queryDborderDetailses( 15 | QueryParams( 16 | where: 'user_id = @user_id', 17 | values: {'user_id': user.id}, 18 | ), 19 | ); 20 | final orders = ordersView.map(Order.fromView).toList(); 21 | return Response.json(body: {'orders': orders}); 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/restaurants/filter/widgets/filter_section.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class FilterSection extends StatelessWidget { 5 | const FilterSection({ 6 | required this.title, 7 | required this.children, 8 | super.key, 9 | }); 10 | 11 | final String title; 12 | final List children; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Column( 17 | crossAxisAlignment: CrossAxisAlignment.start, 18 | children: [ 19 | Padding( 20 | padding: const EdgeInsets.symmetric(horizontal: AppSpacing.lg), 21 | child: Text( 22 | title, 23 | style: context.headlineSmall, 24 | ), 25 | ), 26 | ...children, 27 | ], 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2", 3 | "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", 4 | "dictionaries": ["vgv_allowed", "vgv_forbidden"], 5 | "dictionaryDefinitions": [ 6 | { 7 | "name": "vgv_allowed", 8 | "path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/allowed.txt", 9 | "description": "Allowed VGV Spellings" 10 | }, 11 | { 12 | "name": "vgv_forbidden", 13 | "path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/forbidden.txt", 14 | "description": "Forbidden VGV Spellings" 15 | } 16 | ], 17 | "useGitignore": true, 18 | "words": [ 19 | "firebase_authentication_client" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /packages/shared/lib/src/models/menu_tab_category.dart: -------------------------------------------------------------------------------- 1 | import 'package:yandex_food_api/client.dart'; 2 | 3 | class MenuTabCategory { 4 | const MenuTabCategory({ 5 | required this.menuCategory, 6 | required this.selected, 7 | required this.offsetFrom, 8 | required this.offsetTo, 9 | }); 10 | 11 | final Menu menuCategory; 12 | final bool selected; 13 | final double offsetFrom; 14 | final double offsetTo; 15 | 16 | MenuTabCategory copyWith({ 17 | Menu? menuCategory, 18 | bool? selected, 19 | double? offsetFrom, 20 | double? offsetTo, 21 | }) { 22 | return MenuTabCategory( 23 | menuCategory: menuCategory ?? this.menuCategory, 24 | selected: selected ?? this.selected, 25 | offsetFrom: offsetFrom ?? this.offsetFrom, 26 | offsetTo: offsetTo ?? this.offsetTo, 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "yandex_food_delivery_clone", 9 | "request": "launch", 10 | "type": "dart" 11 | }, 12 | { 13 | "name": "yandex_food_delivery_clone (profile mode)", 14 | "request": "launch", 15 | "type": "dart", 16 | "flutterMode": "profile" 17 | }, 18 | { 19 | "name": "yandex_food_delivery_clone (release mode)", 20 | "request": "launch", 21 | "type": "dart", 22 | "flutterMode": "release" 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | # github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: EmilZulufov 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: emilzulufov 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 12 | # polar: # Replace with a single Polar username 13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 14 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 15 | -------------------------------------------------------------------------------- /packages/form_fields/lib/src/formz_validation_mixin.dart: -------------------------------------------------------------------------------- 1 | import 'package:formz/formz.dart'; 2 | 3 | /// Mixin on [FormzInput] that provides common functionality for form input 4 | /// fields. 5 | /// 6 | /// It has: 7 | /// - [validationError] getter that returns a validation error if input is 8 | /// invalid 9 | /// - [errorMessage] getter that returns an error message based on [E] 10 | /// - [validationErrorMessage] map that contains error messages for each [E] 11 | mixin FormzValidationMixin on FormzInput { 12 | /// Returns the validation error if the input is invalid. 13 | E? get validationError => invalid ? error : null; 14 | 15 | /// Returns email error text based on [E]. 16 | String? get errorMessage => validationErrorMessage[validationError]; 17 | 18 | /// Email validation errors message 19 | Map get validationErrorMessage; 20 | } 21 | -------------------------------------------------------------------------------- /packages/shared/lib/src/models/address.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: lines_longer_than_80_chars 2 | 3 | class Address { 4 | const Address({ 5 | this.street, 6 | this.locality, 7 | this.country, 8 | }); 9 | 10 | final String? street; 11 | final String? locality; 12 | final String? country; 13 | 14 | Address copyWith({String? street, String? locality, String? country}) => 15 | Address( 16 | street: street ?? this.street, 17 | locality: locality ?? this.locality, 18 | country: country ?? this.country, 19 | ); 20 | 21 | @override 22 | String toString() { 23 | if (street == null && locality == null && country == null) return ''; 24 | return '${street == null ? '' : '$street${locality == null && country == null ? '' : ','}'} ' 25 | '${locality == null ? '' : '$locality,'} ${country ?? ''}'; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /api/routes/api/v1/tags/index.dart: -------------------------------------------------------------------------------- 1 | import 'package:dart_frog/dart_frog.dart'; 2 | import 'package:stormberry/stormberry.dart'; 3 | import 'package:yandex_food_api/api.dart'; 4 | 5 | Future onRequest(RequestContext context) async { 6 | if (context.request.method != HttpMethod.get) { 7 | return Response().methodNotAllowed(); 8 | } 9 | 10 | final lat = context.query('lat').doubleTryParse(); 11 | final lng = context.query('lng').doubleTryParse(); 12 | 13 | if (lat == null || lng == null) return Response().badRequest(); 14 | 15 | final db = await context.futureRead(); 16 | 17 | final tagsView = await db.dbrestaurants.query( 18 | const GetRestaurantsTagsByLocation(), 19 | QueryParams(values: {'lat': lat, 'lng': lng}), 20 | ); 21 | 22 | final tags = tagsView.map(Tag.fromName).toList(); 23 | return Response.json(body: {'tags': tags}); 24 | } 25 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | url_launcher_linux 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /packages/authentication_client/firebase_authentication_client/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | ## Status 10 | 11 | **READY/IN DEVELOPMENT/HOLD** 12 | 13 | ## Description 14 | 15 | 16 | 17 | ## Type of Change 18 | 19 | 20 | 21 | - [ ] ✨ New feature (non-breaking change which adds functionality) 22 | - [ ] 🛠️ Bug fix (non-breaking change which fixes an issue) 23 | - [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change) 24 | - [ ] 🧹 Code refactor 25 | - [ ] ✅ Build configuration change 26 | - [ ] 📝 Documentation 27 | - [ ] 🗑️ Chore 28 | -------------------------------------------------------------------------------- /api/lib/src/data/database/queries/notifications_queries.dart: -------------------------------------------------------------------------------- 1 | import 'package:stormberry/stormberry.dart'; 2 | import 'package:yandex_food_api/api.dart'; 3 | 4 | class FindUserNotifications 5 | extends Query, QueryParams> { 6 | const FindUserNotifications(); 7 | 8 | @override 9 | Future> apply( 10 | Session db, 11 | QueryParams params, 12 | ) async { 13 | final queryable = DbnotificationViewQueryable(); 14 | final tableName = queryable.tableAlias; 15 | final query = ''' 16 | SELECT * FROM "$tableName" 17 | WHERE user_uid = @user_id 18 | '''; 19 | 20 | final postgreSQLResult = 21 | await db.execute(Sql.named(query), parameters: params.values); 22 | 23 | return postgreSQLResult 24 | .map((row) => queryable.decode(TypedMap(row.toColumnMap()))) 25 | .toList(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "7.1.2" apply false 22 | id "org.jetbrains.kotlin.android" version "1.9.0" apply false 23 | id "com.google.gms.google-services" version "4.3.14" apply false 24 | } 25 | 26 | include ":app" -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/authentication_client/token_storage/lib/src/token_storage.dart: -------------------------------------------------------------------------------- 1 | /// {@template token_storage} 2 | /// Token storage for the authentication client. 3 | /// {@endtemplate} 4 | abstract class TokenStorage { 5 | /// Returns the current token. 6 | Future readToken(); 7 | 8 | /// Saves the current token. 9 | Future saveToken(String token); 10 | 11 | /// Clears the current token. 12 | Future clearToken(); 13 | } 14 | 15 | /// {@template in_memory_token_storage} 16 | /// In-memory token storage for the authentication client. 17 | /// {@endtemplate} 18 | class InMemoryTokenStorage implements TokenStorage { 19 | String? _token; 20 | 21 | @override 22 | Future readToken() async => _token; 23 | 24 | @override 25 | Future saveToken(String token) async => _token = token; 26 | 27 | @override 28 | Future clearToken() async => _token = null; 29 | } 30 | -------------------------------------------------------------------------------- /lib/src/restaurants/bloc/restaurants_bloc_mixin.dart: -------------------------------------------------------------------------------- 1 | part of 'restaurants_bloc.dart'; 2 | 3 | // A signature representing the result of a paginated feed. 4 | typedef PaginatedRestaurantsResult 5 | = Future<({int newPage, bool hasMore, List restaurants})>; 6 | 7 | mixin RestaurantsBlocMixin on Bloc { 8 | int get pageLimit => 4; 9 | 10 | RestaurantsRepository get restaurantsRepository; 11 | 12 | PaginatedRestaurantsResult fetchRestaurantsPage({ 13 | int page = 0, 14 | }) async { 15 | final currentPage = page; 16 | final restaurants = await restaurantsRepository.getRestaurants( 17 | location: state.location, 18 | offset: currentPage * pageLimit, 19 | limit: pageLimit, 20 | ); 21 | final newPage = currentPage + 1; 22 | final hasMore = restaurants.length >= pageLimit; 23 | 24 | return (newPage: newPage, hasMore: hasMore, restaurants: restaurants); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /api/lib/src/common/utils/extensions/string_extension.dart: -------------------------------------------------------------------------------- 1 | extension StringExtension on String { 2 | String capitalized() => '${this[0].toUpperCase()}${substring(1)}'; 3 | 4 | String replaceAllSpacesToLowerCase() => 5 | trim().toLowerCase().replaceAll(' ', ''); 6 | 7 | bool trimmedContains(String other) => trim() 8 | .replaceAllSpacesToLowerCase() 9 | .contains(other.replaceAllSpacesToLowerCase()); 10 | 11 | int intParse() => int.parse(this); 12 | int? intTryParse() => int.tryParse(this); 13 | 14 | double doubleParse() => double.parse(this); 15 | double? doubleTryParse() => double.tryParse(this); 16 | } 17 | 18 | extension StringNullableExtension on String? { 19 | int intParse() => this == null ? 0 : int.parse(this!); 20 | int? intTryParse() => this == null ? null : int.tryParse(this!); 21 | 22 | double doubleParse() => this == null ? 0 : double.parse(this!); 23 | double? doubleTryParse() => this == null ? null : double.tryParse(this!); 24 | } 25 | -------------------------------------------------------------------------------- /api/lib/src/data/models/location.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | 4 | part 'location.g.dart'; 5 | 6 | @JsonSerializable() 7 | 8 | /// Location class 9 | class Location extends Equatable { 10 | /// {@macro location} 11 | const Location({ 12 | required this.lat, 13 | required this.lng, 14 | }); 15 | 16 | const Location.undefined() : this(lat: 0, lng: 0); 17 | 18 | factory Location.fromJson(Map json) => 19 | _$LocationFromJson(json); 20 | 21 | Location copyWith({double? lat, double? lng}) => 22 | Location(lat: lat ?? this.lat, lng: lng ?? this.lng); 23 | 24 | /// Associated lat 25 | final double lat; 26 | 27 | /// Associated lng 28 | final double lng; 29 | 30 | bool get isUndefined => lat == 0 && lng == 0; 31 | 32 | Map toJson() => _$LocationToJson(this); 33 | 34 | @override 35 | List get props => [lat, lng]; 36 | } 37 | -------------------------------------------------------------------------------- /api/lib/src/common/config/missing_fields.dart: -------------------------------------------------------------------------------- 1 | /// Missing fields class that detects parameters that are nullable and return 2 | /// associated message for their missing 3 | class MissingFields { 4 | /// {@macro missing_fields} 5 | const MissingFields(this._fields); 6 | 7 | final Map _fields; 8 | 9 | /// Method for detecting missing fields 10 | /// 11 | /// Loop over each field. If the value is null add this field 12 | /// to the missing fields variable 13 | String get missing { 14 | final missingFields = []; 15 | for (final fieldName in _fields.keys) { 16 | final fieldValue = _fields[fieldName]; 17 | if (fieldValue == null) { 18 | missingFields.add(fieldName); 19 | } 20 | } 21 | return 'Missing ${missingFields.map(_capitalize).join(', ')}'; 22 | } 23 | 24 | String _capitalize(String text) { 25 | if (text.isEmpty) return text; 26 | return text[0].toUpperCase() + text.substring(1); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | firebase_auth 7 | firebase_core 8 | geolocator_windows 9 | permission_handler_windows 10 | url_launcher_windows 11 | ) 12 | 13 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 14 | ) 15 | 16 | set(PLUGIN_BUNDLED_LIBRARIES) 17 | 18 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 19 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 20 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 21 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 23 | endforeach(plugin) 24 | 25 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 26 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 27 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 28 | endforeach(ffi_plugin) 29 | -------------------------------------------------------------------------------- /packages/app_ui/lib/src/spacing/app_spacing.dart: -------------------------------------------------------------------------------- 1 | /// Default Spacing in App UI. 2 | abstract class AppSpacing { 3 | /// The default unit of spacing 4 | static const double spaceUnit = 16; 5 | 6 | /// xxxs spacing value (1pt) 7 | static const double xxxs = 0.0625 * spaceUnit; 8 | 9 | /// xxs spacing value (2pt) 10 | static const double xxs = 0.125 * spaceUnit; 11 | 12 | /// xs spacing value (4pt) 13 | static const double xs = 0.25 * spaceUnit; 14 | 15 | /// sm spacing value (8pt) 16 | static const double sm = 0.5 * spaceUnit; 17 | 18 | /// md spacing value (12pt) 19 | static const double md = 0.75 * spaceUnit; 20 | 21 | /// lg spacing value (16pt) 22 | static const double lg = spaceUnit; 23 | 24 | /// xlg spacing value (24pt) 25 | static const double xlg = 1.5 * spaceUnit; 26 | 27 | /// xxlg spacing value (40pt) 28 | static const double xxlg = 2.5 * spaceUnit; 29 | 30 | /// xxxlg pacing value (64pt) 31 | static const double xxxlg = 4 * spaceUnit; 32 | } 33 | -------------------------------------------------------------------------------- /packages/shared/lib/src/config/utilities/extensions/num_duration_extension.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs 2 | 3 | /// {@template num_duration_extension} 4 | /// Adds extensions to num (ie. int & double) to make creating durations simple: 5 | /// 6 | /// ``` 7 | /// 200.ms // equivalent to Duration(milliseconds: 200) 8 | /// 3.seconds // equivalent to Duration(milliseconds: 3000) 9 | /// 1.5.days // equivalent to Duration(hours: 36) 10 | /// ``` 11 | /// {@endtemplate} 12 | extension NumDurationExtension on num { 13 | Duration get microseconds => Duration(microseconds: round()); 14 | Duration get ms => (this * 1000).microseconds; 15 | Duration get milliseconds => (this * 1000).microseconds; 16 | Duration get seconds => (this * 1000 * 1000).microseconds; 17 | Duration get minutes => (this * 1000 * 1000 * 60).microseconds; 18 | Duration get hours => (this * 1000 * 1000 * 60 * 60).microseconds; 19 | Duration get days => (this * 1000 * 1000 * 60 * 60 * 24).microseconds; 20 | } 21 | -------------------------------------------------------------------------------- /lib/src/menu/bloc/menu_state.dart: -------------------------------------------------------------------------------- 1 | part of 'menu_bloc.dart'; 2 | 3 | enum MenuStatus { initial, loading, populated, failure } 4 | 5 | class MenuState extends Equatable { 6 | const MenuState({ 7 | required this.status, 8 | required this.menus, 9 | required this.restaurant, 10 | }); 11 | 12 | const MenuState.initial({required Restaurant restaurant}) 13 | : this( 14 | status: MenuStatus.initial, 15 | menus: const [], 16 | restaurant: restaurant, 17 | ); 18 | 19 | final MenuStatus status; 20 | final List menus; 21 | final Restaurant restaurant; 22 | 23 | @override 24 | List get props => [status, menus, restaurant]; 25 | 26 | MenuState copyWith({ 27 | MenuStatus? status, 28 | List? menus, 29 | Restaurant? restaurant, 30 | }) { 31 | return MenuState( 32 | status: status ?? this.status, 33 | menus: menus ?? this.menus, 34 | restaurant: restaurant ?? this.restaurant, 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/src/restaurants/widgets/restaurants_no_internet_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class RestaurantsNoInternetView extends StatelessWidget { 5 | const RestaurantsNoInternetView({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return SliverPadding( 10 | padding: const EdgeInsets.symmetric( 11 | horizontal: AppSpacing.md, 12 | vertical: AppSpacing.md, 13 | ), 14 | sliver: SliverList.builder( 15 | itemCount: 5, 16 | itemBuilder: (context, index) { 17 | return Padding( 18 | padding: const EdgeInsets.only(bottom: AppSpacing.xlg), 19 | child: ShimmerPlaceholder( 20 | height: 160, 21 | borderRadius: 22 | BorderRadius.circular(AppSpacing.md + AppSpacing.sm), 23 | width: double.infinity, 24 | ), 25 | ); 26 | }, 27 | ), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/authentication_client/authentication_client/test/src/authentication_client_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:authentication_client/authentication_client.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | // AuthenticationClient is exported and can be implemented 5 | class FakeAuthenticationClient extends Fake implements AuthenticationClient {} 6 | 7 | void main() { 8 | test('AuthenticationClient can be implemented', () { 9 | expect(FakeAuthenticationClient.new, returnsNormally); 10 | }); 11 | 12 | test('exports LogInWithGoogleFailure', () { 13 | expect( 14 | () => const LogInWithGoogleFailure('oops'), 15 | returnsNormally, 16 | ); 17 | }); 18 | 19 | test('exports LogInWithGoogleCanceled', () { 20 | expect( 21 | () => const LogInWithGoogleCanceled('oops'), 22 | returnsNormally, 23 | ); 24 | }); 25 | 26 | test('exports LogOutFailure', () { 27 | expect( 28 | () => const LogOutFailure('oops'), 29 | returnsNormally, 30 | ); 31 | }); 32 | } 33 | -------------------------------------------------------------------------------- /api/lib/src/data/models/location.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | // ignore_for_file: cast_nullable_to_non_nullable, implicit_dynamic_parameter, lines_longer_than_80_chars, prefer_const_constructors, require_trailing_commas 4 | 5 | part of 'location.dart'; 6 | 7 | // ************************************************************************** 8 | // JsonSerializableGenerator 9 | // ************************************************************************** 10 | 11 | Location _$LocationFromJson(Map json) => $checkedCreate( 12 | 'Location', 13 | json, 14 | ($checkedConvert) { 15 | final val = Location( 16 | lat: $checkedConvert('lat', (v) => (v as num).toDouble()), 17 | lng: $checkedConvert('lng', (v) => (v as num).toDouble()), 18 | ); 19 | return val; 20 | }, 21 | ); 22 | 23 | Map _$LocationToJson(Location instance) => { 24 | 'lat': instance.lat, 25 | 'lng': instance.lng, 26 | }; 27 | -------------------------------------------------------------------------------- /lib/src/restaurants/filter/widgets/reset_filters_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_bloc/flutter_bloc.dart'; 4 | import 'package:yandex_food_delivery_clone/src/restaurants/restaurants.dart'; 5 | 6 | class ResetFiltersButton extends StatelessWidget { 7 | const ResetFiltersButton({super.key}); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Tappable.faded( 12 | borderRadius: AppSpacing.xlg - AppSpacing.xs, 13 | backgroundColor: AppColors.brightGrey, 14 | onTap: () { 15 | context 16 | .read() 17 | .add(const RestaurantsFilterTagsClearRequested()); 18 | }, 19 | child: Padding( 20 | padding: const EdgeInsets.symmetric( 21 | horizontal: AppSpacing.xlg, 22 | vertical: AppSpacing.xxs, 23 | ), 24 | child: Text( 25 | 'Reset', 26 | style: context.bodyLarge, 27 | ), 28 | ), 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/src/menu/widgets/menu_section_header.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class MenuSectionHeader extends StatelessWidget { 5 | const MenuSectionHeader({ 6 | required this.categoryName, 7 | required this.categoryHeight, 8 | super.key, 9 | }); 10 | 11 | final String categoryName; 12 | final double categoryHeight; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return SliverPadding( 17 | padding: const EdgeInsets.only( 18 | left: AppSpacing.md, 19 | top: AppSpacing.md, 20 | ), 21 | sliver: SliverToBoxAdapter( 22 | child: SizedBox( 23 | height: categoryHeight, 24 | child: Align( 25 | alignment: Alignment.centerLeft, 26 | child: Text( 27 | categoryName, 28 | style: context.headlineMedium 29 | ?.copyWith(fontWeight: AppFontWeight.bold), 30 | ), 31 | ), 32 | ), 33 | ), 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /api/lib/src/data/models/menu.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | import 'package:yandex_food_api/api.dart'; 4 | 5 | part 'menu.g.dart'; 6 | 7 | @JsonSerializable() 8 | class Menu extends Equatable { 9 | const Menu({ 10 | required this.category, 11 | required this.items, 12 | }); 13 | 14 | factory Menu.fromView(DbmenuView view) => Menu( 15 | category: view.category, 16 | items: view.items.map(MenuItem.fromView).toList(), 17 | ); 18 | 19 | factory Menu.fromJson(Map map) => _$MenuFromJson(map); 20 | 21 | final String category; 22 | final List items; 23 | 24 | Menu copyWith({ 25 | String? category, 26 | List? items, 27 | }) { 28 | return Menu( 29 | category: category ?? this.category, 30 | items: items ?? this.items, 31 | ); 32 | } 33 | 34 | @override 35 | List get props => [category, items]; 36 | 37 | Map toJson() => _$MenuToJson(this); 38 | } 39 | -------------------------------------------------------------------------------- /packages/app_ui/lib/src/typography/app_font_weight.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | 3 | /// Namespace for Default App Font Weights 4 | abstract class AppFontWeight { 5 | /// FontWeight value of `w900` 6 | static const FontWeight black = FontWeight.w900; 7 | 8 | /// FontWeight value of `w800` 9 | static const FontWeight extraBold = FontWeight.w800; 10 | 11 | /// FontWeight value of `w700` 12 | static const FontWeight bold = FontWeight.w700; 13 | 14 | /// FontWeight value of `w600` 15 | static const FontWeight semiBold = FontWeight.w600; 16 | 17 | /// FontWeight value of `w500` 18 | static const FontWeight medium = FontWeight.w500; 19 | 20 | /// FontWeight value of `w400` 21 | static const FontWeight regular = FontWeight.w400; 22 | 23 | /// FontWeight value of `w300` 24 | static const FontWeight light = FontWeight.w300; 25 | 26 | /// FontWeight value of `w200` 27 | static const FontWeight extraLight = FontWeight.w200; 28 | 29 | /// FontWeight value of `w100` 30 | static const FontWeight thin = FontWeight.w100; 31 | } 32 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "engines": { 3 | "node": ">=20.6.0" 4 | }, 5 | "devDependencies": { 6 | "@types/cors": "^2.8.17", 7 | "@types/express": "^4.17.21", 8 | "@types/node": "^22.1.0", 9 | "nodemon": "^3.1.4", 10 | "ts-node": "^10.9.2", 11 | "typescript": "^5.5.4" 12 | }, 13 | "name": "server", 14 | "version": "1.0.0", 15 | "main": "src/index.js", 16 | "dependencies": { 17 | "acorn": "^8.12.1", 18 | "acorn-walk": "^8.3.3", 19 | "arg": "^4.1.3", 20 | "cors": "^2.8.5", 21 | "create-require": "^1.1.1", 22 | "diff": "^4.0.2", 23 | "dotenv": "^16.4.5", 24 | "express": "^4.19.2", 25 | "make-error": "^1.3.6", 26 | "stripe": "^16.6.0", 27 | "undici-types": "^6.13.0", 28 | "v8-compile-cache-lib": "^3.0.1", 29 | "yn": "^3.1.1" 30 | }, 31 | "scripts": { 32 | "build": "npx tsc", 33 | "start": "node build/index.js", 34 | "dev": "nodemon src/index.ts" 35 | }, 36 | "keywords": [], 37 | "author": "Gambley1", 38 | "license": "ISC", 39 | "description": "Stripe payment paywall" 40 | } 41 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: "5dcb86f68f239346676ceb1ed1ea385bd215fba1" 8 | channel: "stable" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 17 | base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 18 | - platform: windows 19 | create_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 20 | base_revision: 5dcb86f68f239346676ceb1ed1ea385bd215fba1 21 | 22 | # User provided section 23 | 24 | # List of Local paths (relative to this file) that should be 25 | # ignored by the migrate tool. 26 | # 27 | # Files that are not part of the templates will be ignored by default. 28 | unmanaged_files: 29 | - 'lib/main.dart' 30 | - 'ios/Runner.xcodeproj/project.pbxproj' 31 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /lib/src/orders/bloc/orders_event.dart: -------------------------------------------------------------------------------- 1 | part of 'orders_bloc.dart'; 2 | 3 | sealed class OrdersEvent { 4 | const OrdersEvent(); 5 | } 6 | 7 | final class OrdersFetchRequested extends OrdersEvent { 8 | const OrdersFetchRequested(); 9 | } 10 | 11 | final class OrdersAddOrderRequested extends OrdersEvent { 12 | const OrdersAddOrderRequested({ 13 | required this.date, 14 | required this.restaurantPlaceId, 15 | required this.restaurantName, 16 | required this.orderAddress, 17 | required this.totalOrderSum, 18 | required this.orderDeliveryFee, 19 | }); 20 | 21 | final String date; 22 | final String restaurantPlaceId; 23 | final String restaurantName; 24 | final String orderAddress; 25 | final String totalOrderSum; 26 | final String orderDeliveryFee; 27 | } 28 | 29 | final class OrdersDeleteOrderRequested extends OrdersEvent { 30 | const OrdersDeleteOrderRequested({ 31 | required this.orderId, 32 | }); 33 | 34 | final String orderId; 35 | } 36 | 37 | final class OrdersRefreshRequested extends OrdersEvent { 38 | const OrdersRefreshRequested(); 39 | } 40 | -------------------------------------------------------------------------------- /api/Dockerfile: -------------------------------------------------------------------------------- 1 | # An example of using a custom Dockerfile with Dart Frog 2 | # Official Dart image: https://hub.docker.com/_/dart 3 | # Specify the Dart SDK base image version using dart: (ex: dart:2.17) 4 | FROM dart:stable AS build 5 | 6 | WORKDIR /app 7 | 8 | # Resolve app dependencies. 9 | COPY pubspec.* ./ 10 | RUN dart pub get 11 | 12 | # Copy app source code and AOT compile it. 13 | COPY . . 14 | 15 | # Generate a production build. 16 | RUN dart pub global activate dart_frog_cli 17 | RUN dart pub global run dart_frog_cli:dart_frog build 18 | 19 | # Ensure packages are still up-to-date if anything has changed. 20 | RUN dart pub get --offline 21 | RUN dart compile exe build/bin/server.dart -o build/bin/server 22 | 23 | # Build minimal serving image from AOT-compiled `/server` and required system 24 | # libraries and configuration files stored in `/runtime/` from the build stage. 25 | FROM scratch 26 | COPY --from=build /runtime/ / 27 | COPY --from=build /app/build/bin/server /app/bin/ 28 | # COPY --from=build /app/build/public /public/ 29 | 30 | # Start the server. 31 | CMD ["/app/bin/server"] -------------------------------------------------------------------------------- /api/lib/src/common/config/env.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:dotenv/dotenv.dart'; 4 | 5 | /// {@template dotenv_cofig} 6 | /// Dot env internal config. 7 | /// {@endtemplate} 8 | class Env { 9 | /// {@macro env_internal} 10 | Env() { 11 | _initEnv(); 12 | } 13 | 14 | final DotEnv _env = DotEnv(includePlatformEnvironment: true); 15 | 16 | Future _initEnv() async { 17 | _env.load(); 18 | } 19 | 20 | /// Access secret variable by provided key of data. 21 | String env(String key) => _env.getOrElse(key, () => ''); 22 | 23 | /// Value of secret pg host from environment. 24 | String get pgHost => env('PGHOST'); 25 | 26 | /// Value of secret pg database variable from environment. 27 | String get pgDatabase => env('PGDATABASE'); 28 | 29 | /// Value of secret pg password variable from environment. 30 | String get pgPassword => env('PGPASSWORD'); 31 | 32 | /// Value of secret pg user variable from environment. 33 | String get pgUser => env('PGUSER'); 34 | 35 | /// Value of pg port variable from environment. 36 | String get pgPort => env('PGPORT'); 37 | } 38 | -------------------------------------------------------------------------------- /lib/src/restaurants/widgets/restaurants_timeout_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class RestaurantsTimeoutView extends StatelessWidget { 5 | const RestaurantsTimeoutView({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return SliverPadding( 10 | padding: const EdgeInsets.only(top: 24), 11 | sliver: SliverFillRemaining( 12 | child: Column( 13 | mainAxisAlignment: MainAxisAlignment.center, 14 | children: [ 15 | Text( 16 | 'The client ran out of time :(', 17 | textAlign: TextAlign.center, 18 | style: context.titleLarge 19 | ?.copyWith(fontWeight: AppFontWeight.semiBold), 20 | ), 21 | Text( 22 | 'Please try again later and check your internet connection!', 23 | textAlign: TextAlign.center, 24 | style: context.bodyMedium?.apply(color: AppColors.grey), 25 | ), 26 | ], 27 | ), 28 | ), 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /api/lib/src/middleware/database_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:dart_frog/dart_frog.dart'; 2 | import 'package:stormberry/stormberry.dart'; 3 | import 'package:yandex_food_api/src/common/common.dart'; 4 | 5 | Future? _connection; 6 | 7 | /// Provides context with postgreSQL db [Connection] instance. 8 | /// 9 | /// ### Usage 10 | /// final db = context.futureRead(); 11 | Middleware databaseProvider() { 12 | final env = Env(); 13 | final endpoint = Endpoint( 14 | host: env.pgHost, 15 | port: env.pgPort.intParse(), 16 | database: env.pgDatabase, 17 | username: env.pgUser, 18 | password: env.pgPassword, 19 | ); 20 | _connection ??= Connection.open(endpoint); 21 | return (handler) { 22 | return handler.use( 23 | provider>((_) async { 24 | final conn = await _connection; 25 | if (!(conn?.isOpen ?? false) || conn == null) { 26 | await conn?.close(); 27 | _connection = null; 28 | return _connection = Connection.open(endpoint); 29 | } 30 | return conn; 31 | }), 32 | ); 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /packages/user_repository/lib/src/models/user.dart: -------------------------------------------------------------------------------- 1 | import 'package:authentication_client/authentication_client.dart'; 2 | 3 | /// {@template user} 4 | /// User model represents the current user with subscription plan. 5 | /// {@endtemplate} 6 | class User extends AuthenticationUser { 7 | /// {@macro user} 8 | const User({ 9 | required super.id, 10 | super.email, 11 | super.name, 12 | super.photo, 13 | super.isNewUser, 14 | }); 15 | 16 | /// Converts [AuthenticationUser] to [User]. 17 | factory User.fromAuthenticationUser({ 18 | required AuthenticationUser authenticationUser, 19 | }) => 20 | User( 21 | email: authenticationUser.email, 22 | id: authenticationUser.id, 23 | name: authenticationUser.name, 24 | photo: authenticationUser.photo, 25 | isNewUser: authenticationUser.isNewUser, 26 | ); 27 | 28 | /// Whether the current user is anonymous. 29 | @override 30 | bool get isAnonymous => this == anonymous; 31 | 32 | /// Anonymous user which represents an unauthenticated user. 33 | static const User anonymous = User(id: ''); 34 | } 35 | -------------------------------------------------------------------------------- /lib/src/restaurants/widgets/restaurants_loader_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:shared/shared.dart'; 4 | 5 | /// Renders a widget containing a progress indicator that calls 6 | /// [onPresented] when the item becomes visible. 7 | class RestaurantsLoaderItem extends StatefulWidget { 8 | const RestaurantsLoaderItem({super.key, this.onPresented}); 9 | 10 | /// A callback performed when the widget is presented. 11 | final VoidCallback? onPresented; 12 | 13 | @override 14 | State createState() => _FeedLoaderItemState(); 15 | } 16 | 17 | class _FeedLoaderItemState extends State { 18 | @override 19 | void initState() { 20 | super.initState(); 21 | Future.delayed(350.ms, () => widget.onPresented?.call()); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return const Padding( 27 | padding: EdgeInsets.symmetric(vertical: AppSpacing.md), 28 | child: Center( 29 | child: AppCircularProgressIndicator(), 30 | ), 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /api/lib/src/data/models/connection_channel.dart: -------------------------------------------------------------------------------- 1 | /// {@template connection_channel} 2 | /// Connection channel enum class to easily identify channel 3 | /// {@endtemplate} 4 | enum ConnectionChannel { 5 | /// User order status changed channel name of notified by pg_notify channel 6 | userOrderStatusChanged('user_order_status_changed'), 7 | 8 | /// User notification table changed channel name of notified 9 | /// by pg_notify channel 10 | userNotificationTableChanged('user_notification_table_changed'), 11 | 12 | /// Notification table changed channel name of notified by pg_notify channel 13 | notificationTableChanged('notification_table_changed'); 14 | 15 | const ConnectionChannel(this.value); 16 | 17 | /// Value of channel 18 | final String value; 19 | } 20 | 21 | /// To Connection Channel extension 22 | extension ToConnectionChannelExtension on String { 23 | /// To connection channel 24 | ConnectionChannel? get toConnectionChannel { 25 | for (final channel in ConnectionChannel.values) { 26 | if (channel.value == this) { 27 | return channel; 28 | } 29 | } 30 | return null; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/src/map/bloc/auto_complete_state.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs, sort_constructors_first 2 | 3 | part of 'auto_complete_bloc.dart'; 4 | 5 | enum AutoCompleteStatus { 6 | initial, 7 | loading, 8 | populated, 9 | failure; 10 | 11 | bool get isLoading => this == AutoCompleteStatus.loading; 12 | bool get isPopulated => this == AutoCompleteStatus.populated; 13 | } 14 | 15 | class AutoCompleteState extends Equatable { 16 | const AutoCompleteState._({ 17 | required this.status, 18 | required this.autoCompletes, 19 | }); 20 | 21 | const AutoCompleteState.initial() 22 | : this._(status: AutoCompleteStatus.initial, autoCompletes: const []); 23 | 24 | final AutoCompleteStatus status; 25 | final List autoCompletes; 26 | 27 | @override 28 | List get props => [status, autoCompletes]; 29 | 30 | AutoCompleteState copyWith({ 31 | AutoCompleteStatus? status, 32 | List? autoCompletes, 33 | }) { 34 | return AutoCompleteState._( 35 | status: status ?? this.status, 36 | autoCompletes: autoCompletes ?? this.autoCompletes, 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /lib/src/restaurants/widgets/restaurants_empty_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_ui/app_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class RestaurantsEmptyView extends StatelessWidget { 5 | const RestaurantsEmptyView({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return SliverPadding( 10 | padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md), 11 | sliver: SliverFillRemaining( 12 | child: Column( 13 | mainAxisAlignment: MainAxisAlignment.center, 14 | children: [ 15 | Text( 16 | 'We are not here yet :(', 17 | textAlign: TextAlign.center, 18 | style: context.titleLarge 19 | ?.copyWith(fontWeight: AppFontWeight.semiBold), 20 | ), 21 | Text( 22 | 'But we connect dozens of new places every week. ' 23 | "Maybe we'll be here!", 24 | textAlign: TextAlign.center, 25 | style: context.bodyMedium?.apply(color: AppColors.grey), 26 | ), 27 | ], 28 | ), 29 | ), 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /packages/shared/lib/src/config/debouncer.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/widgets.dart' show VoidCallback; 4 | import 'package:shared/shared.dart'; 5 | 6 | /// Default debounce time (in milliseconds). 7 | const kDefaultDebounceTime = 150; 8 | 9 | /// {@template debouncer} 10 | /// A simple class to debounce functions execution. 11 | /// {@endtemplate} 12 | class Debouncer { 13 | /// {@macro debouncer} 14 | Debouncer({this.milliseconds = kDefaultDebounceTime}); 15 | 16 | /// The delay in milliseconds. 17 | final int milliseconds; 18 | 19 | Timer? _timer; 20 | 21 | /// Runs the [action] after [milliseconds] delay. 22 | void run(VoidCallback action) { 23 | _timer?.cancel(); 24 | _timer = Timer(milliseconds.ms, action); 25 | } 26 | 27 | /// Disposes the timer. 28 | void dispose() { 29 | _timer?.cancel(); 30 | } 31 | } 32 | 33 | /// Applies debouncer on the function. 34 | extension DebounceFunction on void Function() { 35 | /// Function debounce with certain delay. 36 | void debounce({int milliseconds = kDefaultDebounceTime}) => 37 | Debouncer(milliseconds: milliseconds).run(call); 38 | } 39 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | void RegisterPlugins(flutter::PluginRegistry* registry) { 16 | FirebaseAuthPluginCApiRegisterWithRegistrar( 17 | registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi")); 18 | FirebaseCorePluginCApiRegisterWithRegistrar( 19 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); 20 | GeolocatorWindowsRegisterWithRegistrar( 21 | registry->GetRegistrarForPlugin("GeolocatorWindows")); 22 | PermissionHandlerWindowsPluginRegisterWithRegistrar( 23 | registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); 24 | UrlLauncherWindowsRegisterWithRegistrar( 25 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 26 | } 27 | -------------------------------------------------------------------------------- /api/routes/api/v1/search/relevant.dart: -------------------------------------------------------------------------------- 1 | import 'package:dart_frog/dart_frog.dart'; 2 | import 'package:stormberry/stormberry.dart'; 3 | import 'package:yandex_food_api/api.dart'; 4 | 5 | Future onRequest(RequestContext context) async { 6 | if (context.request.method != HttpMethod.get) { 7 | return Response().methodNotAllowed(); 8 | } 9 | 10 | final lat = context.query('lat').doubleTryParse(); 11 | final lng = context.query('lng').doubleTryParse(); 12 | final term = context.query('q'); 13 | if (lat == null || lng == null || term == null) { 14 | return Response().badRequest(); 15 | } 16 | 17 | final db = await context.futureRead(); 18 | 19 | final restaurantsView = await db.dbrestaurants.query( 20 | const SearchRelevantRestaurants(), 21 | QueryParams( 22 | values: {'term': '%$term%', 'lat': lat, 'lng': lng}, 23 | ), 24 | ); 25 | 26 | final userLocation = Location(lat: lat, lng: lng); 27 | final restaurants = restaurantsView 28 | .map((e) => Restaurant.fromView(e, userLocation: userLocation)) 29 | .toList(); 30 | 31 | return Response.json(body: {'restaurants': restaurants}); 32 | } 33 | -------------------------------------------------------------------------------- /api/routes/api/v1/search/by-tags.dart: -------------------------------------------------------------------------------- 1 | import 'package:dart_frog/dart_frog.dart'; 2 | import 'package:stormberry/stormberry.dart'; 3 | import 'package:yandex_food_api/api.dart'; 4 | 5 | Future onRequest(RequestContext context) async { 6 | if (context.request.method != HttpMethod.get) { 7 | return Response().methodNotAllowed(); 8 | } 9 | 10 | final lat = context.query('lat').doubleParse(); 11 | final lng = context.query('lng').doubleParse(); 12 | 13 | final body = await context.safeJson(); 14 | if (body == null) return Response().badRequest(); 15 | final tags = (body['tags'] as List).cast(); 16 | 17 | final db = await context.futureRead(); 18 | 19 | final restaurantsView = await db.dbrestaurants.query( 20 | const GetRestaurantsByTags(), 21 | QueryParams( 22 | values: {'tags': tags, 'lat': lat, 'lng': lng}, 23 | ), 24 | ); 25 | 26 | final userLocation = Location(lat: lat, lng: lng); 27 | final restaurants = restaurantsView 28 | .map((e) => Restaurant.fromView(e, userLocation: userLocation)) 29 | .toList(); 30 | 31 | return Response.json(body: {'restaurants': restaurants}); 32 | } 33 | -------------------------------------------------------------------------------- /lib/src/auth/login/cubit/login_state.dart: -------------------------------------------------------------------------------- 1 | part of 'login_cubit.dart'; 2 | 3 | enum SubmissionStatus { 4 | idle, 5 | inProgress, 6 | success, 7 | timeoutError, 8 | error; 9 | 10 | bool get isLoading => this == SubmissionStatus.inProgress; 11 | bool get isSuccess => this == SubmissionStatus.success; 12 | bool get isTimeoutError => this == SubmissionStatus.timeoutError; 13 | bool get isError => this == SubmissionStatus.error; 14 | } 15 | 16 | class LoginState { 17 | const LoginState._({ 18 | this.email = const Email.pure(), 19 | this.password = const Password.pure(), 20 | this.submissionStatus = SubmissionStatus.idle, 21 | }); 22 | 23 | const LoginState.initial() : this._(); 24 | 25 | final Email email; 26 | final Password password; 27 | final SubmissionStatus submissionStatus; 28 | 29 | LoginState copyWith({ 30 | Email? email, 31 | Password? password, 32 | SubmissionStatus? submissionStatus, 33 | }) { 34 | return LoginState._( 35 | email: email ?? this.email, 36 | password: password ?? this.password, 37 | submissionStatus: submissionStatus ?? this.submissionStatus, 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /packages/env/lib/src/env.dart: -------------------------------------------------------------------------------- 1 | import 'package:envied/envied.dart'; 2 | 3 | part 'env.g.dart'; 4 | 5 | /// {@template env} 6 | /// Environment variables. Used to access environment variables in the app. 7 | /// {@endtemplate} 8 | @Envied(path: '.env', obfuscate: true) 9 | abstract class Env { 10 | /// Yandex eats API url secret. 11 | @EnviedField(varName: 'YANDEX_EATS_API_URL', obfuscate: true) 12 | static String yandexEatsApiUrl = _Env.yandexEatsApiUrl; 13 | 14 | /// Yandex eats payments url secret. 15 | @EnviedField(varName: 'YANDEX_EATS_PAYMENT_URL', obfuscate: true) 16 | static String yandexEatsPaymentsUrl = _Env.yandexEatsPaymentsUrl; 17 | 18 | /// Google maps api key secret. 19 | @EnviedField(varName: 'GOOGLE_MAPS_API_KEY', obfuscate: true) 20 | static String googleMapsApiKey = _Env.googleMapsApiKey; 21 | 22 | /// Stripe publish key secret. 23 | @EnviedField(varName: 'STRIPE_PUBLISH_KEY', obfuscate: true) 24 | static String stripePublishKey = _Env.stripePublishKey; 25 | 26 | /// Stripe secret key secret. 27 | @EnviedField(varName: 'STRIPE_SECRET_KEY', obfuscate: true) 28 | static String stripeSecretKey = _Env.stripeSecretKey; 29 | } 30 | -------------------------------------------------------------------------------- /packages/app_ui/coverage_badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | coverage 16 | coverage 17 | 100% 18 | 100% 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/app_ui/lib/src/widgets/app_circular_progress_indicator.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: public_member_api_docs 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | enum _IndicatorVariant { normal, adaptive } 6 | 7 | class AppCircularProgressIndicator extends StatelessWidget { 8 | const AppCircularProgressIndicator({ 9 | this.color, 10 | super.key, 11 | this.strokeWidth = 3, 12 | }) : _variant = _IndicatorVariant.normal; 13 | 14 | const AppCircularProgressIndicator.adaptive({ 15 | this.color, 16 | super.key, 17 | this.strokeWidth = 3, 18 | }) : _variant = _IndicatorVariant.adaptive; 19 | 20 | final _IndicatorVariant _variant; 21 | final Color? color; 22 | final double strokeWidth; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Center( 27 | child: _variant == _IndicatorVariant.adaptive 28 | ? CircularProgressIndicator.adaptive( 29 | backgroundColor: color, 30 | strokeWidth: strokeWidth, 31 | ) 32 | : CircularProgressIndicator( 33 | color: color, 34 | strokeWidth: strokeWidth, 35 | ), 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /packages/env/coverage_badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | coverage 16 | coverage 17 | 100% 18 | 100% 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/shared/coverage_badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | coverage 16 | coverage 17 | 100% 18 | 100% 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/form_fields/coverage_badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | coverage 16 | coverage 17 | 100% 18 | 100% 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/storage/storage/coverage_badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | coverage 16 | coverage 17 | 100% 18 | 100% 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/user_repository/coverage_badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | coverage 16 | coverage 17 | 100% 18 | 100% 19 | 20 | 21 | -------------------------------------------------------------------------------- /api/lib/src/data/models/menu.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | // ignore_for_file: cast_nullable_to_non_nullable, implicit_dynamic_parameter, lines_longer_than_80_chars, prefer_const_constructors, require_trailing_commas 4 | 5 | part of 'menu.dart'; 6 | 7 | // ************************************************************************** 8 | // JsonSerializableGenerator 9 | // ************************************************************************** 10 | 11 | Menu _$MenuFromJson(Map json) => $checkedCreate( 12 | 'Menu', 13 | json, 14 | ($checkedConvert) { 15 | final val = Menu( 16 | category: $checkedConvert('category', (v) => v as String), 17 | items: $checkedConvert( 18 | 'items', 19 | (v) => (v as List) 20 | .map((e) => MenuItem.fromJson(e as Map)) 21 | .toList()), 22 | ); 23 | return val; 24 | }, 25 | ); 26 | 27 | Map _$MenuToJson(Menu instance) => { 28 | 'category': instance.category, 29 | 'items': instance.items.map((e) => e.toJson()).toList(), 30 | }; 31 | -------------------------------------------------------------------------------- /packages/location_repository/coverage_badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | coverage 16 | coverage 17 | 100% 18 | 100% 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/notifications_client/coverage_badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | coverage 16 | coverage 17 | 100% 18 | 100% 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/orders_repository/coverage_badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | coverage 16 | coverage 17 | 100% 18 | 100% 19 | 20 | 21 | --------------------------------------------------------------------------------