├── frontend ├── .fvm ├── linux │ ├── .gitignore │ ├── main.cc │ ├── flutter │ │ ├── generated_plugin_registrant.cc │ │ ├── generated_plugin_registrant.h │ │ └── generated_plugins.cmake │ └── my_application.h ├── 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 │ │ ├── Base.lproj │ │ │ └── Main.storyboard │ │ └── Info.plist │ ├── 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 │ ├── .gitignore │ └── Podfile ├── lib │ ├── constants │ │ └── constants.dart │ ├── core │ │ ├── di │ │ │ ├── locator.dart │ │ │ └── third_party_modules.dart │ │ ├── app │ │ │ └── routes.dart │ │ └── network │ │ │ ├── exceptions │ │ │ └── dio_network_exception.dart │ │ │ └── interceptors │ │ │ └── network_error_interceptor.dart │ ├── main.dart │ ├── data │ │ ├── data_source │ │ │ ├── todos_http_client │ │ │ │ └── todos_http_client.dart │ │ │ └── todo_remote_data_source │ │ │ │ └── todos_remote_data_source.dart │ │ └── repositories │ │ │ └── todo_repository_impl.dart │ ├── data_services │ │ └── todos_data_service.dart │ └── presentation │ │ └── show_todos │ │ └── widgets │ │ └── todo_list_tile.dart ├── web │ ├── favicon.png │ ├── icons │ │ ├── Icon-192.png │ │ ├── Icon-512.png │ │ ├── Icon-maskable-192.png │ │ └── Icon-maskable-512.png │ └── manifest.json ├── 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 │ │ │ │ └── np │ │ │ │ │ └── com │ │ │ │ │ └── saileshdahal │ │ │ │ │ └── fullstack_todo │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── .gitignore │ ├── settings.gradle │ └── build.gradle ├── macos │ ├── Runner │ │ ├── Configs │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ ├── Warnings.xcconfig │ │ │ └── AppInfo.xcconfig │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ ├── app_icon_128.png │ │ │ │ ├── app_icon_16.png │ │ │ │ ├── app_icon_256.png │ │ │ │ ├── app_icon_32.png │ │ │ │ ├── app_icon_512.png │ │ │ │ ├── app_icon_64.png │ │ │ │ ├── app_icon_1024.png │ │ │ │ └── Contents.json │ │ ├── AppDelegate.swift │ │ ├── Release.entitlements │ │ ├── MainFlutterWindow.swift │ │ ├── DebugProfile.entitlements │ │ └── Info.plist │ ├── .gitignore │ ├── Flutter │ │ ├── Flutter-Debug.xcconfig │ │ ├── Flutter-Release.xcconfig │ │ └── GeneratedPluginRegistrant.swift │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── Runner.xcodeproj │ │ └── project.xcworkspace │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── Podfile.lock │ └── Podfile ├── windows │ ├── runner │ │ ├── resources │ │ │ └── app_icon.ico │ │ ├── resource.h │ │ ├── utils.h │ │ ├── runner.exe.manifest │ │ ├── flutter_window.h │ │ ├── main.cpp │ │ └── CMakeLists.txt │ ├── flutter │ │ ├── generated_plugin_registrant.cc │ │ ├── generated_plugin_registrant.h │ │ └── generated_plugins.cmake │ └── .gitignore ├── analysis_options.yaml ├── README.md ├── .vscode │ └── launch.json ├── .gitignore ├── pubspec.yaml ├── .metadata └── integration_test │ └── integration_test.dart ├── .fvm ├── .fvm ├── flutter_sdk └── fvm_config.json ├── .idea ├── .name └── modules.xml ├── .gitignore ├── models ├── .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 │ └── PULL_REQUEST_TEMPLATE.md ├── coverage │ ├── amber.png │ ├── glass.png │ ├── ruby.png │ ├── snow.png │ ├── emerald.png │ ├── updown.png │ └── lcov.info ├── lib │ ├── models.dart │ └── src │ │ ├── user │ │ ├── login_user_dto │ │ │ ├── login_user_dto.g.dart │ │ │ └── login_user_dto.dart │ │ ├── create_user_dto │ │ │ └── create_user_dto.g.dart │ │ ├── user.g.dart │ │ └── user.dart │ │ ├── todo │ │ ├── create_todo_dto │ │ │ ├── create_todo_dto.g.dart │ │ │ └── create_todo_dto.dart │ │ ├── update_todo_dto │ │ │ └── update_todo_dto.g.dart │ │ ├── todo.g.dart │ │ └── todo.dart │ │ └── serializers │ │ └── date_time_converter.dart ├── .gitignore ├── analysis_options.yaml ├── build.yaml ├── pubspec.yaml ├── test │ └── src │ │ ├── serializers │ │ └── date_time_converter_test.dart │ │ └── todo │ │ └── todo_test.dart ├── melos_models.iml └── coverage_badge.svg ├── data_source ├── .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 │ └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── analysis_options.yaml ├── lib │ ├── data_source.dart │ └── src │ │ ├── user_data_source.dart │ │ └── todo_data_source.dart ├── pubspec.yaml ├── melos_data_source.iml └── coverage_badge.svg ├── exceptions ├── .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 │ └── PULL_REQUEST_TEMPLATE.md ├── analysis_options.yaml ├── coverage │ ├── ruby.png │ ├── snow.png │ ├── amber.png │ ├── glass.png │ ├── updown.png │ ├── emerald.png │ └── lcov.info ├── .gitignore ├── lib │ ├── exceptions.dart │ └── src │ │ ├── server_exception │ │ └── server_exception.dart │ │ ├── http_exception │ │ ├── not_found_exception.dart │ │ ├── bad_request_exception.dart │ │ ├── http_exception.dart │ │ └── unauthorized_exception.dart │ │ └── network_exception │ │ └── network_exception.dart ├── pubspec.yaml ├── test │ └── src │ │ ├── server_exception │ │ └── server_exception_test.dart │ │ └── http_exception │ │ ├── not_found_exception_test.dart │ │ └── bad_request_exception_test.dart ├── melos_exceptions.iml └── coverage_badge.svg ├── failures ├── .github │ ├── ISSUE_TEMPLATE │ │ ├── config.yml │ │ ├── ci.md │ │ ├── build.md │ │ ├── chore.md │ │ ├── documentation.md │ │ ├── style.md │ │ ├── test.md │ │ ├── refactor.md │ │ ├── performance.md │ │ ├── revert.md │ │ ├── feature_request.md │ │ └── bug_report.md │ ├── dependabot.yaml │ ├── workflows │ │ └── main.yaml │ └── PULL_REQUEST_TEMPLATE.md ├── coverage │ ├── amber.png │ ├── glass.png │ ├── ruby.png │ ├── snow.png │ ├── updown.png │ ├── emerald.png │ └── lcov.info ├── .gitignore ├── analysis_options.yaml ├── lib │ ├── src │ │ ├── failure.dart │ │ ├── request_failure │ │ │ └── request_failure.dart │ │ ├── server_failure │ │ │ └── server_failure.dart │ │ ├── validation_failure │ │ │ └── validation_failure.dart │ │ └── network_failure │ │ │ ├── network_failure.dart │ │ │ └── network_failure.g.dart │ └── failures.dart ├── build.yaml ├── pubspec.yaml ├── melos_failures.iml ├── test │ └── src │ │ └── network_failure │ │ └── network_failure_test.dart └── coverage_badge.svg ├── repository ├── .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 │ └── PULL_REQUEST_TEMPLATE.md ├── analysis_options.yaml ├── .gitignore ├── lib │ ├── repository.dart │ └── src │ │ ├── user_repository.dart │ │ └── todo_repository.dart ├── pubspec.yaml ├── melos_repository.iml └── coverage_badge.svg ├── typedefs ├── .github │ ├── ISSUE_TEMPLATE │ │ ├── config.yml │ │ ├── ci.md │ │ ├── build.md │ │ ├── chore.md │ │ ├── documentation.md │ │ ├── style.md │ │ ├── test.md │ │ ├── refactor.md │ │ ├── performance.md │ │ ├── revert.md │ │ ├── feature_request.md │ │ └── bug_report.md │ ├── dependabot.yaml │ ├── workflows │ │ └── main.yaml │ └── PULL_REQUEST_TEMPLATE.md ├── lib │ ├── src │ │ ├── user_types.dart │ │ └── todo_types.dart │ └── typedefs.dart ├── coverage │ ├── amber.png │ ├── glass.png │ ├── ruby.png │ ├── snow.png │ ├── updown.png │ ├── emerald.png │ └── lcov.info ├── analysis_options.yaml ├── .gitignore ├── pubspec.yaml ├── melos_typedefs.iml ├── test │ └── src │ │ └── typedefs_test.dart └── coverage_badge.svg ├── .vscode └── settings.json ├── pubspec.yaml ├── backend ├── .env.sample ├── routes │ ├── index.dart │ ├── users │ │ ├── index.dart │ │ ├── login.dart │ │ └── signup.dart │ ├── todos │ │ ├── _middleware.dart │ │ ├── index.dart │ │ └── [id].dart │ └── _middleware.dart ├── analysis_options.yaml ├── .gitignore ├── lib │ ├── request_handlers │ │ ├── unimplemented_handler.dart │ │ └── not_allowed_request_handler.dart │ ├── services │ │ ├── jwt_service.dart │ │ └── password_hasher_service.dart │ └── db │ │ └── database_connection.dart ├── test │ ├── routes │ │ └── index_test.dart │ ├── services │ │ ├── password_hasher_service_test.dart │ │ └── jwt_service_test.dart │ └── request_handlers │ │ ├── unimplemented_handler_test.dart │ │ └── not_allowed_request_handler_test.dart ├── README.md ├── pubspec.yaml └── melos_backend.iml ├── melos_full_stack_todo_dart.iml ├── LICENSE.md └── melos.yaml /frontend/.fvm: -------------------------------------------------------------------------------- 1 | .fvm/ -------------------------------------------------------------------------------- /.fvm/.fvm: -------------------------------------------------------------------------------- 1 | frontend/.fvm -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | full_stack_todo_dart -------------------------------------------------------------------------------- /frontend/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /.fvm/flutter_sdk: -------------------------------------------------------------------------------- 1 | /Users/saileshbro/fvm/versions/3.7.10 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | pubspec_overrides.yaml 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /models/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false -------------------------------------------------------------------------------- /data_source/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false -------------------------------------------------------------------------------- /exceptions/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false -------------------------------------------------------------------------------- /failures/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false -------------------------------------------------------------------------------- /repository/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false -------------------------------------------------------------------------------- /typedefs/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "dart.runPubGetOnPubspecChanges": "never" 3 | } 4 | -------------------------------------------------------------------------------- /typedefs/lib/src/user_types.dart: -------------------------------------------------------------------------------- 1 | /// A user's ID. 2 | typedef UserId = String; 3 | -------------------------------------------------------------------------------- /.fvm/fvm_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "flutterSdkVersion": "3.7.10", 3 | "flavors": {} 4 | } -------------------------------------------------------------------------------- /frontend/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /frontend/lib/constants/constants.dart: -------------------------------------------------------------------------------- 1 | const String kBaseUrl = 'http://localhost:8080'; 2 | -------------------------------------------------------------------------------- /exceptions/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.yaml 2 | -------------------------------------------------------------------------------- /frontend/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/web/favicon.png -------------------------------------------------------------------------------- /models/coverage/amber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/models/coverage/amber.png -------------------------------------------------------------------------------- /models/coverage/glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/models/coverage/glass.png -------------------------------------------------------------------------------- /models/coverage/ruby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/models/coverage/ruby.png -------------------------------------------------------------------------------- /models/coverage/snow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/models/coverage/snow.png -------------------------------------------------------------------------------- /exceptions/coverage/ruby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/exceptions/coverage/ruby.png -------------------------------------------------------------------------------- /exceptions/coverage/snow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/exceptions/coverage/snow.png -------------------------------------------------------------------------------- /failures/coverage/amber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/failures/coverage/amber.png -------------------------------------------------------------------------------- /failures/coverage/glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/failures/coverage/glass.png -------------------------------------------------------------------------------- /failures/coverage/ruby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/failures/coverage/ruby.png -------------------------------------------------------------------------------- /failures/coverage/snow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/failures/coverage/snow.png -------------------------------------------------------------------------------- /failures/coverage/updown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/failures/coverage/updown.png -------------------------------------------------------------------------------- /models/coverage/emerald.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/models/coverage/emerald.png -------------------------------------------------------------------------------- /models/coverage/updown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/models/coverage/updown.png -------------------------------------------------------------------------------- /typedefs/coverage/amber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/typedefs/coverage/amber.png -------------------------------------------------------------------------------- /typedefs/coverage/glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/typedefs/coverage/glass.png -------------------------------------------------------------------------------- /typedefs/coverage/ruby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/typedefs/coverage/ruby.png -------------------------------------------------------------------------------- /typedefs/coverage/snow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/typedefs/coverage/snow.png -------------------------------------------------------------------------------- /typedefs/coverage/updown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/typedefs/coverage/updown.png -------------------------------------------------------------------------------- /exceptions/coverage/amber.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/exceptions/coverage/amber.png -------------------------------------------------------------------------------- /exceptions/coverage/glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/exceptions/coverage/glass.png -------------------------------------------------------------------------------- /exceptions/coverage/updown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/exceptions/coverage/updown.png -------------------------------------------------------------------------------- /failures/coverage/emerald.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/failures/coverage/emerald.png -------------------------------------------------------------------------------- /frontend/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /typedefs/coverage/emerald.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/typedefs/coverage/emerald.png -------------------------------------------------------------------------------- /exceptions/coverage/emerald.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/exceptions/coverage/emerald.png -------------------------------------------------------------------------------- /frontend/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /frontend/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /frontend/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/web/icons/Icon-192.png -------------------------------------------------------------------------------- /frontend/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/web/icons/Icon-512.png -------------------------------------------------------------------------------- /frontend/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /models/lib/models.dart: -------------------------------------------------------------------------------- 1 | /// The models library. 2 | library models; 3 | 4 | export 'src/todo/todo.dart'; 5 | export 'src/user/user.dart'; 6 | -------------------------------------------------------------------------------- /frontend/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /frontend/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /frontend/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /frontend/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /repository/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.yaml 2 | analyzer: 3 | errors: 4 | flutter_style_todos: ignore 5 | -------------------------------------------------------------------------------- /typedefs/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.yaml 2 | analyzer: 3 | errors: 4 | flutter_style_todos: ignore 5 | -------------------------------------------------------------------------------- /frontend/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: full_stack_todo_dart_workspace 2 | environment: 3 | sdk: ">=2.19.0 <3.0.0" 4 | flutter: ">=3.7.0" 5 | dev_dependencies: 6 | melos: ^3.0.1 7 | -------------------------------------------------------------------------------- /frontend/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /typedefs/lib/typedefs.dart: -------------------------------------------------------------------------------- 1 | /// A Very Good Project created by Very Good CLI. 2 | library typedefs; 3 | 4 | export 'src/todo_types.dart'; 5 | export 'src/user_types.dart'; 6 | -------------------------------------------------------------------------------- /frontend/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /exceptions/.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 -------------------------------------------------------------------------------- /failures/.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 -------------------------------------------------------------------------------- /models/.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 -------------------------------------------------------------------------------- /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 -------------------------------------------------------------------------------- /typedefs/.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 -------------------------------------------------------------------------------- /backend/.env.sample: -------------------------------------------------------------------------------- 1 | DB_HOST=tiny.db.elephantsql.com 2 | DB_PORT=5432 3 | DB_DATABASE=asztgqfq 4 | DB_USERNAME=asztgqfq 5 | DB_PASSWORD=PcIXbvXQLwpEON61GVPzqs0zHyzHyHZc 6 | JWT_SECRET="asd" 7 | -------------------------------------------------------------------------------- /data_source/.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 -------------------------------------------------------------------------------- /frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /typedefs/coverage/lcov.info: -------------------------------------------------------------------------------- 1 | SF:lib/src/typedefs.dart 2 | DA:9,1 3 | DA:11,1 4 | DA:13,1 5 | DA:14,1 6 | DA:15,1 7 | DA:16,1 8 | DA:17,1 9 | DA:18,1 10 | LF:8 11 | LH:8 12 | end_of_record 13 | -------------------------------------------------------------------------------- /backend/routes/index.dart: -------------------------------------------------------------------------------- 1 | import 'package:backend/request_handlers/not_allowed_request_handler.dart'; 2 | import 'package:dart_frog/dart_frog.dart'; 3 | 4 | Handler onRequest = notAllowedRequestHandler; 5 | -------------------------------------------------------------------------------- /data_source/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.yaml 2 | analyzer: 3 | errors: 4 | non_constant_identifier_names: ignore 5 | flutter_style_todos: ignore 6 | -------------------------------------------------------------------------------- /data_source/lib/data_source.dart: -------------------------------------------------------------------------------- 1 | /// A library that provides data sources for the application. 2 | library data_source; 3 | 4 | export 'src/todo_data_source.dart'; 5 | export 'src/user_data_source.dart'; 6 | -------------------------------------------------------------------------------- /backend/routes/users/index.dart: -------------------------------------------------------------------------------- 1 | import 'package:backend/request_handlers/not_allowed_request_handler.dart'; 2 | import 'package:dart_frog/dart_frog.dart'; 3 | 4 | Handler onRequest = notAllowedRequestHandler; 5 | -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /failures/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.yaml 2 | analyzer: 3 | exclude: 4 | - "**/*.g.dart" 5 | linter: 6 | rules: 7 | non_constant_identifier_names: false 8 | -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /repository/lib/repository.dart: -------------------------------------------------------------------------------- 1 | /// A library that contains all the repositories used in the application. 2 | library repository; 3 | 4 | export 'src/todo_repository.dart'; 5 | export 'src/user_repository.dart'; 6 | -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /backend/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.yaml 2 | analyzer: 3 | exclude: 4 | - build/** 5 | linter: 6 | rules: 7 | file_names: false 8 | flutter_style_todos: false 9 | -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saileshbro/full_stack_todo_dart/HEAD/frontend/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /frontend/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 | -------------------------------------------------------------------------------- /backend/routes/todos/_middleware.dart: -------------------------------------------------------------------------------- 1 | import 'package:backend/middlewares/authorization_middleware.dart'; 2 | import 'package:dart_frog/dart_frog.dart'; 3 | 4 | Handler middleware(Handler handler) => authorizationMiddleware(handler); 5 | -------------------------------------------------------------------------------- /frontend/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /frontend/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /models/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.yaml 2 | analyzer: 3 | errors: 4 | non_constant_identifier_names: ignore 5 | flutter_style_todos: ignore 6 | invalid_annotation_target: ignore 7 | -------------------------------------------------------------------------------- /frontend/android/app/src/main/kotlin/np/com/saileshdahal/fullstack_todo/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package np.com.saileshdahal.fullstack_todo 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /frontend/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | 9 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 10 | } 11 | -------------------------------------------------------------------------------- /frontend/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 | 10 | void fl_register_plugins(FlPluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /failures/lib/src/failure.dart: -------------------------------------------------------------------------------- 1 | /// {@template failure} 2 | /// Base class for all failures. 3 | /// {@endtemplate} 4 | abstract class Failure { 5 | /// Failure message. 6 | String get message; 7 | 8 | /// Failure status code. 9 | int get statusCode; 10 | } 11 | -------------------------------------------------------------------------------- /frontend/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.4-all.zip 6 | -------------------------------------------------------------------------------- /frontend/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 | 10 | void RegisterPlugins(flutter::PluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /frontend/lib/core/di/locator.dart: -------------------------------------------------------------------------------- 1 | import 'package:fullstack_todo/core/di/locator.config.dart'; 2 | import 'package:get_it/get_it.dart'; 3 | import 'package:injectable/injectable.dart'; 4 | 5 | final locator = GetIt.instance; 6 | 7 | @injectableInit 8 | void setupLocator() => locator.init(); 9 | -------------------------------------------------------------------------------- /exceptions/lib/exceptions.dart: -------------------------------------------------------------------------------- 1 | /// A library that contains all the exceptions used in the project. 2 | library exceptions; 3 | 4 | export 'src/http_exception/http_exception.dart'; 5 | export 'src/network_exception/network_exception.dart'; 6 | export 'src/server_exception/server_exception.dart'; 7 | -------------------------------------------------------------------------------- /frontend/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 | -------------------------------------------------------------------------------- /frontend/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.yaml 2 | analyzer: 3 | exclude: 4 | - "**/*.router.dart" 5 | - "**/*.locator.dart" 6 | - "**/*.config.dart" 7 | - "**/*.g.dart" 8 | linter: 9 | rules: 10 | public_member_api_docs: false 11 | -------------------------------------------------------------------------------- /backend/.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 | 12 | # Test related files 13 | coverage/ -------------------------------------------------------------------------------- /models/.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 | -------------------------------------------------------------------------------- /data_source/.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 | -------------------------------------------------------------------------------- /exceptions/.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 | -------------------------------------------------------------------------------- /failures/.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 | -------------------------------------------------------------------------------- /repository/.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 | -------------------------------------------------------------------------------- /typedefs/.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 | -------------------------------------------------------------------------------- /frontend/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /frontend/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /frontend/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /frontend/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /frontend/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /frontend/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /failures/.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 | -------------------------------------------------------------------------------- /frontend/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /models/.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 | -------------------------------------------------------------------------------- /typedefs/.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 | -------------------------------------------------------------------------------- /data_source/.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 | -------------------------------------------------------------------------------- /exceptions/.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 | -------------------------------------------------------------------------------- /repository/.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 | -------------------------------------------------------------------------------- /exceptions/.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 | -------------------------------------------------------------------------------- /exceptions/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: exceptions 2 | description: A Very Good Project created by Very Good CLI. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ">=2.19.0 <3.0.0" 8 | dev_dependencies: 9 | build_runner: ^2.3.3 10 | mocktail: ^0.3.0 11 | test: ^1.24.1 12 | very_good_analysis: ^4.0.0+1 13 | dependencies: 14 | dio: ^5.1.1 15 | -------------------------------------------------------------------------------- /failures/.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 | -------------------------------------------------------------------------------- /frontend/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /models/.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 | -------------------------------------------------------------------------------- /repository/.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 | -------------------------------------------------------------------------------- /typedefs/.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 | -------------------------------------------------------------------------------- /data_source/.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 | -------------------------------------------------------------------------------- /failures/lib/failures.dart: -------------------------------------------------------------------------------- 1 | /// This library contains all the failures that can be thrown by the application 2 | library failures; 3 | 4 | export 'src/failure.dart'; 5 | export 'src/network_failure/network_failure.dart'; 6 | export 'src/request_failure/request_failure.dart'; 7 | export 'src/server_failure/server_failure.dart'; 8 | export 'src/validation_failure/validation_failure.dart'; 9 | -------------------------------------------------------------------------------- /failures/coverage/lcov.info: -------------------------------------------------------------------------------- 1 | SF:lib/src/network_failure/network_failure.dart 2 | DA:21,1 3 | DA:22,1 4 | LF:2 5 | LH:2 6 | end_of_record 7 | SF:lib/src/network_failure/network_failure.g.dart 8 | DA:9,1 9 | DA:10,1 10 | DA:11,1 11 | DA:12,1 12 | DA:13,1 13 | DA:14,2 14 | DA:15,1 15 | DA:19,1 16 | DA:20,1 17 | DA:21,1 18 | DA:22,1 19 | DA:23,1 20 | LF:12 21 | LH:12 22 | end_of_record 23 | -------------------------------------------------------------------------------- /exceptions/.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 | -------------------------------------------------------------------------------- /failures/.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 | -------------------------------------------------------------------------------- /failures/.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 | -------------------------------------------------------------------------------- /models/.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 | -------------------------------------------------------------------------------- /models/.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 | -------------------------------------------------------------------------------- /repository/.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 | -------------------------------------------------------------------------------- /typedefs/.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 | -------------------------------------------------------------------------------- /typedefs/.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 | -------------------------------------------------------------------------------- /data_source/.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 | -------------------------------------------------------------------------------- /data_source/.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 | -------------------------------------------------------------------------------- /exceptions/.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 | -------------------------------------------------------------------------------- /frontend/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /frontend/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 | -------------------------------------------------------------------------------- /repository/.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 | -------------------------------------------------------------------------------- /models/.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 | -------------------------------------------------------------------------------- /data_source/.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 | -------------------------------------------------------------------------------- /exceptions/.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 | -------------------------------------------------------------------------------- /failures/.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 | -------------------------------------------------------------------------------- /frontend/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. -------------------------------------------------------------------------------- /frontend/macos/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FlutterMacOS (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - FlutterMacOS (from `Flutter/ephemeral`) 6 | 7 | EXTERNAL SOURCES: 8 | FlutterMacOS: 9 | :path: Flutter/ephemeral 10 | 11 | SPEC CHECKSUMS: 12 | FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 13 | 14 | PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7 15 | 16 | COCOAPODS: 1.12.0 17 | -------------------------------------------------------------------------------- /repository/.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 | -------------------------------------------------------------------------------- /typedefs/.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 | -------------------------------------------------------------------------------- /exceptions/test/src/server_exception/server_exception_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:exceptions/exceptions.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | test('ServerExceptionTest -', () { 6 | const exception = ServerException('Server error'); 7 | expect(exception.message, 'Server error'); 8 | expect(exception.toString(), 'ServerException: Server error'); 9 | }); 10 | } 11 | -------------------------------------------------------------------------------- /exceptions/.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 | -------------------------------------------------------------------------------- /failures/.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 | -------------------------------------------------------------------------------- /models/.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 | -------------------------------------------------------------------------------- /repository/.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 | -------------------------------------------------------------------------------- /typedefs/.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 | -------------------------------------------------------------------------------- /data_source/.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 | -------------------------------------------------------------------------------- /frontend/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 | -------------------------------------------------------------------------------- /frontend/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 | -------------------------------------------------------------------------------- /data_source/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: data_source 2 | description: A Very Good Project created by Very Good CLI. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ">=2.19.0 <3.0.0" 8 | dependencies: 9 | models: 10 | path: ../models 11 | typedefs: 12 | path: ../typedefs 13 | 14 | dev_dependencies: 15 | build_runner: ^2.3.3 16 | mocktail: ^0.3.0 17 | test: ^1.24.1 18 | very_good_analysis: ^4.0.0+1 19 | -------------------------------------------------------------------------------- /exceptions/lib/src/server_exception/server_exception.dart: -------------------------------------------------------------------------------- 1 | /// {@template server_exception} 2 | /// This is the class for the server exception (500) 3 | /// {@endtemplate} 4 | class ServerException implements Exception { 5 | /// {@macro server_exception} 6 | const ServerException(this.message); 7 | 8 | /// The message to be displayed 9 | final String message; 10 | @override 11 | String toString() => 'ServerException: $message'; 12 | } 13 | -------------------------------------------------------------------------------- /failures/.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 | -------------------------------------------------------------------------------- /failures/build.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | $default: 3 | builders: 4 | json_serializable: 5 | options: 6 | any_map: false 7 | checked: false 8 | create_factory: true 9 | disallow_unrecognized_keys: false 10 | explicit_to_json: true 11 | field_rename: snake 12 | generic_argument_factories: false 13 | ignore_unannotated: false 14 | include_if_null: true 15 | -------------------------------------------------------------------------------- /models/.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 | -------------------------------------------------------------------------------- /models/.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 | -------------------------------------------------------------------------------- /models/build.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | $default: 3 | builders: 4 | json_serializable: 5 | options: 6 | any_map: false 7 | checked: false 8 | create_factory: true 9 | disallow_unrecognized_keys: false 10 | explicit_to_json: true 11 | field_rename: snake 12 | generic_argument_factories: false 13 | ignore_unannotated: false 14 | include_if_null: true 15 | -------------------------------------------------------------------------------- /typedefs/.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 | -------------------------------------------------------------------------------- /data_source/.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 | -------------------------------------------------------------------------------- /data_source/.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 | -------------------------------------------------------------------------------- /exceptions/.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 | -------------------------------------------------------------------------------- /exceptions/.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 | -------------------------------------------------------------------------------- /failures/.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 | -------------------------------------------------------------------------------- /models/.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 | -------------------------------------------------------------------------------- /repository/.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 | -------------------------------------------------------------------------------- /repository/.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 | -------------------------------------------------------------------------------- /typedefs/.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 | -------------------------------------------------------------------------------- /data_source/.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 | -------------------------------------------------------------------------------- /exceptions/.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 | -------------------------------------------------------------------------------- /failures/.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 | -------------------------------------------------------------------------------- /frontend/lib/core/app/routes.dart: -------------------------------------------------------------------------------- 1 | import 'package:fullstack_todo/presentation/maintain_todo/maintain_todo_view.dart'; 2 | import 'package:fullstack_todo/presentation/show_todos/show_todos_view.dart'; 3 | import 'package:stacked/stacked_annotations.dart'; 4 | 5 | @StackedApp( 6 | routes: routes, 7 | ) 8 | const List> routes = [ 9 | AdaptiveRoute(page: ShowTodosView, initial: true), 10 | AdaptiveRoute(page: MaintainTodoView), 11 | ]; 12 | -------------------------------------------------------------------------------- /repository/.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 | -------------------------------------------------------------------------------- /typedefs/.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 | -------------------------------------------------------------------------------- /typedefs/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: typedefs 2 | description: A Very Good Project created by Very Good CLI. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ">=2.19.0 <3.0.0" 8 | dependencies: 9 | either_dart: ^0.3.0 10 | exceptions: 11 | path: ../exceptions 12 | failures: 13 | path: ../failures 14 | dev_dependencies: 15 | build_runner: ^2.3.3 16 | mocktail: ^0.3.0 17 | test: ^1.24.1 18 | very_good_analysis: ^4.0.0+1 19 | -------------------------------------------------------------------------------- /exceptions/lib/src/http_exception/not_found_exception.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:exceptions/src/http_exception/http_exception.dart'; 4 | 5 | /// {@template not_found_exception} 6 | /// This is the class for the not found exception (404) 7 | /// {@endtemplate} 8 | class NotFoundException extends HttpException { 9 | /// {@macro not_found_exception} 10 | const NotFoundException(String message) : super(message, HttpStatus.notFound); 11 | } 12 | -------------------------------------------------------------------------------- /failures/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: failures 2 | description: A Very Good Project created by Very Good CLI. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ">=2.19.0 <3.0.0" 8 | 9 | dev_dependencies: 10 | build_runner: ^2.3.3 11 | freezed: ^2.3.2 12 | json_serializable: ^6.6.1 13 | mocktail: ^0.3.0 14 | test: ^1.24.1 15 | very_good_analysis: ^4.0.0+1 16 | dependencies: 17 | freezed_annotation: ^2.2.0 18 | json_annotation: ^4.8.0 19 | -------------------------------------------------------------------------------- /exceptions/.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 | build: 17 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1 18 | 19 | -------------------------------------------------------------------------------- /failures/.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 | build: 17 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1 18 | 19 | -------------------------------------------------------------------------------- /models/.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 | build: 17 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1 18 | 19 | -------------------------------------------------------------------------------- /repository/.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 | build: 17 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1 18 | 19 | -------------------------------------------------------------------------------- /typedefs/.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 | build: 17 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1 18 | 19 | -------------------------------------------------------------------------------- /data_source/.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 | build: 17 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1 18 | 19 | -------------------------------------------------------------------------------- /failures/.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 | -------------------------------------------------------------------------------- /frontend/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /models/.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 | -------------------------------------------------------------------------------- /typedefs/.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 | -------------------------------------------------------------------------------- /data_source/.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 | -------------------------------------------------------------------------------- /exceptions/.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 | -------------------------------------------------------------------------------- /exceptions/coverage/lcov.info: -------------------------------------------------------------------------------- 1 | SF:lib/src/http_exception/bad_request_exception.dart 2 | DA:10,1 3 | LF:1 4 | LH:1 5 | end_of_record 6 | SF:lib/src/http_exception/http_exception.dart 7 | DA:10,2 8 | DA:18,2 9 | DA:19,6 10 | LF:3 11 | LH:3 12 | end_of_record 13 | SF:lib/src/http_exception/not_found_exception.dart 14 | DA:10,1 15 | LF:1 16 | LH:1 17 | end_of_record 18 | SF:lib/src/server_exception/server_exception.dart 19 | DA:6,1 20 | DA:10,1 21 | DA:11,2 22 | LF:3 23 | LH:3 24 | end_of_record 25 | -------------------------------------------------------------------------------- /frontend/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /frontend/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /frontend/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 | -------------------------------------------------------------------------------- /repository/.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 | -------------------------------------------------------------------------------- /frontend/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 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 | -------------------------------------------------------------------------------- /data_source/lib/src/user_data_source.dart: -------------------------------------------------------------------------------- 1 | import 'package:models/models.dart'; 2 | import 'package:typedefs/typedefs.dart'; 3 | 4 | /// {@template user_data_source} 5 | /// A class that manages the user data. 6 | /// {@endtemplate} 7 | abstract class UserDataSource { 8 | /// Gets a user by id. 9 | Future getUserById(UserId id); 10 | 11 | /// Creates a user. 12 | Future createUser(CreateUserDto user); 13 | 14 | /// Logs in a user. 15 | Future getUserByEmail(String email); 16 | } 17 | -------------------------------------------------------------------------------- /backend/lib/request_handlers/unimplemented_handler.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:dart_frog/dart_frog.dart'; 4 | 5 | /// {@template unimplemented_handler} 6 | /// This is the unimplemented handler 7 | /// It handles all the requests that are not implemented 8 | /// {@endtemplate} 9 | 10 | Future unimplementedHandler([RequestContext? context]) async { 11 | return Response.json( 12 | body: {'error': '👀 Not implemented yet'}, 13 | statusCode: HttpStatus.notImplemented, 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /frontend/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 | -------------------------------------------------------------------------------- /frontend/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /frontend/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 | com.apple.security.network.client 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /backend/lib/request_handlers/not_allowed_request_handler.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:dart_frog/dart_frog.dart'; 4 | 5 | /// {@template not_allowed_request_handler} 6 | /// This is the not allowed request handler 7 | /// It handles all the requests that are not allowed 8 | /// {@endtemplate} 9 | Future notAllowedRequestHandler(RequestContext context) async { 10 | return Response.json( 11 | body: {'error': '👀 Looks like you are lost 🔦'}, 12 | statusCode: HttpStatus.methodNotAllowed, 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /frontend/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /backend/routes/users/login.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:backend/request_handlers/not_allowed_request_handler.dart'; 4 | import 'package:backend/user/controller/user_controller.dart'; 5 | import 'package:dart_frog/dart_frog.dart'; 6 | 7 | FutureOr onRequest(RequestContext context) { 8 | final userController = context.read(); 9 | if (context.request.method != HttpMethod.post) { 10 | return notAllowedRequestHandler(context); 11 | } 12 | return userController.login(context.request); 13 | } 14 | -------------------------------------------------------------------------------- /backend/routes/users/signup.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:backend/request_handlers/not_allowed_request_handler.dart'; 4 | import 'package:backend/user/controller/user_controller.dart'; 5 | import 'package:dart_frog/dart_frog.dart'; 6 | 7 | FutureOr onRequest(RequestContext context) { 8 | final userController = context.read(); 9 | if (context.request.method != HttpMethod.post) { 10 | return notAllowedRequestHandler(context); 11 | } 12 | return userController.store(context.request); 13 | } 14 | -------------------------------------------------------------------------------- /frontend/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /frontend/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 | -------------------------------------------------------------------------------- /repository/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: repository 2 | description: A Very Good Project created by Very Good CLI. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ">=2.19.0 <3.0.0" 8 | 9 | dependencies: 10 | data_source: 11 | path: ../data_source 12 | either_dart: ^0.3.0 13 | failures: 14 | path: ../failures 15 | models: 16 | path: ../models 17 | typedefs: 18 | path: ../typedefs 19 | 20 | dev_dependencies: 21 | build_runner: ^2.3.3 22 | mocktail: ^0.3.0 23 | test: ^1.24.1 24 | very_good_analysis: ^4.0.0+1 25 | -------------------------------------------------------------------------------- /exceptions/test/src/http_exception/not_found_exception_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:exceptions/src/http_exception/not_found_exception.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | const _exception = NotFoundException('Not found'); 5 | void main() { 6 | group('NotFoundExceptionTest -', () { 7 | test('message and status code', () { 8 | expect(_exception.message, 'Not found'); 9 | expect(_exception.statusCode, 404); 10 | }); 11 | test('toString', () { 12 | expect(_exception.toString(), 'NotFoundException: Not found'); 13 | }); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /melos_full_stack_todo_dart.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /frontend/lib/core/network/exceptions/dio_network_exception.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:exceptions/exceptions.dart'; 3 | 4 | class DioNetworkException extends DioError implements NetworkException { 5 | DioNetworkException({ 6 | required this.message, 7 | required this.statusCode, 8 | required this.errors, 9 | required super.requestOptions, 10 | }); 11 | 12 | @override 13 | final int statusCode; 14 | @override 15 | // ignore: overridden_fields 16 | final String message; 17 | @override 18 | final Map> errors; 19 | } 20 | -------------------------------------------------------------------------------- /frontend/lib/core/di/third_party_modules.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:fullstack_todo/constants/constants.dart'; 3 | import 'package:fullstack_todo/core/network/interceptors/network_error_interceptor.dart'; 4 | import 'package:injectable/injectable.dart'; 5 | import 'package:stacked_services/stacked_services.dart'; 6 | 7 | @module 8 | abstract class ThirdPartyModules { 9 | @lazySingleton 10 | Dio get dio => Dio(BaseOptions(baseUrl: kBaseUrl)) 11 | ..interceptors.add(NetworkErrorInterceptor()); 12 | 13 | @lazySingleton 14 | NavigationService get navigationService; 15 | } 16 | -------------------------------------------------------------------------------- /backend/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 405', () async { 14 | final context = _MockRequestContext(); 15 | final response = await route.onRequest(context); 16 | expect(response.statusCode, equals(HttpStatus.methodNotAllowed)); 17 | }); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /frontend/README.md: -------------------------------------------------------------------------------- 1 | # fullstack_todo 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) 13 | 14 | For help getting started with Flutter development, view the 15 | [online documentation](https://docs.flutter.dev/), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /failures/lib/src/request_failure/request_failure.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:failures/failures.dart'; 4 | import 'package:freezed_annotation/freezed_annotation.dart'; 5 | 6 | part 'request_failure.freezed.dart'; 7 | 8 | @freezed 9 | 10 | /// {@template request_failure} 11 | /// Failure that occurs when the user request is invalid. 12 | /// {@endtemplate} 13 | class RequestFailure extends Failure with _$RequestFailure { 14 | /// {@macro request_failure} 15 | const factory RequestFailure({ 16 | required String message, 17 | @Default(HttpStatus.badRequest) int statusCode, 18 | }) = _RequestFailure; 19 | } 20 | -------------------------------------------------------------------------------- /backend/README.md: -------------------------------------------------------------------------------- 1 | # backend 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 -------------------------------------------------------------------------------- /models/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: models 2 | description: A Very Good Project created by Very Good CLI. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ">=2.19.0 <3.0.0" 8 | 9 | dependencies: 10 | either_dart: ^0.3.0 11 | exceptions: 12 | path: ../exceptions 13 | failures: 14 | path: ../failures 15 | freezed_annotation: ^2.2.0 16 | json_annotation: ^4.8.0 17 | typedefs: 18 | path: ../typedefs 19 | 20 | dev_dependencies: 21 | build_runner: ^2.3.3 22 | freezed: ^2.3.2 23 | json_serializable: ^6.6.1 24 | lints: ^2.0.1 25 | mocktail: ^0.3.0 26 | test: ^1.24.1 27 | very_good_analysis: ^4.0.0+1 28 | -------------------------------------------------------------------------------- /failures/lib/src/server_failure/server_failure.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:failures/failures.dart'; 4 | import 'package:freezed_annotation/freezed_annotation.dart'; 5 | 6 | part 'server_failure.freezed.dart'; 7 | 8 | @freezed 9 | 10 | /// {@template server_failure} 11 | /// Failure that occurs when there is issue with the query or the server 12 | /// {@endtemplate} 13 | class ServerFailure extends Failure with _$ServerFailure { 14 | /// {@macro server_failure} 15 | const factory ServerFailure({ 16 | required String message, 17 | @Default(HttpStatus.internalServerError) int statusCode, 18 | }) = _ServerFailure; 19 | } 20 | -------------------------------------------------------------------------------- /backend/test/services/password_hasher_service_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:backend/services/password_hasher_service.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | test('Password Hasher Service', () async { 6 | const passwordHasherService = PasswordHasherService(); 7 | for (var i = 0; i < 10; i++) { 8 | var password = 'seed'; 9 | final hashedPassword = passwordHasherService.hashPassword(password); 10 | final isPasswordCorrect = 11 | passwordHasherService.checkPassword(password, hashedPassword); 12 | expect(isPasswordCorrect, true); 13 | password = hashedPassword; 14 | } 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /models/.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 | -------------------------------------------------------------------------------- /data_source/.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 | -------------------------------------------------------------------------------- /exceptions/.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 | -------------------------------------------------------------------------------- /failures/.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 | -------------------------------------------------------------------------------- /frontend/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 | -------------------------------------------------------------------------------- /repository/.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 | -------------------------------------------------------------------------------- /typedefs/.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 | -------------------------------------------------------------------------------- /exceptions/lib/src/network_exception/network_exception.dart: -------------------------------------------------------------------------------- 1 | /// {@template network_exception} 2 | /// This is the class for the network from frontend 3 | /// This will serialize the error from the backend 4 | /// {@endtemplate} 5 | class NetworkException implements Exception { 6 | /// {@macro network_exception} 7 | NetworkException({ 8 | required this.message, 9 | required this.statusCode, 10 | this.errors = const {}, 11 | }); 12 | 13 | /// The message to be displayed 14 | final String message; 15 | 16 | /// The status code of the error 17 | final int statusCode; 18 | 19 | /// The errors from the backend 20 | final Map> errors; 21 | } 22 | -------------------------------------------------------------------------------- /typedefs/lib/src/todo_types.dart: -------------------------------------------------------------------------------- 1 | import 'package:either_dart/either.dart'; 2 | import 'package:exceptions/exceptions.dart'; 3 | import 'package:failures/failures.dart'; 4 | 5 | /// Primary key type for a Todo. 6 | typedef TodoId = int; 7 | 8 | /// Maps a string to a [TodoId]. 9 | Either mapTodoId(String id) { 10 | try { 11 | final todoId = int.tryParse(id); 12 | if (todoId == null) throw const BadRequestException(message: 'Invalid id'); 13 | return Right(todoId); 14 | } on BadRequestException catch (e) { 15 | return Left( 16 | RequestFailure( 17 | message: e.message, 18 | statusCode: e.statusCode, 19 | ), 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /exceptions/lib/src/http_exception/bad_request_exception.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:exceptions/src/http_exception/http_exception.dart'; 4 | 5 | /// {@template bad_request_exception} 6 | /// This is the class for the bad request exception (400) 7 | /// {@endtemplate} 8 | class BadRequestException extends HttpException { 9 | /// {@macro bad_request_exception} 10 | const BadRequestException({ 11 | required String message, 12 | this.errors = const {}, 13 | // coverage:ignore-start 14 | }) : super(message, HttpStatus.badRequest); 15 | // coverage:ignore-end 16 | 17 | /// The errors that occurred during the request 18 | final Map> errors; 19 | } 20 | -------------------------------------------------------------------------------- /exceptions/lib/src/http_exception/http_exception.dart: -------------------------------------------------------------------------------- 1 | export './bad_request_exception.dart'; 2 | export './not_found_exception.dart'; 3 | export './unauthorized_exception.dart'; 4 | 5 | /// {@template http_exception} 6 | /// This is the base class for all http exceptions 7 | /// Use this class to throw http exceptions 8 | /// {@endtemplate} 9 | abstract class HttpException implements Exception { 10 | /// {@macro http_exception} 11 | const HttpException(this.message, this.statusCode); 12 | 13 | /// The message to be displayed 14 | final String message; 15 | 16 | /// The status code to be returned 17 | final int statusCode; 18 | 19 | @override 20 | String toString() => '$runtimeType: $message'; 21 | } 22 | -------------------------------------------------------------------------------- /failures/lib/src/validation_failure/validation_failure.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:failures/failures.dart'; 4 | import 'package:freezed_annotation/freezed_annotation.dart'; 5 | 6 | part 'validation_failure.freezed.dart'; 7 | 8 | /// {@template validation_failure} 9 | /// Failure that occurs when the validation of a request fails. 10 | /// {@endtemplate} 11 | @freezed 12 | class ValidationFailure extends Failure with _$ValidationFailure { 13 | /// {@macro validation_failure} 14 | const factory ValidationFailure({ 15 | required String message, 16 | @Default(HttpStatus.badRequest) int statusCode, 17 | @Default({}) Map> errors, 18 | }) = _ValidationFailure; 19 | } 20 | -------------------------------------------------------------------------------- /exceptions/lib/src/http_exception/unauthorized_exception.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:exceptions/src/http_exception/http_exception.dart'; 4 | 5 | /// {@template unauthorized_exception} 6 | /// This is the class for the unauthorized exception (401) 7 | /// {@endtemplate} 8 | class UnauthorizedException extends HttpException { 9 | /// {@macro unauthorized_exception} 10 | const UnauthorizedException({ 11 | String message = 'Unauthorized', 12 | this.errors = const {}, 13 | // coverage:ignore-start 14 | }) : super(message, HttpStatus.unauthorized); 15 | // coverage:ignore-end 16 | 17 | /// The errors that occurred during the request 18 | final Map> errors; 19 | } 20 | -------------------------------------------------------------------------------- /frontend/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 = fullstack_todo 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = np.com.saileshdahal.fullstackTodo 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 np.com.saileshdahal. All rights reserved. 15 | -------------------------------------------------------------------------------- /backend/test/request_handlers/unimplemented_handler_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | import 'package:backend/request_handlers/unimplemented_handler.dart'; 5 | import 'package:dart_frog/dart_frog.dart'; 6 | import 'package:mocktail/mocktail.dart'; 7 | import 'package:test/test.dart'; 8 | 9 | class _MockRequestContext extends Mock implements RequestContext {} 10 | 11 | void main() { 12 | test('unimplemented handler ...', () async { 13 | final res = await unimplementedHandler(_MockRequestContext()); 14 | expect(res.statusCode, HttpStatus.notImplemented); 15 | expect( 16 | await res.body(), 17 | jsonEncode({'error': '👀 Not implemented yet'}), 18 | ); 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /frontend/.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": "frontend", 9 | "request": "launch", 10 | "type": "dart" 11 | }, 12 | { 13 | "name": "frontend (profile mode)", 14 | "request": "launch", 15 | "type": "dart", 16 | "flutterMode": "profile" 17 | }, 18 | { 19 | "name": "frontend (release mode)", 20 | "request": "launch", 21 | "type": "dart", 22 | "flutterMode": "release" 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /frontend/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 | -------------------------------------------------------------------------------- /models/lib/src/user/login_user_dto/login_user_dto.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'login_user_dto.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$_LoginUserDto _$$_LoginUserDtoFromJson(Map json) => 10 | _$_LoginUserDto( 11 | email: json['email'] as String, 12 | password: json['password'] as String, 13 | ); 14 | 15 | Map _$$_LoginUserDtoToJson(_$_LoginUserDto instance) => 16 | { 17 | 'email': instance.email, 18 | 'password': instance.password, 19 | }; 20 | -------------------------------------------------------------------------------- /frontend/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /backend/test/request_handlers/not_allowed_request_handler_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | import 'package:backend/request_handlers/not_allowed_request_handler.dart'; 5 | import 'package:dart_frog/dart_frog.dart'; 6 | import 'package:mocktail/mocktail.dart'; 7 | import 'package:test/test.dart'; 8 | 9 | class _MockRequestContext extends Mock implements RequestContext {} 10 | 11 | void main() { 12 | test('not allowed request handler ...', () async { 13 | final res = await notAllowedRequestHandler(_MockRequestContext()); 14 | expect(res.statusCode, HttpStatus.methodNotAllowed); 15 | expect( 16 | await res.body(), 17 | jsonEncode({'error': '👀 Looks like you are lost 🔦'}), 18 | ); 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /backend/test/services/jwt_service_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:backend/services/jwt_service.dart'; 2 | import 'package:dotenv/dotenv.dart'; 3 | import 'package:models/models.dart'; 4 | import 'package:test/test.dart'; 5 | 6 | void main() { 7 | test('jwt service ...', () async { 8 | final jwtService = JWTService(DotEnv()..load()); 9 | final user = User( 10 | id: 'id', 11 | name: 'Sailesh Dahal', 12 | email: 'saileshbro@gmail.com', 13 | password: 'password', 14 | createdAt: DateTime.now(), 15 | ); 16 | final token = jwtService.sign(user.toJson()); 17 | final decodedUser = jwtService.verify(token); 18 | user.toJson().forEach((key, value) { 19 | expect(decodedUser[key], value); 20 | }); 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /frontend/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fullstack_todo/core/app/routes.router.dart'; 3 | import 'package:fullstack_todo/core/di/locator.dart'; 4 | import 'package:stacked_services/stacked_services.dart'; 5 | 6 | void main() { 7 | setupLocator(); 8 | runApp(const MyApp()); 9 | } 10 | 11 | class MyApp extends StatelessWidget { 12 | const MyApp({super.key}); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return MaterialApp( 17 | title: 'Fullstack Todo App', 18 | theme: ThemeData( 19 | primarySwatch: Colors.blue, 20 | ), 21 | navigatorKey: StackedService.navigatorKey, 22 | onGenerateRoute: StackedRouter().onGenerateRoute, 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /models/lib/src/todo/create_todo_dto/create_todo_dto.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'create_todo_dto.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$_CreateTodoDto _$$_CreateTodoDtoFromJson(Map json) => 10 | _$_CreateTodoDto( 11 | title: json['title'] as String, 12 | description: json['description'] as String, 13 | ); 14 | 15 | Map _$$_CreateTodoDtoToJson(_$_CreateTodoDto instance) => 16 | { 17 | 'title': instance.title, 18 | 'description': instance.description, 19 | }; 20 | -------------------------------------------------------------------------------- /backend/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: backend 2 | description: An new Dart Frog application 3 | version: 1.0.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ">=2.19.0 <3.0.0" 8 | 9 | dependencies: 10 | bcrypt: ^1.1.3 11 | dart_frog: ^0.3.5 12 | dart_jsonwebtoken: ^2.7.1 13 | data_source: 14 | path: ../data_source 15 | dotenv: ^4.1.0 16 | either_dart: ^0.3.0 17 | exceptions: 18 | path: ../exceptions 19 | failures: 20 | path: ../failures 21 | http: ^0.13.5 22 | models: 23 | path: ../models 24 | postgres: ^2.6.1 25 | repository: 26 | path: ../repository 27 | typedefs: 28 | path: ../typedefs 29 | 30 | dev_dependencies: 31 | build_runner: ^2.3.3 32 | mocktail: ^0.3.0 33 | test: ^1.24.1 34 | very_good_analysis: ^4.0.0+1 35 | -------------------------------------------------------------------------------- /backend/routes/todos/index.dart: -------------------------------------------------------------------------------- 1 | import 'package:backend/request_handlers/not_allowed_request_handler.dart'; 2 | import 'package:backend/todo/controller/todo_controller.dart'; 3 | import 'package:dart_frog/dart_frog.dart'; 4 | 5 | Future onRequest(RequestContext context) async { 6 | final controller = context.read(); 7 | switch (context.request.method) { 8 | case HttpMethod.get: 9 | return controller.index(context.request); 10 | case HttpMethod.post: 11 | return controller.store(context.request); 12 | case HttpMethod.put: 13 | case HttpMethod.patch: 14 | case HttpMethod.delete: 15 | case HttpMethod.head: 16 | case HttpMethod.options: 17 | return notAllowedRequestHandler(context); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /models/test/src/serializers/date_time_converter_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:models/src/serializers/date_time_converter.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | test('DateTimeConverterTests', () async { 6 | final dateTime = DateTime.now(); 7 | final dateTimeString = dateTime.toIso8601String(); 8 | const dateTimeConverter = DateTimeConverterNullable(); 9 | final convertedDateTime = dateTimeConverter.fromJson(dateTimeString); 10 | expect(convertedDateTime, dateTime); 11 | final convertedDateTimeString = dateTimeConverter.toJson(dateTime); 12 | expect(convertedDateTimeString, dateTimeString); 13 | expect(dateTimeConverter.fromJson(null), null); 14 | expect(dateTimeConverter.toJson(null), null); 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /frontend/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 | -------------------------------------------------------------------------------- /backend/lib/services/jwt_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:dart_jsonwebtoken/dart_jsonwebtoken.dart'; 2 | import 'package:dotenv/dotenv.dart'; 3 | 4 | /// {@template jwt_service} 5 | /// JWT service to sign and verify tokens 6 | /// {@endtemplate} 7 | class JWTService { 8 | /// {@macro jwt_service} 9 | const JWTService(this._env); 10 | 11 | final DotEnv _env; 12 | 13 | /// Sign a payload 14 | String sign(Map payload) { 15 | final secret = _env['JWT_SECRET']!; 16 | final jwt = JWT(payload); 17 | return jwt.sign(SecretKey(secret)); 18 | } 19 | 20 | /// Verify a token 21 | Map verify(String token) { 22 | final secret = _env['JWT_SECRET']!; 23 | final jwt = JWT.verify(token, SecretKey(secret)); 24 | return jwt.payload as Map; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /models/lib/src/user/create_user_dto/create_user_dto.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'create_user_dto.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$_CreateUserDto _$$_CreateUserDtoFromJson(Map json) => 10 | _$_CreateUserDto( 11 | name: json['name'] as String, 12 | email: json['email'] as String, 13 | password: json['password'] as String, 14 | ); 15 | 16 | Map _$$_CreateUserDtoToJson(_$_CreateUserDto instance) => 17 | { 18 | 'name': instance.name, 19 | 'email': instance.email, 20 | 'password': instance.password, 21 | }; 22 | -------------------------------------------------------------------------------- /backend/melos_backend.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /models/melos_models.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /failures/melos_failures.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /typedefs/melos_typedefs.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /data_source/melos_data_source.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /exceptions/melos_exceptions.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /failures/.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 | -------------------------------------------------------------------------------- /models/.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 | -------------------------------------------------------------------------------- /repository/melos_repository.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /typedefs/.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 | -------------------------------------------------------------------------------- /data_source/.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 | -------------------------------------------------------------------------------- /exceptions/.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 | -------------------------------------------------------------------------------- /repository/.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 | -------------------------------------------------------------------------------- /models/lib/src/todo/update_todo_dto/update_todo_dto.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'update_todo_dto.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$_UpdateTodoDto _$$_UpdateTodoDtoFromJson(Map json) => 10 | _$_UpdateTodoDto( 11 | title: json['title'] as String?, 12 | description: json['description'] as String?, 13 | completed: json['completed'] as bool?, 14 | ); 15 | 16 | Map _$$_UpdateTodoDtoToJson(_$_UpdateTodoDto instance) => 17 | { 18 | 'title': instance.title, 19 | 'description': instance.description, 20 | 'completed': instance.completed, 21 | }; 22 | -------------------------------------------------------------------------------- /repository/lib/src/user_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:either_dart/either.dart'; 2 | import 'package:failures/failures.dart'; 3 | import 'package:models/models.dart'; 4 | import 'package:typedefs/typedefs.dart'; 5 | 6 | /// {@template user_repository} 7 | /// Base class for all user repositories. 8 | /// {@endtemplate} 9 | abstract class UserRepository { 10 | /// Get a user with the given [id]. 11 | Future> getUserById(UserId id); 12 | 13 | /// Create a user with the given [createUserDto]. 14 | Future> createUser(CreateUserDto createUserDto); 15 | 16 | /// Login a user with the given [loginUserDto]. 17 | Future> loginUser(LoginUserDto loginUserDto); 18 | 19 | /// Get a user with the given [email]. 20 | Future> getUserByEmail(String email); 21 | } 22 | -------------------------------------------------------------------------------- /failures/lib/src/network_failure/network_failure.dart: -------------------------------------------------------------------------------- 1 | import 'package:failures/failures.dart'; 2 | import 'package:freezed_annotation/freezed_annotation.dart'; 3 | 4 | part 'network_failure.freezed.dart'; 5 | part 'network_failure.g.dart'; 6 | 7 | @Freezed(toStringOverride: false) 8 | 9 | /// {@template network_failure} 10 | /// Failure that occurs when a network request fails. 11 | /// {@endtemplate} 12 | class NetworkFailure extends Failure with _$NetworkFailure { 13 | /// {@macro network_failure} 14 | const factory NetworkFailure({ 15 | required String message, 16 | required int statusCode, 17 | @Default({}) Map> errors, 18 | }) = _NetworkFailure; 19 | 20 | /// Returns a [NetworkFailure] from a json map. 21 | factory NetworkFailure.fromJson(Map json) => 22 | _$NetworkFailureFromJson(json); 23 | } 24 | -------------------------------------------------------------------------------- /frontend/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /frontend/windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /typedefs/test/src/typedefs_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:either_dart/either.dart'; 2 | import 'package:failures/failures.dart'; 3 | import 'package:test/test.dart'; 4 | import 'package:typedefs/typedefs.dart'; 5 | 6 | void main() { 7 | group('typedefs test', () { 8 | group('mapTodoId', () { 9 | test('valid id tests', () { 10 | final todoId = mapTodoId('1'); 11 | expect(todoId, isA>()); 12 | expect(todoId.right, isA()); 13 | }); 14 | 15 | test('invalid id tests', () { 16 | final todoId = mapTodoId('1s'); 17 | expect(todoId, isA>()); 18 | expect(todoId.left, isA()); 19 | expect(todoId.left, isA()); 20 | expect(todoId.left.message, 'Invalid id'); 21 | expect(todoId.left.statusCode, 400); 22 | }); 23 | }); 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /frontend/lib/data/data_source/todos_http_client/todos_http_client.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | import 'package:models/models.dart'; 4 | import 'package:retrofit/retrofit.dart'; 5 | import 'package:typedefs/typedefs.dart'; 6 | 7 | part 'todos_http_client.g.dart'; 8 | 9 | @RestApi() 10 | @lazySingleton 11 | abstract class TodosHttpClient { 12 | @factoryMethod 13 | factory TodosHttpClient(Dio dio) = _TodosHttpClient; 14 | @GET('/todos') 15 | Future> getAllTodo(); 16 | @GET('/todos/{id}') 17 | Future getTodoById(@Path('id') TodoId id); 18 | @POST('/todos') 19 | Future createTodo(@Body() CreateTodoDto todo); 20 | @PATCH('/todos/{id}') 21 | Future updateTodo(@Path('id') TodoId id, @Body() UpdateTodoDto todo); 22 | @DELETE('/todos/{id}') 23 | Future deleteTodoById(@Path('id') TodoId id); 24 | } 25 | -------------------------------------------------------------------------------- /frontend/.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 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /backend/routes/todos/[id].dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:backend/todo/controller/todo_controller.dart'; 4 | import 'package:dart_frog/dart_frog.dart'; 5 | 6 | Future onRequest(RequestContext context, String id) async { 7 | final todoController = context.read(); 8 | switch (context.request.method) { 9 | case HttpMethod.get: 10 | return todoController.show(context.request, id); 11 | case HttpMethod.put: 12 | case HttpMethod.patch: 13 | return todoController.update(context.request, id); 14 | case HttpMethod.delete: 15 | return todoController.destroy(context.request, id); 16 | case HttpMethod.head: 17 | case HttpMethod.options: 18 | case HttpMethod.post: 19 | return Response.json( 20 | body: {'error': '👀 Looks like you are lost 🔦'}, 21 | statusCode: HttpStatus.methodNotAllowed, 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /frontend/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 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /exceptions/test/src/http_exception/bad_request_exception_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:exceptions/exceptions.dart'; 4 | import 'package:test/test.dart'; 5 | 6 | const _exception = BadRequestException( 7 | message: 'Validation failed', 8 | errors: { 9 | 'name': ['Name is required'] 10 | }, 11 | ); 12 | void main() { 13 | group('BadRequestExceptionTest -', () { 14 | test('message and status code', () { 15 | expect(_exception.message, 'Validation failed'); 16 | expect(_exception.statusCode, HttpStatus.badRequest); 17 | }); 18 | test('toString', () { 19 | expect(_exception.toString(), 'BadRequestException: Validation failed'); 20 | }); 21 | test('when no errors provided, it should have empty map', () { 22 | const exception = BadRequestException(message: 'Validation failed'); 23 | expect(exception.errors, isEmpty); 24 | }); 25 | }); 26 | } 27 | -------------------------------------------------------------------------------- /models/lib/src/user/user.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$_User _$$_UserFromJson(Map json) => _$_User( 10 | id: json['id'] as String, 11 | name: json['name'] as String, 12 | email: json['email'] as String, 13 | createdAt: const DateTimeConverter().fromJson(json['created_at']), 14 | password: json['password'] as String? ?? '', 15 | ); 16 | 17 | Map _$$_UserToJson(_$_User instance) => { 18 | 'id': instance.id, 19 | 'name': instance.name, 20 | 'email': instance.email, 21 | 'created_at': const DateTimeConverter().toJson(instance.createdAt), 22 | 'password': instance.password, 23 | }; 24 | -------------------------------------------------------------------------------- /models/lib/src/user/user.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | import 'package:models/src/serializers/date_time_converter.dart'; 3 | import 'package:typedefs/typedefs.dart'; 4 | 5 | export './create_user_dto/create_user_dto.dart'; 6 | export './login_user_dto/login_user_dto.dart'; 7 | 8 | part 'user.freezed.dart'; 9 | part 'user.g.dart'; 10 | 11 | /// {@template user} 12 | /// A class representing a user. 13 | /// {@endtemplate} 14 | @freezed 15 | class User with _$User { 16 | /// {@macro user} 17 | const factory User({ 18 | required UserId id, 19 | required String name, 20 | required String email, 21 | @DateTimeConverter() required DateTime createdAt, 22 | @Default('') @JsonKey(includeToJson: false) String password, 23 | }) = _User; 24 | 25 | /// {@macro user} 26 | /// Create a [User] from a json object. 27 | factory User.fromJson(Map json) => _$UserFromJson(json); 28 | } 29 | -------------------------------------------------------------------------------- /frontend/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 | -------------------------------------------------------------------------------- /backend/lib/services/password_hasher_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:bcrypt/bcrypt.dart'; 2 | 3 | /// {@template password_hasher_service} 4 | /// A service that hashes passwords. 5 | /// This service is used to hash passwords before storing them in the database. 6 | /// {@endtemplate} 7 | class PasswordHasherService { 8 | /// {@macro password_hasher_service} 9 | const PasswordHasherService(); 10 | 11 | /// Hashes the given [password]. 12 | /// The returned [Future] completes with the hashed password. 13 | String hashPassword(String password) { 14 | return BCrypt.hashpw(password, BCrypt.gensalt()); 15 | } 16 | 17 | /// Checks if the given [password] matches the given [hashedPassword]. 18 | /// The returned [Future] completes with `true` if the password matches the 19 | /// hashed password, otherwise it completes with `false`. 20 | 21 | bool checkPassword(String password, String hashedPassword) { 22 | return BCrypt.checkpw(password, hashedPassword); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /repository/lib/src/todo_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:either_dart/either.dart'; 2 | import 'package:failures/failures.dart'; 3 | import 'package:models/models.dart'; 4 | import 'package:typedefs/typedefs.dart'; 5 | 6 | /// {@template todo_repository} 7 | /// Base class for all todo repositories. 8 | /// {@endtemplate} 9 | abstract class TodoRepository { 10 | /// Get all todos. 11 | Future>> getTodos(); 12 | 13 | /// Get a todo with the given [id]. 14 | Future> getTodoById(TodoId id); 15 | 16 | /// Create a todo with the given [createTodoDto]. 17 | Future> createTodo(CreateTodoDto createTodoDto); 18 | 19 | /// Update a todo with the given [id] and [updateTodoDto]. 20 | Future> updateTodo({ 21 | required TodoId id, 22 | required UpdateTodoDto updateTodoDto, 23 | }); 24 | 25 | /// Delete a todo with the given [id]. 26 | Future> deleteTodo(TodoId id); 27 | } 28 | -------------------------------------------------------------------------------- /failures/lib/src/network_failure/network_failure.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'network_failure.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$_NetworkFailure _$$_NetworkFailureFromJson(Map json) => 10 | _$_NetworkFailure( 11 | message: json['message'] as String, 12 | statusCode: json['status_code'] as int, 13 | errors: (json['errors'] as Map?)?.map( 14 | (k, e) => MapEntry( 15 | k, (e as List).map((e) => e as String).toList()), 16 | ) ?? 17 | const {}, 18 | ); 19 | 20 | Map _$$_NetworkFailureToJson(_$_NetworkFailure instance) => 21 | { 22 | 'message': instance.message, 23 | 'status_code': instance.statusCode, 24 | 'errors': instance.errors, 25 | }; 26 | -------------------------------------------------------------------------------- /frontend/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fullstack_todo", 3 | "short_name": "fullstack_todo", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /data_source/lib/src/todo_data_source.dart: -------------------------------------------------------------------------------- 1 | import 'package:models/models.dart'; 2 | import 'package:typedefs/typedefs.dart'; 3 | 4 | /// {@template todo_data_source} 5 | /// An interface for a todos data source. 6 | /// 🔍 This interface defines a set of functions for interacting 7 | /// with a data source that stores todo items. 8 | /// {@endtemplate} 9 | /// 10 | abstract class TodoDataSource { 11 | /// Returns a list of all todo items in the data source 12 | Future> getAllTodo(); 13 | 14 | /// Returns a todo item with the given [id] from the data source 15 | /// If no todo item with the given [id] exists, returns `null` 16 | Future getTodoById(TodoId id); 17 | 18 | /// Creates a new todo item in the data source 19 | Future createTodo(CreateTodoDto todo); 20 | 21 | /// Updates an existing todo item in the data source 22 | Future updateTodo({ 23 | required TodoId id, 24 | required UpdateTodoDto todo, 25 | }); 26 | 27 | /// Deletes a todo item with the given [id] from the data source 28 | Future deleteTodoById(TodoId id); 29 | } 30 | -------------------------------------------------------------------------------- /frontend/lib/data/data_source/todo_remote_data_source/todos_remote_data_source.dart: -------------------------------------------------------------------------------- 1 | import 'package:data_source/data_source.dart'; 2 | import 'package:fullstack_todo/data/data_source/todos_http_client/todos_http_client.dart'; 3 | import 'package:injectable/injectable.dart'; 4 | import 'package:models/models.dart'; 5 | import 'package:typedefs/typedefs.dart'; 6 | 7 | @LazySingleton(as: TodoDataSource) 8 | class TodosRemoteDataSource implements TodoDataSource { 9 | const TodosRemoteDataSource(this.httpClient); 10 | 11 | final TodosHttpClient httpClient; 12 | 13 | @override 14 | Future createTodo(CreateTodoDto todo) => httpClient.createTodo(todo); 15 | 16 | @override 17 | Future deleteTodoById(TodoId id) => httpClient.deleteTodoById(id); 18 | 19 | @override 20 | Future> getAllTodo() => httpClient.getAllTodo(); 21 | 22 | @override 23 | Future getTodoById(TodoId id) => httpClient.getTodoById(id); 24 | 25 | @override 26 | Future updateTodo({required TodoId id, required UpdateTodoDto todo}) => 27 | httpClient.updateTodo(id, todo); 28 | } 29 | -------------------------------------------------------------------------------- /frontend/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /frontend/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 | -------------------------------------------------------------------------------- /frontend/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Sailesh Dahal 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /failures/test/src/network_failure/network_failure_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:failures/failures.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('NetworkFailureTest -', () { 6 | test('fromJson Test', () { 7 | final json = { 8 | 'message': 'message', 9 | 'status_code': 1, 10 | 'errors': ['error1', 'error2'], 11 | }; 12 | final networkFailure = NetworkFailure.fromJson(json); 13 | expect(networkFailure.message, 'message'); 14 | expect(networkFailure.statusCode, 1); 15 | expect(networkFailure.errors, orderedEquals(['error1', 'error2'])); 16 | }); 17 | 18 | test('toJson Test', () { 19 | const networkFailure = NetworkFailure( 20 | message: 'message', 21 | statusCode: 1, 22 | errors: { 23 | 'field': ['error1', 'error2'] 24 | }, 25 | ); 26 | final json = networkFailure.toJson(); 27 | expect(json['message'], 'message'); 28 | expect(json['status_code'], 1); 29 | // ignore: avoid_dynamic_calls 30 | expect(json['errors']['field'], orderedEquals(['error1', 'error2'])); 31 | }); 32 | }); 33 | } 34 | -------------------------------------------------------------------------------- /exceptions/coverage_badge.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | coverage 19 | coverage 20 | 21 | 100% 22 | 100% 23 | 24 | 25 | -------------------------------------------------------------------------------- /failures/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 | -------------------------------------------------------------------------------- /models/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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /typedefs/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 | -------------------------------------------------------------------------------- /data_source/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 | -------------------------------------------------------------------------------- /frontend/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: fullstack_todo 2 | description: A Very Good Project created by Very Good CLI. 3 | version: 1.0.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ">=2.19.0 <3.0.0" 8 | flutter: ">=3.7.0" 9 | 10 | dependencies: 11 | data_source: 12 | path: ../data_source 13 | dio: ^5.1.1 14 | either_dart: ^0.3.0 15 | exceptions: 16 | path: ../exceptions 17 | failures: 18 | path: ../failures 19 | flutter: 20 | sdk: flutter 21 | flutter_hooks: ^0.18.6 22 | get_it: ^7.2.0 23 | injectable: ^2.1.1 24 | models: 25 | path: ../models 26 | repository: 27 | path: ../repository 28 | retrofit: ^4.0.1 29 | stacked: 3.1.0+2 30 | stacked_services: 0.9.9 31 | typedefs: 32 | path: ../typedefs 33 | 34 | dev_dependencies: 35 | build_runner: ^2.3.3 36 | flutter_test: 37 | sdk: flutter 38 | injectable_generator: ^2.1.5 39 | integration_test: 40 | sdk: flutter 41 | mockito: ^5.4.0 42 | retrofit_generator: ^6.0.0+1 43 | stacked_generator: 0.8.3 44 | very_good_analysis: ^4.0.0+1 45 | dependency_overrides: 46 | json_annotation: ^4.8.0 47 | json_serializable: ^6.6.0 48 | flutter: 49 | uses-material-design: true 50 | -------------------------------------------------------------------------------- /frontend/lib/data_services/todos_data_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | import 'package:models/models.dart'; 4 | import 'package:stacked/stacked.dart'; 5 | 6 | @lazySingleton 7 | class TodosDataService with ListenableServiceMixin { 8 | TodosDataService() { 9 | listenToReactiveValues([_todos]); 10 | } 11 | late final ReactiveValue> _todos = ReactiveValue>([]); 12 | 13 | List get todos => _todos.value; 14 | 15 | @visibleForTesting 16 | Stream> get todosStream => _todos.values; 17 | 18 | void add(Todo todo) { 19 | final index = _todos.value.indexWhere((element) => element.id == todo.id); 20 | if (index == -1) { 21 | _todos.value.insert(0, todo); 22 | } else { 23 | _todos.value[index] = todo; 24 | } 25 | notifyListeners(); 26 | } 27 | 28 | void addAll(List todos) { 29 | _todos.value 30 | ..clear() 31 | ..insertAll(0, todos); 32 | notifyListeners(); 33 | } 34 | 35 | void remove(Todo todo) { 36 | _todos.value.removeWhere((element) => element.id == todo.id); 37 | notifyListeners(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /frontend/macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /models/lib/src/todo/todo.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'todo.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | _$_Todo _$$_TodoFromJson(Map json) => _$_Todo( 10 | id: json['id'] as int, 11 | userId: json['user_id'] as String, 12 | title: json['title'] as String, 13 | description: json['description'] as String? ?? '', 14 | completed: json['completed'] as bool? ?? false, 15 | createdAt: const DateTimeConverter().fromJson(json['created_at']), 16 | updatedAt: const DateTimeConverterNullable().fromJson(json['updated_at']), 17 | ); 18 | 19 | Map _$$_TodoToJson(_$_Todo instance) => { 20 | 'id': instance.id, 21 | 'user_id': instance.userId, 22 | 'title': instance.title, 23 | 'description': instance.description, 24 | 'completed': instance.completed, 25 | 'created_at': const DateTimeConverter().toJson(instance.createdAt), 26 | 'updated_at': 27 | const DateTimeConverterNullable().toJson(instance.updatedAt), 28 | }; 29 | -------------------------------------------------------------------------------- /melos.yaml: -------------------------------------------------------------------------------- 1 | name: full_stack_todo_dart 2 | repository: https://github.com/saileshbro/full_stack_todo_dart.git 3 | packages: 4 | - backend 5 | - frontend 6 | - data_source 7 | - exceptions 8 | - models 9 | - repository 10 | - failures 11 | - typedefs 12 | 13 | sdkPath: .fvm/flutter_sdk 14 | ide: 15 | intellij: false 16 | 17 | scripts: 18 | backend:dev: 19 | run: dart_frog dev 20 | exec: 21 | cuncurrency: 1 22 | fail-fast: true 23 | description: Starts the dev server for the backend 24 | packageFilters: 25 | scope: backend 26 | flutter: false 27 | 28 | generate:build: 29 | run: melos run build_runner:build --no-select 30 | description: Generate all files for all packages in this project. 31 | exec: 32 | concurrency: 5 33 | fail-fast: true 34 | 35 | build_runner:build: 36 | run: dart pub run build_runner build --delete-conflicting-outputs 37 | description: Build all generated files for Dart packages in this project. 38 | exec: 39 | concurrency: 1 40 | fail-fast: true 41 | packageFilters: 42 | dependsOn: build_runner 43 | 44 | test:unit: 45 | run: melos exec -c 1 --fail-fast -- "flutter test" 46 | description: Run Unit tests for a specific package in this project. 47 | packageFilters: 48 | dirExists: test 49 | -------------------------------------------------------------------------------- /models/lib/src/serializers/date_time_converter.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | 3 | /// {@template date_time_converter_nullable} 4 | /// {@macro date_time_converter} 5 | /// 6 | /// If the json is null, this will return null 7 | /// {@endtemplate} 8 | class DateTimeConverterNullable extends JsonConverter { 9 | /// {@macro date_time_converter_nullable} 10 | const DateTimeConverterNullable(); 11 | 12 | @override 13 | DateTime? fromJson(dynamic json) { 14 | if (json == null) return null; 15 | return const DateTimeConverter().fromJson(json); 16 | } 17 | 18 | @override 19 | String? toJson(DateTime? object) { 20 | if (object == null) return null; 21 | return const DateTimeConverter().toJson(object); 22 | } 23 | } 24 | 25 | /// {@template date_time_converter} 26 | /// This is a custom json converter for [DateTime] 27 | /// 28 | /// This will parse the date time from a ISO8601 string 29 | /// {@endtemplate} 30 | class DateTimeConverter extends JsonConverter { 31 | /// {@macro date_time_converter} 32 | const DateTimeConverter(); 33 | 34 | @override 35 | DateTime fromJson(dynamic json) { 36 | if (json is DateTime) return json; 37 | return DateTime.parse(json as String); 38 | } 39 | 40 | @override 41 | String toJson(DateTime object) { 42 | return object.toIso8601String(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /backend/routes/_middleware.dart: -------------------------------------------------------------------------------- 1 | import 'package:backend/db/database_connection.dart'; 2 | import 'package:backend/services/jwt_service.dart'; 3 | import 'package:backend/services/password_hasher_service.dart'; 4 | import 'package:backend/user/controller/user_controller.dart'; 5 | import 'package:backend/user/data_source/user_data_source_impl.dart'; 6 | import 'package:backend/user/repositories/user_repository_impl.dart'; 7 | import 'package:dart_frog/dart_frog.dart'; 8 | import 'package:data_source/data_source.dart'; 9 | import 'package:dotenv/dotenv.dart'; 10 | import 'package:repository/repository.dart'; 11 | 12 | final env = DotEnv()..load(); 13 | final _db = DatabaseConnection(env); 14 | final _userDs = UserDataSourceImpl(_db); 15 | const _passwordHasher = PasswordHasherService(); 16 | final _userRepo = UserRepositoryImpl(_userDs, _passwordHasher); 17 | final _jwtService = JWTService(env); 18 | final _userController = UserController(_userRepo, _jwtService); 19 | 20 | Handler middleware(Handler handler) { 21 | return handler 22 | .use(requestLogger()) 23 | .use(provider((_) => _db)) 24 | .use(provider((_) => _jwtService)) 25 | .use(provider((_) => _userDs)) 26 | .use(provider((_) => _userRepo)) 27 | .use(provider((_) => _userController)) 28 | .use(provider((_) => _passwordHasher)); 29 | } 30 | -------------------------------------------------------------------------------- /frontend/lib/presentation/show_todos/widgets/todo_list_tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:fullstack_todo/presentation/show_todos/show_todos_viewmodel.dart'; 3 | import 'package:models/models.dart'; 4 | import 'package:stacked/stacked.dart'; 5 | 6 | class TodoListTile extends ViewModelWidget { 7 | const TodoListTile({ 8 | required this.todo, 9 | super.key, 10 | }); 11 | 12 | final Todo todo; 13 | 14 | @override 15 | Widget build(BuildContext context, ShowTodosViewModel viewModel) { 16 | return ListTile( 17 | title: Text(todo.title), 18 | subtitle: Text(todo.description), 19 | leading: Checkbox( 20 | key: Key('todoCheckbox${todo.title}}'), 21 | value: todo.completed, 22 | onChanged: (val) => viewModel.markCompleted(todo), 23 | ), 24 | trailing: Row( 25 | mainAxisSize: MainAxisSize.min, 26 | children: [ 27 | IconButton( 28 | icon: const Icon( 29 | Icons.edit, 30 | color: Colors.blue, 31 | ), 32 | onPressed: () => viewModel.handleTodo(todo), 33 | ), 34 | IconButton( 35 | icon: const Icon( 36 | Icons.delete, 37 | color: Colors.red, 38 | ), 39 | onPressed: () => viewModel.deleteTodo(todo), 40 | ), 41 | ], 42 | ), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /models/lib/src/todo/todo.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | import 'package:models/src/serializers/date_time_converter.dart'; 3 | import 'package:typedefs/typedefs.dart'; 4 | 5 | export './create_todo_dto/create_todo_dto.dart'; 6 | export './update_todo_dto/update_todo_dto.dart'; 7 | 8 | part 'todo.freezed.dart'; 9 | part 'todo.g.dart'; 10 | 11 | /// A class representing a todo item. 12 | @freezed 13 | class Todo with _$Todo { 14 | /// Creates an instance of [Todo]. 15 | /// 16 | /// The [id], [title] fields are required. 17 | /// The [completed] field is optional 18 | /// and has a default value of false 19 | /// The [description] field is optional 20 | /// and has a default value of an empty string. 21 | /// The [createdAt] field is required and represents the date and time 22 | /// when the todo item was created. 23 | /// The [updatedAt] field is optional and represents the date and time 24 | /// when the todo item was last updated. 25 | factory Todo({ 26 | required TodoId id, 27 | required UserId userId, 28 | required String title, 29 | @DateTimeConverter() required DateTime createdAt, 30 | @Default('') String description, 31 | @Default(false) bool completed, 32 | @DateTimeConverterNullable() DateTime? updatedAt, 33 | }) = _Todo; 34 | 35 | /// Creates an instance of [Todo] from a JSON object. 36 | factory Todo.fromJson(Map json) => _$TodoFromJson(json); 37 | } 38 | -------------------------------------------------------------------------------- /frontend/windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.CreateAndShow(L"fullstack_todo", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /frontend/macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.14' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | end 35 | 36 | post_install do |installer| 37 | installer.pods_project.targets.each do |target| 38 | flutter_additional_macos_build_settings(target) 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /models/test/src/todo/todo_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:models/models.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('Todo test -', () { 6 | test('toJson test', () { 7 | final createdAt = DateTime.now(); 8 | final todo = Todo( 9 | id: 1, 10 | userId: 'userId', 11 | title: 'title', 12 | description: 'description', 13 | createdAt: createdAt, 14 | ); 15 | expect(todo.toJson(), { 16 | 'id': 1, 17 | 'user_id': 'userId', 18 | 'title': 'title', 19 | 'description': 'description', 20 | 'completed': false, 21 | 'created_at': createdAt.toIso8601String(), 22 | 'updated_at': null, 23 | }); 24 | }); 25 | 26 | test('fromJson test', () { 27 | final createdAt = DateTime.now(); 28 | final updatedAt = DateTime.now().subtract(const Duration(days: 1)); 29 | final todo = Todo.fromJson({ 30 | 'id': 1, 31 | 'user_id': 'userId', 32 | 'title': 'title', 33 | 'description': 'description', 34 | 'created_at': createdAt.toIso8601String(), 35 | 'updated_at': updatedAt.toIso8601String(), 36 | }); 37 | expect(todo.id, 1); 38 | expect(todo.userId, 'userId'); 39 | expect(todo.title, 'title'); 40 | expect(todo.description, 'description'); 41 | expect(todo.completed, false); 42 | expect(todo.createdAt, createdAt); 43 | expect(todo.updatedAt, updatedAt); 44 | }); 45 | }); 46 | } 47 | -------------------------------------------------------------------------------- /frontend/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '11.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /frontend/lib/core/network/interceptors/network_error_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:failures/failures.dart'; 3 | import 'package:fullstack_todo/core/network/exceptions/dio_network_exception.dart'; 4 | 5 | class NetworkErrorInterceptor extends Interceptor { 6 | @override 7 | void onError(DioError err, ErrorInterceptorHandler handler) { 8 | const genericInternetIssue = 9 | 'Please check your internet connection and try again'; 10 | try { 11 | if (err.response == null) { 12 | throw DioNetworkException( 13 | message: genericInternetIssue, 14 | statusCode: 500, 15 | requestOptions: err.requestOptions, 16 | errors: {}, 17 | ); 18 | } 19 | final errorJson = err.response!.data as Map; 20 | final failureFromServer = NetworkFailure.fromJson( 21 | { 22 | ...errorJson, 23 | 'status_code': err.response!.statusCode, 24 | }, 25 | ); 26 | throw DioNetworkException( 27 | message: failureFromServer.message, 28 | statusCode: err.response!.statusCode ?? failureFromServer.statusCode, 29 | errors: failureFromServer.errors, 30 | requestOptions: err.requestOptions, 31 | ); 32 | } on DioNetworkException catch (e) { 33 | handler.reject(e); 34 | } catch (e) { 35 | handler.reject( 36 | DioNetworkException( 37 | message: genericInternetIssue, 38 | statusCode: 500, 39 | requestOptions: err.requestOptions, 40 | errors: {}, 41 | ), 42 | ); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /frontend/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /backend/lib/db/database_connection.dart: -------------------------------------------------------------------------------- 1 | import 'dart:developer'; 2 | 3 | import 'package:dotenv/dotenv.dart'; 4 | import 'package:postgres/postgres.dart'; 5 | 6 | /// {@template database_connection} 7 | /// Database connection class 8 | /// This class is used to connect to the database 9 | /// {@endtemplate} 10 | class DatabaseConnection { 11 | /// {@macro database_connection} 12 | DatabaseConnection(this._dotEnv) { 13 | _host = _dotEnv['DB_HOST'] ?? 'localhost'; 14 | _port = int.tryParse(_dotEnv['DB_PORT'] ?? '') ?? 5432; 15 | _database = _dotEnv['DB_DATABASE'] ?? 'test'; 16 | _username = _dotEnv['DB_USERNAME'] ?? 'test'; 17 | _password = _dotEnv['DB_PASSWORD'] ?? 'test'; 18 | } 19 | 20 | final DotEnv _dotEnv; 21 | late final String _host; 22 | late final int _port; 23 | late final String _database; 24 | late final String _username; 25 | late final String _password; 26 | PostgreSQLConnection? _connection; 27 | 28 | /// Get the database connection 29 | PostgreSQLConnection get db => 30 | _connection ??= throw Exception('Database connection not initialized'); 31 | 32 | /// Connect to the database with the given credentials 33 | Future connect() async { 34 | try { 35 | _connection = PostgreSQLConnection( 36 | _host, 37 | _port, 38 | _database, 39 | username: _username, 40 | password: _password, 41 | ); 42 | log('Database connection successful'); 43 | return _connection!.open(); 44 | } catch (e) { 45 | log('Database connection failed: $e'); 46 | } 47 | } 48 | 49 | /// Close the database connection 50 | Future close() => _connection!.close(); 51 | } 52 | -------------------------------------------------------------------------------- /models/coverage/lcov.info: -------------------------------------------------------------------------------- 1 | SF:lib/src/create_todo_dto/create_todo_dto.dart 2 | DA:21,1 3 | DA:22,1 4 | DA:26,1 5 | DA:30,1 6 | DA:31,1 7 | DA:32,2 8 | DA:34,1 9 | DA:35,2 10 | DA:37,3 11 | DA:38,1 12 | DA:42,1 13 | DA:43,1 14 | DA:44,1 15 | DA:45,1 16 | DA:46,1 17 | DA:47,1 18 | LF:16 19 | LH:16 20 | end_of_record 21 | SF:lib/src/create_todo_dto/create_todo_dto.g.dart 22 | DA:9,1 23 | DA:10,1 24 | DA:11,1 25 | DA:12,1 26 | DA:15,1 27 | DA:16,1 28 | DA:17,1 29 | DA:18,1 30 | LF:8 31 | LH:8 32 | end_of_record 33 | SF:lib/src/todo/todo.dart 34 | DA:32,2 35 | LF:1 36 | LH:1 37 | end_of_record 38 | SF:lib/src/todo/todo.g.dart 39 | DA:9,2 40 | DA:10,1 41 | DA:11,1 42 | DA:12,1 43 | DA:13,1 44 | DA:14,2 45 | DA:15,2 46 | DA:18,2 47 | DA:19,1 48 | DA:20,1 49 | DA:21,1 50 | DA:22,1 51 | DA:23,2 52 | DA:25,2 53 | LF:14 54 | LH:14 55 | end_of_record 56 | SF:lib/src/update_todo_dto/update_todo_dto.dart 57 | DA:26,1 58 | DA:27,1 59 | DA:32,1 60 | DA:36,1 61 | DA:37,3 62 | DA:38,2 63 | DA:40,3 64 | DA:41,2 65 | DA:43,1 66 | DA:44,2 67 | DA:46,4 68 | DA:47,1 69 | DA:51,1 70 | DA:52,1 71 | DA:53,1 72 | DA:54,1 73 | DA:55,1 74 | DA:56,1 75 | LF:18 76 | LH:18 77 | end_of_record 78 | SF:lib/src/update_todo_dto/update_todo_dto.g.dart 79 | DA:9,1 80 | DA:10,1 81 | DA:11,1 82 | DA:12,1 83 | DA:13,1 84 | DA:16,1 85 | DA:17,1 86 | DA:18,1 87 | DA:19,1 88 | DA:20,1 89 | LF:10 90 | LH:10 91 | end_of_record 92 | SF:lib/src/serializers/date_time_converter.dart 93 | DA:10,13 94 | DA:12,2 95 | DA:15,2 96 | DA:18,2 97 | DA:21,1 98 | DA:32,16 99 | DA:34,2 100 | DA:36,2 101 | DA:37,2 102 | DA:40,2 103 | DA:42,2 104 | LF:11 105 | LH:11 106 | end_of_record 107 | -------------------------------------------------------------------------------- /frontend/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /frontend/.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. 5 | 6 | version: 7 | revision: 135454af32477f815a7525073027a3ff9eff1bfd 8 | channel: unknown 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd 17 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd 18 | - platform: android 19 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd 20 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd 21 | - platform: ios 22 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd 23 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd 24 | - platform: linux 25 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd 26 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd 27 | - platform: macos 28 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd 29 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd 30 | - platform: web 31 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd 32 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd 33 | - platform: windows 34 | create_revision: 135454af32477f815a7525073027a3ff9eff1bfd 35 | base_revision: 135454af32477f815a7525073027a3ff9eff1bfd 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /frontend/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /models/lib/src/user/login_user_dto/login_user_dto.dart: -------------------------------------------------------------------------------- 1 | import 'package:either_dart/either.dart'; 2 | import 'package:exceptions/exceptions.dart'; 3 | import 'package:failures/failures.dart'; 4 | import 'package:freezed_annotation/freezed_annotation.dart'; 5 | 6 | part 'login_user_dto.freezed.dart'; 7 | part 'login_user_dto.g.dart'; 8 | 9 | @freezed 10 | 11 | /// {@template login_user_dto} 12 | /// Data transfer object for logging in a user. 13 | /// {@endtemplate} 14 | class LoginUserDto with _$LoginUserDto { 15 | /// {@macro login_user_dto} 16 | factory LoginUserDto({ 17 | required String email, 18 | required String password, 19 | }) = _LoginUserDto; 20 | 21 | /// {@macro login_user_dto} 22 | factory LoginUserDto.fromJson(Map json) => 23 | _$LoginUserDtoFromJson(json); 24 | 25 | /// Validates the [LoginUserDto] and throws a [BadRequestException] if the 26 | /// validation fails. 27 | static Either validated( 28 | Map json, 29 | ) { 30 | try { 31 | final errors = >{}; 32 | final email = json['email'] as String? ?? ''; 33 | final password = json['password'] as String? ?? ''; 34 | if (email.isEmpty) { 35 | errors['email'] = ['Email is required']; 36 | } 37 | if (password.isEmpty) { 38 | errors['password'] = ['Password is required']; 39 | } 40 | if (errors.isEmpty) return Right(LoginUserDto.fromJson(json)); 41 | throw BadRequestException( 42 | message: 'Validation failed', 43 | errors: errors, 44 | ); 45 | } on BadRequestException catch (e) { 46 | return Left( 47 | ValidationFailure( 48 | message: e.message, 49 | errors: e.errors, 50 | statusCode: e.statusCode, 51 | ), 52 | ); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /frontend/windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 37 | 38 | # Run the Flutter tool portions of the build. This must not be removed. 39 | add_dependencies(${BINARY_NAME} flutter_assemble) 40 | -------------------------------------------------------------------------------- /frontend/integration_test/integration_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:fullstack_todo/core/di/locator.dart'; 4 | import 'package:fullstack_todo/main.dart'; 5 | 6 | final _randomTitle = DateTime.now().microsecondsSinceEpoch; 7 | final _randomDescription = DateTime.now().microsecondsSinceEpoch; 8 | void main() { 9 | setUpAll(setupLocator); 10 | testWidgets('overall flow test', (tester) async { 11 | await tester.pumpWidget(const MyApp()); 12 | await tester.pumpAndSettle(); 13 | expect(find.text('Todos'), findsOneWidget); 14 | final listView = find.byType(ListView); 15 | expect(listView, findsOneWidget); 16 | await createTodoTest(tester); 17 | }); 18 | } 19 | 20 | Future createTodoTest(WidgetTester tester) async { 21 | final fab = find.byType(FloatingActionButton); 22 | expect(fab, findsOneWidget); 23 | await tester.tap(fab); 24 | await tester.pumpAndSettle(); 25 | final title = find.byKey(const Key('titleTextField')); 26 | final description = find.byKey(const Key('descriptionTextField')); 27 | final checkBox = find.byKey(const Key('completedCheckbox')); 28 | await tester.enterText(title, '$_randomTitle'); 29 | await tester.enterText(description, '$_randomDescription'); 30 | expect(checkBox, findsNothing); 31 | await tester.pumpAndSettle(); 32 | 33 | final saveButton = find.byKey(const Key('saveButton')); 34 | expect(saveButton, findsOneWidget); 35 | await tester.tap(saveButton); 36 | await tester.pumpAndSettle(); 37 | expect(find.text('$_randomTitle'), findsOneWidget); 38 | expect(find.text('$_randomDescription'), findsOneWidget); 39 | final newTodoCheckBox = find.byKey(Key('todoCheckbox$_randomTitle}')); 40 | expect(newTodoCheckBox, findsOneWidget); 41 | final checkBoxWidget = tester.widget(newTodoCheckBox); 42 | expect(checkBoxWidget.value, false); 43 | } 44 | -------------------------------------------------------------------------------- /frontend/lib/data/repositories/todo_repository_impl.dart: -------------------------------------------------------------------------------- 1 | import 'package:data_source/data_source.dart'; 2 | import 'package:either_dart/either.dart'; 3 | import 'package:exceptions/exceptions.dart'; 4 | import 'package:failures/failures.dart'; 5 | import 'package:injectable/injectable.dart'; 6 | import 'package:models/models.dart'; 7 | import 'package:repository/repository.dart'; 8 | import 'package:typedefs/typedefs.dart'; 9 | 10 | @LazySingleton(as: TodoRepository) 11 | class TodoRepositoryImpl implements TodoRepository { 12 | const TodoRepositoryImpl(this._todoDataSource); 13 | final TodoDataSource _todoDataSource; 14 | 15 | @override 16 | Future> createTodo(CreateTodoDto createTodoDto) => 17 | handleError(() => _todoDataSource.createTodo(createTodoDto)); 18 | 19 | @override 20 | Future> deleteTodo(TodoId id) => 21 | handleError(() => _todoDataSource.deleteTodoById(id)); 22 | 23 | @override 24 | Future> getTodoById(TodoId id) => 25 | handleError(() => _todoDataSource.getTodoById(id)); 26 | 27 | @override 28 | Future>> getTodos() => 29 | handleError(_todoDataSource.getAllTodo); 30 | 31 | @override 32 | Future> updateTodo({ 33 | required TodoId id, 34 | required UpdateTodoDto updateTodoDto, 35 | }) => 36 | handleError( 37 | () => _todoDataSource.updateTodo(id: id, todo: updateTodoDto), 38 | ); 39 | 40 | Future> handleError( 41 | Future Function() callback, 42 | ) async { 43 | try { 44 | final res = await callback(); 45 | return Right(res); 46 | } on NetworkException catch (e) { 47 | return Left( 48 | NetworkFailure( 49 | message: e.message, 50 | statusCode: e.statusCode, 51 | errors: e.errors, 52 | ), 53 | ); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /frontend/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Fullstack Todo 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | fullstack_todo 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | UIApplicationSupportsIndirectInputEvents 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /models/lib/src/todo/create_todo_dto/create_todo_dto.dart: -------------------------------------------------------------------------------- 1 | import 'package:either_dart/either.dart'; 2 | import 'package:exceptions/exceptions.dart'; 3 | import 'package:failures/failures.dart'; 4 | import 'package:freezed_annotation/freezed_annotation.dart'; 5 | 6 | part 'create_todo_dto.freezed.dart'; 7 | part 'create_todo_dto.g.dart'; 8 | 9 | /// A data transfer object (DTO) to create a new todo item 10 | @freezed 11 | class CreateTodoDto with _$CreateTodoDto { 12 | /// Creates an instance of [CreateTodoDto]. 13 | /// 14 | /// The [title] and [description] fields are required. 15 | factory CreateTodoDto({ 16 | required String title, 17 | required String description, 18 | }) = _CreateTodoDto; 19 | 20 | /// Creates an instance of [CreateTodoDto] from a JSON object. 21 | factory CreateTodoDto.fromJson(Map json) => 22 | _$CreateTodoDtoFromJson(json); 23 | 24 | /// Validates the [CreateTodoDto] and throws a [BadRequestException] if the 25 | /// validation fails. 26 | static Either validated( 27 | Map json, 28 | ) { 29 | try { 30 | final errors = >{}; 31 | final title = json['title'] as String? ?? ''; 32 | final description = json['description'] as String? ?? ''; 33 | if (title.isEmpty) { 34 | errors['title'] = ['Title is required']; 35 | } 36 | if (description.isEmpty) { 37 | errors['description'] = ['Description is required']; 38 | } 39 | if (errors.isEmpty) return Right(CreateTodoDto.fromJson(json)); 40 | throw BadRequestException( 41 | message: 'Validation failed', 42 | errors: errors, 43 | ); 44 | } on BadRequestException catch (e) { 45 | return Left( 46 | ValidationFailure( 47 | message: e.message, 48 | errors: e.errors, 49 | statusCode: e.statusCode, 50 | ), 51 | ); 52 | } 53 | } 54 | } 55 | --------------------------------------------------------------------------------