Skip to content

Conversation

@avni-7span
Copy link
Collaborator

@avni-7span avni-7span commented Jul 16, 2025

Description

  • Added project rules for cursor, windsurf and trae.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

Summary by CodeRabbit

  • New Features

    • Added "Forgot Password" and "Verify OTP" flows with new screens, bloc state management, and API integration.
    • Introduced OTP input and countdown timer widgets to enhance authentication UX.
    • Added new authentication API endpoints and request models for password reset and OTP verification.
    • Expanded English translations to support password reset and OTP workflows.
  • Enhancements

    • Updated navigation to include new authentication routes.
    • Replaced default app bars with custom app bars across multiple screens for consistent UI.
    • Enhanced text field widget with read-only and max length options.
  • Documentation

    • Added extensive project rules and best practices covering Flutter asset management, UI design patterns, navigation, state management, and coding style.
  • Bug Fixes / Refactor / Style

    • Refactored widget formatting and code style for improved readability without changing functionality.

urvashi-k-7span and others added 30 commits June 17, 2025 13:56
…ckage and remove unused translation patterns
- Added try-catch to handle error in Remote Config initialisation.
- Added 'force_update' key and assigned JSON value to it while set up initial default values, to match Firebase's variable configuration.
This commit introduces the following changes:

- Added a forgot password feature, allowing users to reset their passwords.
- Implemented a verify OTP (One-Time Password) screen for enhanced security.
- Updated the authentication repository to include methods for forgot password and OTP verification.
- Added relevant translations for the new features.
- Integrated the forgot password flow into the sign-in screen.
- Updated API endpoints for forgot password and OTP verification.
- Added necessary dependencies, including `pinput` for OTP input.
- Updated ForgotPasswordBloc to handle success and failure cases.
- Included errorMessage in ForgotPasswordState props.
- Added static OTP validation in VerifyOTPScreen.
- Updated VerifyOTPState and VerifyOTPEvent to include props for better state management and event handling.
- Removed skeletonizer dependency override from widgetbook.
- Updated API endpoints for forgot password and verify OTP.
- Set email field to read-only on the verify OTP screen.
- Removed unused `Countdown` widget.
- Standardized OTP length to 6 digits in `VerifyOTPBloc`.
- Added `readOnly` property to `AppTextField` widget.
Incremented the counter to 2.
This commit introduces a new `AppTimer` widget and integrates it into the OTP verification screen.

Key changes:
- Added `AppTimer` widget to `app_ui` for displaying a countdown timer.
- Integrated `AppTimer` into `VerifyOTPScreen` to show the OTP resend countdown.
- Refactored `VerifyOTPScreen` to use `AppTimer` and removed manual timer logic.
- Updated `VerifyOTPBloc` to use `LengthValidator` for OTP validation.
- Modified navigation from `ForgotPasswordScreen` to `VerifyOTPScreen` to use `replaceRoute` instead of `pushRoute`.
- Ensured OTP input is cleared and focus is removed when resending OTP.
- Displayed error messages using `SnackbarType.failed` for invalid OTP.
- Updated Pinput widget to show error text based on `state.otp.error`.
- Allowed only digits in OTP input using `FilteringTextInputFormatter.digitsOnly`.
- Removed unused `formKey` from `VerifyOTPScreen`.
- Simplified `AppTimer` widget by removing `onTick` and `textStyle` parameters.
- Updated `VerifyOTPState`'s `isValid` getter to include email validation.
The `AppTimer` widget was modified to prevent the timer from starting if the initial `seconds` value is 0. Additionally, the `onFinished` callback is now always called when the timer finishes, even if it's null.
The `AppTimer` widget now correctly formats the remaining time to show both minutes and seconds (MM:SS) instead of just seconds.
- Added `pin_incorrect` localization.
- Made `VerifyOTPEvent` subclasses final.
- Added assertion for non-negative seconds in `AppTimer`.
- Used localized error message for incorrect PIN in `VerifyOTPScreen`.
- Modified `VerifyOTPBloc` to initialize email via `SetEmailEvent` instead of constructor.
- Renamed API status fields in `VerifyOTPState` for clarity (e.g., `statusForResendOTP` to `resendOtpStatus`).
- Removed redundant `BlocBuilder` widgets in `VerifyOTPScreen`.
- Trimmed email input in `ForgotPasswordBloc` before validation and submission.
- Changed `AuthRepository.forgotPassword` return type from `TaskEither<Failure, void>` to `TaskEither<Failure, Unit>`.
- Replaced `SingleChildScrollView` with `ListView` in `ForgotPasswordScreen` and removed `AutofillGroup`.
Moved the `email` property declaration after the constructor in `SetEmailEvent` for consistency with other event classes.
- Made `emailAddress` a required parameter in `VerifyOTPScreen`.
- Removed local timer management from `VerifyOTPScreen` and moved timer logic to `VerifyOTPBloc`.
- Simplified OTP verification logic in `VerifyOTPScreen` and `VerifyOTPBloc` to use a static OTP for now.
- Replaced `SingleChildScrollView` with `ListView` in `VerifyOTPScreen`.
- Updated `VerifyOTPState` to include `isTimerRunning` and changed `email` type to `String`.
- Added `StartTimerEvent` and `TimerFinishedEvent` to `VerifyOTPEvent`.
- Updated `VerifyOTPBloc` to handle new timer events and use the string email.
- Renamed `readOnly` to `isReadOnly` in `AppTextField`.
The padding for the "Verify OTP" button on the `VerifyOTPScreen` has been updated.
Removed the `Padding` widget that was wrapping the `BlocConsumer` in the `VerifyOTPScreen` and moved the padding to the `ListView` instead.
- Added `pinput` dependency to `app_ui/pubspec.yaml`.
- Removed `pinput` dependency from `app_core/pubspec.yaml`.
- Created `AppOtpInput` widget in `app_ui` to encapsulate OTP input logic.
- Replaced direct usage of `Pinput` with `AppOtpInput` in `VerifyOTPScreen`.
- Updated various dependency versions in `widgetbook/pubspec.lock`.
- Updated Flutter SDK constraint in `widgetbook/pubspec.lock`.
@avni-7span avni-7span requested a review from cavin-7span July 16, 2025 09:52
@avni-7span avni-7span self-assigned this Jul 16, 2025
@avni-7span avni-7span added the enhancement New feature or request label Jul 16, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jul 16, 2025

Walkthrough

This update introduces comprehensive project-wide documentation and rule files defining strict standards for Flutter development, including architecture, asset management, UI patterns, navigation, state management, API integration, color usage, and coding style. The rules enforce consistency, type safety, and best practices across all major aspects of the codebase, with detailed guides and migration instructions.

Changes

File(s) Change Summary
.cursor/rules/assets-rules.mdc
.cursor/rules/atomic-design-rule.mdc
.cursor/rules/auto-route.mdc
.cursor/rules/bloc.mdc
.cursor/rules/color.mdc
.cursor/rules/flutter-dart.mdc
.cursor/rules/structure.mdc
Added markdown documentation files establishing project rules for: asset management with flutter_gen, UI development with Atomic Design, navigation with Auto Route, BLoC state management, color and typography standards, Flutter/Dart coding style, and feature/module folder structure. Each file provides detailed guidelines, code patterns, checklists, and migration instructions.
.trae/rules/project_rules.md Introduced a comprehensive project rules document consolidating standards for asset usage, UI components, navigation, BLoC, repository patterns, color usage, Dart/Flutter style, and feature structure. Provides step-by-step guides, code samples, and best practices.

Sequence Diagram(s)

sequenceDiagram
  participant Developer
  participant Documentation
  Developer->>Documentation: Reads rules for assets, UI, navigation, BLoC, etc.
  Developer->>Documentation: Follows checklists and migration guides
  Developer->>Codebase: Applies prescribed patterns and conventions
  Documentation-->>Developer: Provides troubleshooting and best practices
Loading

Possibly related PRs

  • Updated app_textfield.dart #55: Adds new optional parameters isReadOnly and maxLength to the AppTextField widget, which directly relates to the rules and documentation around widget customization and standardization.

Suggested labels

documentation

Suggested reviewers

  • cavin-7span

Poem

In the warren of code, where the widgets all play,
A rabbit with glasses wrote rules for the day.
"No stringly-typed assets! Use structure and flair—
Let BLoC and Auto Route guide you with care.
With color and spacing all tidy and neat,
Our Fluttery burrow is truly elite!"
🐇📚✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fd4c8ca and a6411d4.

📒 Files selected for processing (1)
  • packages/app_ui/lib/src/widgets/molecules/app_textfield.dart (7 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/app_ui/lib/src/widgets/molecules/app_textfield.dart

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (10)
.github/ISSUE_TEMPLATE/bug_report.md (1)

24-32: Sample can’t mutate state inside StatelessWidget

count++ inside a StatelessWidget is a no-op and may confuse reporters. Consider switching the snippet to StatefulWidget or using ValueNotifier so the example actually updates the UI.

-class Home extends StatelessWidget {
-  final count = 0;
+class Home extends StatefulWidget {
+  @override
+  State<Home> createState() => _HomeState();
+}
+
+class _HomeState extends State<Home> {
+  int count = 0;
apps/app_core/lib/modules/forgot_password/bloc/forgot_password_state.dart (1)

11-18: Consider consistent parameter ordering in copyWith method.

For better maintainability, consider ordering the copyWith parameters to match the field declaration order in the constructor.

-ForgotPasswordState copyWith({EmailValidator? email, bool? isValid, FormzSubmissionStatus? status, String? errorMessage}) {
+ForgotPasswordState copyWith({FormzSubmissionStatus? status, EmailValidator? email, bool? isValid, String? errorMessage}) {
  return ForgotPasswordState(
-    email: email ?? this.email,
-    isValid: isValid ?? this.isValid,
    status: status ?? this.status,
+    email: email ?? this.email,
+    isValid: isValid ?? this.isValid,
    errorMessage: errorMessage ?? this.errorMessage,
  );
}
packages/app_ui/lib/src/widgets/molecules/app_timer.dart (1)

37-50: Timer implementation is correct but could be optimized.

The timer logic correctly handles countdown and cancellation. However, consider stopping the timer immediately when reaching zero instead of continuing the periodic calls.

void _startTimer() {
  if (widget.seconds == 0) return;
  _timer?.cancel();
  _timer = Timer.periodic(const Duration(seconds: 1), (timer) {
    if (_secondsRemaining > 0) {
      setState(() {
        _secondsRemaining--;
      });
+      if (_secondsRemaining == 0) {
+        timer.cancel();
+        widget.onFinished?.call();
+      }
    } else {
-      timer.cancel();
-      widget.onFinished?.call();
+      // This branch should never be reached now
    }
  });
}
packages/app_ui/lib/src/widgets/molecules/app_otp_input.dart (1)

7-7: Consider adding validation for length parameter.

While the default length of 6 is appropriate, consider adding validation to prevent invalid values.

-const AppOtpInput({required this.onChanged, this.length = 6, this.errorText, super.key});
+const AppOtpInput({required this.onChanged, this.length = 6, this.errorText, super.key}) 
+  : assert(length > 0, 'Length must be positive');
apps/app_core/lib/modules/auth/repository/auth_repository.dart (1)

123-154: Consider consolidating duplicate request handling patterns.

The forgotPassword and verifyOTP methods follow similar request-response patterns. Consider extracting a common helper method to reduce code duplication.

Here's a potential refactor to reduce duplication:

+  TaskEither<Failure, T> _makeAuthRequest<T>(
+    String path,
+    Map<String, dynamic> body,
+    T Function(Map<String, dynamic>) responseMapper,
+  ) => userApiClient.request(
+    requestType: RequestType.post,
+    path: path,
+    body: body,
+    options: Options(headers: {'Content-Type': 'application/json'}),
+  ).chainEither(RepositoryUtils.checkStatusCode)
+   .chainEither((response) => RepositoryUtils.mapToModel(() => responseMapper(response.data as Map<String, dynamic>)));

  @override
  TaskEither<Failure, Unit> forgotPassword(AuthRequestModel authRequestModel) => 
-    makeForgotPasswordRequest(authRequestModel)
-      .chainEither(RepositoryUtils.checkStatusCode)
-      .chainEither((response) => RepositoryUtils.mapToModel(() => response.data))
-      .map((_) => unit);
+    _makeAuthRequest(
+      ApiEndpoints.forgotPassword,
+      authRequestModel.toForgotPasswordMap(),
+      (_) => unit,
+    );

  @override
  TaskEither<Failure, AuthResponseModel> verifyOTP(AuthRequestModel authRequestModel) => 
-    makeVerifyOTPRequest(authRequestModel)
-      .chainEither(RepositoryUtils.checkStatusCode)
-      .chainEither((response) => RepositoryUtils.mapToModel(() => AuthResponseModel.fromMap(response.data as Map<String, dynamic>)));
+    _makeAuthRequest(
+      ApiEndpoints.verifyOTP,
+      authRequestModel.toVerifyOTPMap(),
+      AuthResponseModel.fromMap,
+    );
apps/app_core/lib/modules/verify_otp/bloc/verify_otp_event.dart (1)

33-47: Consider using final keyword for consistency.

The SetEmailEvent, StartTimerEvent, and TimerFinishedEvent classes use class instead of final class. For consistency with other events in the file, consider using final class.

-class SetEmailEvent extends VerifyOTPEvent {
+final class SetEmailEvent extends VerifyOTPEvent {
   const SetEmailEvent(this.email);
   final String email;

   @override
   List<Object> get props => [email];
 }

-class StartTimerEvent extends VerifyOTPEvent {
+final class StartTimerEvent extends VerifyOTPEvent {
   const StartTimerEvent();
 }

-class TimerFinishedEvent extends VerifyOTPEvent {
+final class TimerFinishedEvent extends VerifyOTPEvent {
   const TimerFinishedEvent();
 }
apps/app_core/lib/modules/verify_otp/bloc/verify_otp_bloc.dart (1)

36-37: Document hardcoded OTP for development testing.

Based on the retrieved learning, the team uses static OTP validation for testing. Consider adding a comment explaining this is for development purposes and should be replaced with actual API integration.

  // Static OTP check for now
+ // TODO: Replace with actual API call to verifyOTP when backend is ready
+ // Using hardcoded value "222222" for development testing
  if (state.otp.value == '222222') {
.trae/rules/project_rules.md (3)

1-16: Resolve repeated “## Overview” headings

## Overview appears at least four times. Markdown-lint (MD024) flags this, and duplicated anchors break in-page linking.

Either:

  1. Promote the later instances to a deeper level (###) to reflect their local scope, or
  2. Replace the text with section-specific titles (e.g. “## Asset Management – Overview”, “## Atomic Design – Overview”).

This keeps the document navigable and avoids anchor collisions.

Also applies to: 221-224, 759-762


32-45: Add language identifiers to fenced blocks (MD040)

Several code fences omit a language tag, hurting syntax highlighting & tooling:

-``` 
+```text
   app_ui/
   └── assets/

Apply an appropriate tag (text, bash, yaml, etc.) to all unlabeled fences – notably the directory-tree examples around lines 32-45 and 1357-1370.

Also applies to: 1357-1370


322-347: Use proper heading levels instead of italic-bold pseudo-headings (MD036)

Examples such as ### Spacing Rules are introduced with italic markers (**❌ NEVER …** / **✅ ALWAYS …**) rather than real headings, making the hierarchy inconsistent and harder to scan.

Convert these to true headings:

-### 🛰️ Atoms (Basic Building Blocks)
+#### 🛰️ Atoms (Basic Building Blocks)

Then keep the admonition bullets underneath.
This satisfies markdown-lint and improves accessibility for screen readers.

Also applies to: 370-387, 385-417

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1809f68 and fd4c8ca.

⛔ Files ignored due to path filters (1)
  • packages/widgetbook/pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (43)
  • .cursor/rules/assets-rules.mdc (1 hunks)
  • .cursor/rules/atomic-design-rule.mdc (1 hunks)
  • .cursor/rules/auto-route.mdc (1 hunks)
  • .cursor/rules/bloc.mdc (1 hunks)
  • .cursor/rules/color.mdc (1 hunks)
  • .cursor/rules/flutter-dart.mdc (1 hunks)
  • .cursor/rules/structure.mdc (1 hunks)
  • .github/ISSUE_TEMPLATE/bug_report.md (1 hunks)
  • .trae/rules/project_rules.md (1 hunks)
  • BOILERPLATE/COUNTER (1 hunks)
  • apps/app_core/lib/app/config/api_endpoints.dart (1 hunks)
  • apps/app_core/lib/app/routes/app_router.dart (3 hunks)
  • apps/app_core/lib/core/data/services/firebase_remote_config_service.dart (2 hunks)
  • apps/app_core/lib/modules/auth/model/auth_request_model.dart (4 hunks)
  • apps/app_core/lib/modules/auth/repository/auth_repository.dart (5 hunks)
  • apps/app_core/lib/modules/auth/sign_in/screens/sign_in_screen.dart (5 hunks)
  • apps/app_core/lib/modules/auth/sign_up/screens/sign_up_screen.dart (1 hunks)
  • apps/app_core/lib/modules/change_password/screen/change_password_screen.dart (5 hunks)
  • apps/app_core/lib/modules/forgot_password/bloc/forgot_password_bloc.dart (1 hunks)
  • apps/app_core/lib/modules/forgot_password/bloc/forgot_password_event.dart (1 hunks)
  • apps/app_core/lib/modules/forgot_password/bloc/forgot_password_state.dart (1 hunks)
  • apps/app_core/lib/modules/forgot_password/screens/forgot_password_screen.dart (1 hunks)
  • apps/app_core/lib/modules/home/screen/home_screen.dart (5 hunks)
  • apps/app_core/lib/modules/profile/screen/edit_profile_screen.dart (3 hunks)
  • apps/app_core/lib/modules/subscription/screen/subscription_screen.dart (1 hunks)
  • apps/app_core/lib/modules/verify_otp/bloc/verify_otp_bloc.dart (1 hunks)
  • apps/app_core/lib/modules/verify_otp/bloc/verify_otp_event.dart (1 hunks)
  • apps/app_core/lib/modules/verify_otp/bloc/verify_otp_state.dart (1 hunks)
  • apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart (1 hunks)
  • apps/app_core/pubspec.yaml (2 hunks)
  • melos.yaml (1 hunks)
  • packages/app_translations/assets/i18n/en.i18n.json (1 hunks)
  • packages/app_ui/lib/src/widgets/molecules/app_otp_input.dart (1 hunks)
  • packages/app_ui/lib/src/widgets/molecules/app_textfield.dart (7 hunks)
  • packages/app_ui/lib/src/widgets/molecules/app_timer.dart (1 hunks)
  • packages/app_ui/lib/src/widgets/molecules/molecules.dart (1 hunks)
  • packages/app_ui/pubspec.yaml (1 hunks)
  • packages/widgetbook/lib/widgets/atoms/app_border_radius.dart (3 hunks)
  • packages/widgetbook/lib/widgets/atoms/app_text.dart (3 hunks)
  • packages/widgetbook/lib/widgets/atoms/padding.dart (2 hunks)
  • packages/widgetbook/lib/widgets/atoms/spacing.dart (3 hunks)
  • packages/widgetbook/lib/widgets/organisms/app_scaffold.dart (1 hunks)
  • packages/widgetbook/pubspec_overrides.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (12)
packages/app_ui/lib/src/widgets/molecules/molecules.dart (1)
Learnt from: tulsi-7span
PR: 7span/dashing-kit#56
File: apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart:98-112
Timestamp: 2025-06-26T11:54:23.406Z
Learning: In the verify OTP screen (apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart), the team uses static OTP validation with hardcoded value "222222" for testing success states during development, rather than calling the actual API verification.
apps/app_core/lib/app/routes/app_router.dart (1)
Learnt from: tulsi-7span
PR: 7span/dashing-kit#56
File: apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart:98-112
Timestamp: 2025-06-26T11:54:23.406Z
Learning: In the verify OTP screen (apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart), the team uses static OTP validation with hardcoded value "222222" for testing success states during development, rather than calling the actual API verification.
apps/app_core/lib/app/config/api_endpoints.dart (1)
Learnt from: tulsi-7span
PR: 7span/dashing-kit#56
File: apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart:98-112
Timestamp: 2025-06-26T11:54:23.406Z
Learning: In the verify OTP screen (apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart), the team uses static OTP validation with hardcoded value "222222" for testing success states during development, rather than calling the actual API verification.
apps/app_core/lib/modules/change_password/screen/change_password_screen.dart (1)
Learnt from: tulsi-7span
PR: 7span/dashing-kit#56
File: apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart:98-112
Timestamp: 2025-06-26T11:54:23.406Z
Learning: In the verify OTP screen (apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart), the team uses static OTP validation with hardcoded value "222222" for testing success states during development, rather than calling the actual API verification.
apps/app_core/lib/modules/verify_otp/bloc/verify_otp_state.dart (1)
Learnt from: tulsi-7span
PR: 7span/dashing-kit#56
File: apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart:98-112
Timestamp: 2025-06-26T11:54:23.406Z
Learning: In the verify OTP screen (apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart), the team uses static OTP validation with hardcoded value "222222" for testing success states during development, rather than calling the actual API verification.
packages/app_ui/lib/src/widgets/molecules/app_otp_input.dart (1)
Learnt from: tulsi-7span
PR: 7span/dashing-kit#56
File: apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart:98-112
Timestamp: 2025-06-26T11:54:23.406Z
Learning: In the verify OTP screen (apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart), the team uses static OTP validation with hardcoded value "222222" for testing success states during development, rather than calling the actual API verification.
apps/app_core/lib/modules/forgot_password/screens/forgot_password_screen.dart (1)
Learnt from: tulsi-7span
PR: 7span/dashing-kit#56
File: apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart:98-112
Timestamp: 2025-06-26T11:54:23.406Z
Learning: In the verify OTP screen (apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart), the team uses static OTP validation with hardcoded value "222222" for testing success states during development, rather than calling the actual API verification.
apps/app_core/lib/modules/auth/model/auth_request_model.dart (1)
Learnt from: tulsi-7span
PR: 7span/dashing-kit#56
File: apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart:98-112
Timestamp: 2025-06-26T11:54:23.406Z
Learning: In the verify OTP screen (apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart), the team uses static OTP validation with hardcoded value "222222" for testing success states during development, rather than calling the actual API verification.
apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart (1)
Learnt from: tulsi-7span
PR: 7span/dashing-kit#56
File: apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart:98-112
Timestamp: 2025-06-26T11:54:23.406Z
Learning: In the verify OTP screen (apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart), the team uses static OTP validation with hardcoded value "222222" for testing success states during development, rather than calling the actual API verification.
apps/app_core/lib/modules/verify_otp/bloc/verify_otp_event.dart (1)
Learnt from: tulsi-7span
PR: 7span/dashing-kit#56
File: apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart:98-112
Timestamp: 2025-06-26T11:54:23.406Z
Learning: In the verify OTP screen (apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart), the team uses static OTP validation with hardcoded value "222222" for testing success states during development, rather than calling the actual API verification.
apps/app_core/lib/modules/verify_otp/bloc/verify_otp_bloc.dart (1)
Learnt from: tulsi-7span
PR: 7span/dashing-kit#56
File: apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart:98-112
Timestamp: 2025-06-26T11:54:23.406Z
Learning: In the verify OTP screen (apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart), the team uses static OTP validation with hardcoded value "222222" for testing success states during development, rather than calling the actual API verification.
apps/app_core/lib/modules/auth/repository/auth_repository.dart (1)
Learnt from: tulsi-7span
PR: 7span/dashing-kit#56
File: apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart:98-112
Timestamp: 2025-06-26T11:54:23.406Z
Learning: In the verify OTP screen (apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart), the team uses static OTP validation with hardcoded value "222222" for testing success states during development, rather than calling the actual API verification.
🪛 LanguageTool
.trae/rules/project_rules.md

[style] ~1247-~1247: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...e extensions using UpperCamelCase. 4. Name packages, directories, and source files...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~1248-~1248: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... using lowercase_with_underscores. 5. Name import prefixes using `lowercase_with_u...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~1249-~1249: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... using lowercase_with_underscores. 6. Name other identifiers using `lowerCamelCase...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~1280-~1280: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...that conceptually access properties. 7. Use setters for operations that conceptuall...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~1281-~1281: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...that conceptually change properties. 8. Use inclusive start and exclusive end param...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~1301-~1301: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...e collection literals when possible. 4. Use whereType() to filter a collection by...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~1306-~1306: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...f {} for empty constructor bodies. 9. Use rethrow to rethrow a caught exception...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~1341-~1341: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...rns to match arbitrary-length lists. 6. Use logical-or patterns (e.g., `case a || b...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~1349-~1349: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...e width of widgets like TextField. 4. If you get a "setState called during build...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~1350-~1350: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...g` directly inside the build method. 5. If you get "The ScrollController is attach...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~1351-~1351: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ached to a single scrollable widget. 6. If you get a "RenderBox was not laid out" ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🪛 markdownlint-cli2 (0.17.2)
.trae/rules/project_rules.md

32-32: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


95-95: Tables should be surrounded by blank lines

(MD058, blanks-around-tables)


104-104: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


111-111: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


221-221: Multiple headings with the same content

(MD024, no-duplicate-heading)


322-322: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


330-330: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


371-371: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


385-385: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


714-714: Multiple headings with the same content

(MD024, no-duplicate-heading)


759-759: Multiple headings with the same content

(MD024, no-duplicate-heading)


762-762: Multiple headings with the same content

(MD024, no-duplicate-heading)


769-769: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


782-782: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


844-844: Trailing punctuation in heading
Punctuation: '.'

(MD026, no-trailing-punctuation)


856-856: Multiple headings with the same content

(MD024, no-duplicate-heading)


858-858: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


866-866: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


873-873: Trailing punctuation in heading
Punctuation: ':'

(MD026, no-trailing-punctuation)


879-879: Multiple headings with the same content

(MD024, no-duplicate-heading)


1213-1213: Multiple headings with the same content

(MD024, no-duplicate-heading)


1243-1243: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


1357-1357: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


1366-1366: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (85)
BOILERPLATE/COUNTER (1)

2-2: Counter bump acknowledged – no concerns.
The increment is isolated and poses no risk to functionality.

packages/app_ui/pubspec.yaml (1)

22-22: Verify pinput 5.x doesn’t break your current min-SDK & transitive deps

pinput 5.x pulls in native platform code and several indirect packages. Please run a flutter pub deps --style=compact (or CI equivalent) to ensure there are no version skews with existing packages such as intl, platform, or collection, and that your min Android/iOS SDK levels remain satisfied.

apps/app_core/pubspec.yaml (2)

93-93: Whitespace-only change – nothing to review.


125-126: Same as above.

melos.yaml (1)

42-42: Helpful clarification added – looks good

The extended description makes the script usage clearer for puro/fvm users.

apps/app_core/lib/modules/auth/sign_up/screens/sign_up_screen.dart (1)

40-41: CustomAppBar swap LGTM, but double-check default theming

AppScaffold sometimes applies its own background / elevation defaults. Ensure CustomAppBar() aligns with those (status-bar brightness, system-overlay style) so you don’t end up with mixed themes between screens.

packages/widgetbook/pubspec_overrides.yaml (1)

1-5: LGTM! Clean dependency management.

Removing the unused skeletonizer dependency override aligns with the UI consolidation effort mentioned in the PR objectives. This cleanup helps maintain a leaner dependency structure.

packages/widgetbook/lib/widgets/atoms/padding.dart (2)

4-4: LGTM! Import formatting improvement.

The single-line import format is more concise and maintains the same functionality.


49-49: LGTM! UI consistency improvement.

Replacing the standard AppBar with CustomAppBar aligns with the project's UI standardization effort mentioned in the PR objectives. This ensures consistent app bar styling across the application.

apps/app_core/lib/modules/subscription/screen/subscription_screen.dart (1)

51-51: LGTM! Consistent app bar implementation.

The replacement of AppBar with CustomAppBar maintains the same title and centering behavior while ensuring UI consistency across the application. This change aligns with the project's standardization efforts.

packages/widgetbook/lib/widgets/atoms/app_text.dart (3)

4-4: LGTM! Import formatting improvement.

The single-line import format is cleaner and more concise.


42-42: LGTM! Code formatting improvement.

The single-line format for the knobs.color call is more concise while maintaining the same functionality.


66-66: LGTM! UI consistency improvement.

The replacement of AppBar with CustomAppBar ensures consistent app bar styling across the widgetbook examples and the main application.

packages/app_ui/lib/src/widgets/molecules/molecules.dart (1)

7-7: Exports Verified: LGTM

Both app_otp_input.dart and app_timer.dart exist and are correctly exported to expose the new OTP input and timer widgets:

  • packages/app_ui/lib/src/widgets/molecules/app_otp_input.dart
  • packages/app_ui/lib/src/widgets/molecules/app_timer.dart

These exports properly support the authentication features in the PR.

LGTM! 🎉

apps/app_core/lib/app/config/api_endpoints.dart (1)

4-5: Confirm backend support for new API endpoints

The new /api/v1/forgot-password and /api/v1/verify-otp routes are correctly declared in
apps/app_core/lib/app/config/api_endpoints.dart and are wired into:

  • apps/app_core/lib/modules/auth/repository/auth_repository.dart
    makeForgotPasswordRequest uses ApiEndpoints.forgotPassword
    makeVerifyOTPRequest uses ApiEndpoints.verifyOTP
  • apps/app_core/lib/modules/verify_otp/bloc/verify_otp_bloc.dart
  • apps/app_core/lib/modules/forgot_password/bloc/forgot_password_bloc.dart
  • apps/app_core/lib/modules/auth/model/auth_request_model.dart

Please verify these endpoints are implemented and tested on the backend service before deployment.

apps/app_core/lib/core/data/services/firebase_remote_config_service.dart (3)

2-2: Good addition of logger import.

The import of logger_helper.dart supports the new error handling in the initialize method.


28-40: Excellent config restructuring.

The consolidated JSON structure with nested platform-specific objects is much cleaner and more maintainable than separate key-value pairs. This aligns well with the documented Firebase console format.


44-51: Good addition of error handling.

The try-catch block around the initialization steps is a solid improvement that prevents app crashes from Firebase Remote Config failures. The error logging will help with debugging.

packages/widgetbook/lib/widgets/atoms/spacing.dart (2)

4-4: Import formatting improved.

The single-line import statement is cleaner and more readable.


41-41: Widget constructor simplification approved.

The removal of explicit child: labels and consolidation to single lines improves code readability without affecting functionality.

Also applies to: 43-43, 80-80, 82-82

packages/widgetbook/lib/widgets/atoms/app_border_radius.dart (4)

4-4: Import formatting improved.

The single-line import statement improves readability.


6-6: Annotation formatting improved.

The single-line annotation is cleaner and more consistent.


41-41: CustomAppBar usage approved.

The replacement with CustomAppBar aligns with the project-wide UI standardization. The CustomAppBar verification from the previous file applies here as well.


52-52: Text widget simplification approved.

The single-line Text widget constructor is cleaner and more readable.

apps/app_core/lib/app/routes/app_router.dart (3)

27-28: New routes integrated correctly.

The new routes for forgot password and verify OTP are properly added to the router configuration and follow the established pattern.


39-39: Route formatting improved.

The single-line format for the ChangePasswordRoute is cleaner and more consistent with the other route definitions.


7-7: Approve new screen imports: verified screens exist

Verified that both forgot_password_screen.dart and verify_otp_screen.dart are present and define the expected widgets:

  • apps/app_core/lib/modules/forgot_password/screens/forgot_password_screen.dart declares class ForgotPasswordPage
  • apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart declares class VerifyOTPScreen

No further changes required.

packages/app_translations/assets/i18n/en.i18n.json (1)

57-67: Translation keys look good and follow existing patterns.

The new translation keys for password reset and OTP verification flows are well-structured and follow the existing naming conventions. The JSON syntax is correct and the values are appropriate for their intended use.

apps/app_core/lib/modules/auth/sign_in/screens/sign_in_screen.dart (3)

30-30: Good formatting improvement.

The BlocProvider creation is now more concise and readable.


68-83: Forgot password link implementation looks good.

The new AnimatedGestureDetector properly handles navigation to the ForgotPasswordRoute with appropriate styling and alignment. The implementation follows Flutter best practices with proper context usage.


93-93: Platform check for Apple button is appropriate.

The conditional rendering of the Apple Sign In button only on iOS platforms is correct and follows platform-specific guidelines.

.cursor/rules/color.mdc (1)

1-36: Good documentation for color usage consistency.

The rule file provides clear guidance on using context.colorScheme for colors and AppText for typography, which promotes consistency across the codebase.

apps/app_core/lib/modules/profile/screen/edit_profile_screen.dart (3)

22-23: Good formatting improvement for repository providers.

The single-line format for RepositoryProvider declarations is more concise and readable.


54-54: CustomAppBar usage aligns with project standards.

The replacement of AppBar with CustomAppBar follows the UI consistency rules established in the project.


62-62: Column children formatting is improved.

The single-line format for the children list is more concise and maintains readability.

apps/app_core/lib/modules/home/screen/home_screen.dart (3)

40-42: Good use of cascade notation for ProfileCubit.

The single-line format with cascade notation for calling fetchProfileDetail() is more concise and readable.


73-73: CustomAppBar usage maintains consistency.

The replacement of AppBar with CustomAppBar follows the established UI consistency patterns in the project.


88-88: Widget constructor formatting improved.

The single-line format for the _ListWidget constructor is more concise while maintaining readability.

apps/app_core/lib/modules/forgot_password/bloc/forgot_password_event.dart (1)

1-22: LGTM! Clean BLoC event implementation.

The event classes follow BLoC pattern best practices with proper sealed class hierarchy, Equatable implementation, and immutable design. The ForgotPasswordEmailChanged correctly includes the email property in props for equality comparison.

apps/app_core/lib/modules/change_password/screen/change_password_screen.dart (3)

20-20: Good design system consistency.

Replacing the default AppBar with CustomAppBar aligns with the project's design system standards and ensures consistent UI styling across the application.


25-25: Clean code formatting.

The condensed callback formatting improves readability while maintaining the same functionality.


47-48: Consistent widget constructor formatting.

The simplified widget constructors maintain the same functionality while improving code readability and consistency.

apps/app_core/lib/modules/forgot_password/bloc/forgot_password_state.dart (1)

3-27: Well-implemented BLoC state class.

The state class follows BLoC pattern best practices with proper immutability, Equatable implementation, and comprehensive field management. The copyWith method enables efficient state updates while maintaining immutability.

packages/app_ui/lib/src/widgets/molecules/app_timer.dart (3)

6-14: Good widget design with proper assertion.

The constructor properly validates input with an assertion and follows Flutter widget conventions. The optional onFinished callback provides good extensibility.


52-56: Proper resource cleanup.

The dispose method correctly cancels the timer to prevent memory leaks. Good lifecycle management.


58-65: Clean time formatting logic.

The MM:SS formatting is implemented correctly with proper padding. The UI styling follows the app's design system.

packages/app_ui/lib/src/widgets/molecules/app_otp_input.dart (3)

6-12: Clean widget interface design.

The widget parameters are well-designed with sensible defaults and proper typing. The interface is intuitive for OTP input usage.


14-22: Good Pinput configuration.

The Pinput configuration is appropriate with digit-only formatting and proper spacing. The error text handling follows expected patterns.


20-20: Security-conscious input filtering.

Using FilteringTextInputFormatter.digitsOnly is a good security practice to prevent non-digit input, which is appropriate for OTP fields.

packages/widgetbook/lib/widgets/organisms/app_scaffold.dart (5)

4-4: LGTM: Import addition for widgetbook annotations

The import for widgetbook_annotation is correctly added to support the @widgetbook.UseCase annotation.


6-6: LGTM: Annotation formatting improvement

The single-line formatting of the @widgetbook.UseCase annotation improves readability while maintaining functionality.


13-13: LGTM: Standardization with CustomAppBar

The replacement of AppBar with CustomAppBar aligns with the project's UI standardization efforts mentioned in the summary. This ensures consistent theming across all components.


18-18: LGTM: Improved list formatting

The single-line formatting of the color options list improves code compactness without affecting functionality.


24-37: LGTM: Enhanced code compactness

The formatting improvements for BottomNavigationBar items and FloatingActionButton make the code more readable and compact while preserving all functionality.

apps/app_core/lib/modules/verify_otp/bloc/verify_otp_state.dart (3)

5-13: LGTM: Well-structured immutable state class

The VerifyOTPState class properly implements immutable state with sensible default values. The use of final class modifier and comprehensive field initialization follows best practices.


15-31: LGTM: Proper copyWith implementation

The copyWith method correctly implements immutable state updates, allowing selective field updates while maintaining immutability.


33-44: LGTM: Comprehensive state fields and validation

The state includes all necessary fields for OTP verification:

  • Separate API statuses for resend and verify operations
  • Email and error message handling
  • OTP validation with proper length constraint (6 digits)
  • Timer state management
  • Computed isValid property for form validation

The Equatable props are correctly defined for value equality comparison.

.cursor/rules/auto-route.mdc (5)

1-8: LGTM: Proper documentation metadata

The frontmatter correctly sets up the rule with appropriate metadata for global application.


14-30: LGTM: Clear annotation guidelines

The rule clearly establishes the requirement for @RoutePage() annotation with a practical example for simple screens.


32-69: LGTM: Comprehensive BLoC integration pattern

The example demonstrates proper implementation of AutoRouteWrapper with:

  • Correct repository and BLoC provider setup
  • Proper dependency injection pattern
  • Lazy loading configuration
  • Event initialization with safeAdd

This follows established BLoC patterns and ensures proper state management integration.


94-104: LGTM: Important conflict avoidance guidance

The recommendation to use BackButtonListener instead of PopScope is crucial for preventing Auto Route conflicts. This guidance could save developers from common navigation issues.


106-157: LGTM: Practical implementation guidance

The checklists and common patterns provide actionable guidance for developers. The inclusion of route guards, initial route configuration, and build runner commands ensures comprehensive implementation coverage.

packages/app_ui/lib/src/widgets/molecules/app_textfield.dart (3)

12-12: LGTM: Well-implemented parameter additions

The addition of isReadOnly and maxLength parameters enhances the widget's functionality while maintaining backward compatibility:

  • Both parameters are optional with sensible defaults
  • Consistently added to both default and password constructors
  • Properly typed (bool? for isReadOnly, int? for maxLength)

Also applies to: 24-24, 42-42, 46-46, 53-53, 68-68


104-104: LGTM: Proper parameter usage in build method

The build method correctly implements the new parameters:

  • isReadOnly defaults to false when null, ensuring safe usage
  • maxLength is directly passed to the TextFormField
  • Both parameters integrate seamlessly with existing functionality

Also applies to: 107-107


94-94: LGTM: Formatting improvements enhance readability

The formatting changes improve code readability:

  • Single-line label display condition is more concise
  • Content padding adjustment adds proper right padding
  • Suffix icon conditional formatting is cleaner and more readable

Also applies to: 112-115, 125-135

.cursor/rules/flutter-dart.mdc (5)

10-21: LGTM: Comprehensive naming conventions

The naming conventions section provides clear, specific guidelines that align with Dart's official style guide. The rules cover all identifier types and include helpful guidance on abbreviations and descriptive naming.


22-39: LGTM: Solid architectural guidelines

The architecture section establishes clear layer separation and emphasizes important principles:

  • Proper three-layer architecture (Presentation, Business Logic, Data)
  • Repository pattern implementation
  • Functional error handling with fpdart
  • Loose coupling between components

The inclusion of functional programming patterns with TaskEither and chaining operations shows modern Flutter development practices.


82-91: LGTM: Practical Flutter best practices

The Flutter-specific guidelines provide actionable advice for common development scenarios:

  • Widget extraction and stateless widget preference
  • Performance considerations (const constructors, build method optimization)
  • State management locality
  • Pagination guidance for large datasets

92-111: LGTM: Modern Dart 3 feature guidance

The sections on records and patterns provide valuable guidance for modern Dart development:

  • Clear explanation of record syntax and usage
  • Pattern matching examples and best practices
  • Proper use cases for records vs classes
  • Exhaustiveness checking with sealed classes

112-120: LGTM: Valuable error troubleshooting guide

The common Flutter errors section provides practical solutions for frequent development issues:

  • RenderFlex overflow solutions
  • Viewport height constraints
  • ScrollController management
  • Layout debugging guidance

This section could save developers significant debugging time.

apps/app_core/lib/modules/forgot_password/screens/forgot_password_screen.dart (1)

1-104: LGTM! Well-structured forgot password screen implementation.

The implementation follows Flutter best practices with proper BLoC pattern usage, repository provider setup, and clean separation of concerns. The screen correctly handles state management, navigation flow, and uses typed asset references and localized strings throughout.

apps/app_core/lib/modules/auth/model/auth_request_model.dart (3)

13-16: LGTM! Well-designed named constructors for new authentication flows.

The named constructors properly enforce required parameters for their specific use cases and follow the existing class patterns.


25-25: LGTM! Necessary field addition for OTP functionality.

The token field addition is required for OTP verification and is appropriately nullable.


36-61: LGTM! Proper serialization methods for new authentication flows.

The serialization methods correctly map only the relevant fields for their specific use cases, maintaining clean separation of concerns.

apps/app_core/lib/modules/forgot_password/bloc/forgot_password_bloc.dart (1)

14-43: LGTM! Excellent BLoC implementation following best practices.

The bloc correctly implements:

  • Proper dependency injection with repository interface
  • Email validation using existing validators
  • Async operation handling with TaskEither pattern
  • State management with immutable updates
  • Clean separation of email change and submission logic
.cursor/rules/assets-rules.mdc (1)

1-227: LGTM! Comprehensive and well-structured asset management documentation.

This documentation provides excellent guidance for type-safe asset management using flutter_gen. It includes:

  • Clear examples of correct and incorrect usage patterns
  • Proper directory structure guidelines
  • Migration instructions from raw strings
  • Troubleshooting guidance
  • Best practices and naming conventions

The documentation will help maintain consistency and type safety across the project.

apps/app_core/lib/modules/verify_otp/screens/verify_otp_screen.dart (4)

13-32: LGTM! Proper AutoRouteWrapper implementation with BLoC setup.

The screen correctly implements the AutoRouteWrapper pattern with proper repository and bloc provider setup, including initialization of the bloc with the email address.


45-45: Verify hardcoded OTP value is intended for development only.

The hardcoded OTP value "222222" appears to be for testing purposes during development. Based on the retrieved learnings, this is intentional for testing success states, but ensure this is properly handled before production deployment.

Please confirm this hardcoded OTP validation is only for development/testing and will be replaced with actual API verification in production.


81-89: LGTM! Well-implemented timer functionality.

The timer implementation properly manages the 30-second countdown and triggers the appropriate bloc event when finished, following good reactive programming patterns.


52-124: LGTM! Clean UI structure with proper state management.

The UI implementation follows good patterns with:

  • Proper BlocConsumer usage for state management
  • Clean layout with consistent spacing
  • Proper use of typed assets and localized strings
  • Appropriate button state management based on timer
  • Good navigation flow
apps/app_core/lib/modules/auth/repository/auth_repository.dart (1)

22-27: LGTM: Interface properly extended with new authentication methods.

The interface additions follow the existing pattern using TaskEither<Failure, T> for functional error handling. The method signatures are consistent with the repository's design.

.cursor/rules/structure.mdc (1)

1-183: Excellent comprehensive project structure documentation.

This documentation provides clear, well-organized guidelines for:

  • Feature folder structure with 4-folder architecture
  • Repository pattern implementation using TaskEither
  • Naming conventions and best practices
  • Code organization and error handling strategies

The examples are practical and align with the functional programming patterns used in the codebase.

.cursor/rules/atomic-design-rule.mdc (1)

1-547: Comprehensive UI development guidelines following atomic design principles.

This documentation excellently covers:

  • Atomic design pattern implementation
  • Translation usage with context.t
  • Spacing and button standardization
  • Migration guides from legacy patterns
  • Best practices for performance and consistency

The examples are practical and enforce consistent UI patterns across the application.

apps/app_core/lib/modules/verify_otp/bloc/verify_otp_event.dart (1)

1-48: Well-structured event definitions following BLoC best practices.

The event classes properly:

  • Use sealed base class for type safety
  • Extend Equatable for value comparison
  • Follow consistent naming conventions
  • Cover all necessary user interactions for OTP verification
apps/app_core/lib/modules/verify_otp/bloc/verify_otp_bloc.dart (1)

68-81: Robust error handling in resend email flow.

The resend email implementation properly:

  • Handles both success and failure cases
  • Updates state appropriately for each scenario
  • Triggers timer restart on success
  • Uses functional programming patterns with TaskEither

@cavin-7span cavin-7span merged commit 8777cf3 into main Jul 17, 2025
1 check passed
@cavin-7span cavin-7span deleted the feat/ai-editor-project-rules branch July 17, 2025 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants