Skip to content

Release/1#7

Merged
bella-247 merged 5 commits into
mainfrom
release/1
Apr 5, 2026
Merged

Release/1#7
bella-247 merged 5 commits into
mainfrom
release/1

Conversation

@bella-247
Copy link
Copy Markdown
Member

@bella-247 bella-247 commented Apr 5, 2026

This pull request introduces foundational improvements and best practices for a beginner-friendly Flutter project, including complete onboarding documentation, a robust API and network layer, consistent routing, and a shared design system. The changes are grouped below by theme.

Documentation and Onboarding

  • Added a comprehensive flutter-development-guide.md covering project scope, recommended dependencies, folder structure, backend contract checklist, build plan, and common mistakes, tailored for beginners working on a class project.
  • Updated README.md with a clear folder structure, widget suggestions per page, project rules, and setup instructions for running with a mock backend.

Core Infrastructure: Network and Configuration

  • Introduced Env class in lib/core/config/env.dart to provide environment-aware backend base URLs, supporting both web and emulator scenarios.
  • Implemented a Riverpod-powered dioProvider in lib/core/network/dio_client.dart, including a secure storage-based token interceptor for authenticated requests.
  • Added ApiService class in lib/core/network/api_service.dart with typed methods for authentication, services, and appointments, plus robust error handling and response mapping.

Routing and Navigation

  • Established a central route naming convention in lib/core/router/route_names.dart for both client and admin flows.
  • Created a Riverpod-based appRouterProvider in lib/core/router/app_router.dart, handling authentication state, role-based redirects, and error fallback routes using GoRouter.

Design System

  • Added AppColors in lib/core/shared_widgets/app_colors.dart, defining a consistent color palette for primary, accent, background, text, and feedback states.

Tooling

  • Added VSCode workspace settings to auto-approve Dart terminal actions for a smoother development experience. (.vscode/settings.json)

Summary by CodeRabbit

  • New Features

    • Added user authentication system with role-based access control
    • Enabled service browsing and appointment booking functionality
    • Added admin dashboard for scheduling oversight and service management
    • Implemented appointment tracking and booking history
    • Added navigation system with role-based routing (client/admin)
  • Chores

    • Added project infrastructure, theme, and color system
    • Configured mock API backend for development
    • Integrated state management and HTTP client libraries

- Created demo_seed_data.dart for mock services and appointments.
- Implemented validators.dart for form validation (required fields, email, password).
- Added AdminBottomNav and ClientBottomNav widgets for navigation.
- Introduced ErrorView and LoadingView widgets for better user feedback.
- Added SectionHeader widget for consistent section titles.
- Updated generated_plugin_registrant.cc and generated_plugins.cmake for secure storage support on Linux and Windows.
- Updated pubspec.yaml to include dio, flutter_secure_storage, and intl dependencies.
- Added mvp_flutter_starter_guide.md for project structure and implementation guidance.
…ement

- Created package.json for mock API with json-server dependency.
- Implemented server.js to handle user authentication and appointment scheduling.
- Added endpoints for user login and fetching user appointments.
- Included middleware for request parsing and response formatting.

test: update widget test to verify app structure

- Refactored widget test to check for the main app widget.
- Removed counter-related tests and focused on app initialization.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 5, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3283141a-7c29-4b0f-90fe-d87c2c24d7f3

📥 Commits

Reviewing files that changed from the base of the PR and between 3c950f9 and dbb61cc.

⛔ Files ignored due to path filters (3)
  • assets/images/hair_model.png is excluded by !**/*.png
  • mock-api/package-lock.json is excluded by !**/package-lock.json
  • pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (51)
  • .gitignore
  • .vscode/settings.json
  • README.md
  • flutter-development-guide.md
  • lib/core/config/env.dart
  • lib/core/network/api_service.dart
  • lib/core/network/dio_client.dart
  • lib/core/router/app_router.dart
  • lib/core/router/route_names.dart
  • lib/core/shared_widgets/app_colors.dart
  • lib/core/storage/secure_storage_service.dart
  • lib/core/theme/app_theme.dart
  • lib/features/auth/data/models/auth_response_model.dart
  • lib/features/auth/data/models/login_request_model.dart
  • lib/features/auth/data/models/user_model.dart
  • lib/features/auth/providers/auth_provider.dart
  • lib/features/booking/data/models/appointment_model.dart
  • lib/features/booking/data/models/create_appointment_request_model.dart
  • lib/features/booking/providers/appointments_provider.dart
  • lib/features/services/data/models/service_model.dart
  • lib/features/services/providers/services_provider.dart
  • lib/main.dart
  • lib/pages/about_page.dart
  • lib/pages/admin_dashboard_page.dart
  • lib/pages/booking_page.dart
  • lib/pages/contact_page.dart
  • lib/pages/home_page.dart
  • lib/pages/login_page.dart
  • lib/pages/manage_services_page.dart
  • lib/pages/my_appointments_page.dart
  • lib/pages/not_found_page.dart
  • lib/pages/services_page.dart
  • lib/shared/data/demo_seed_data.dart
  • lib/shared/utils/validators.dart
  • lib/shared/widgets/admin_bottom_nav.dart
  • lib/shared/widgets/client_bottom_nav.dart
  • lib/shared/widgets/error_view.dart
  • lib/shared/widgets/loading_view.dart
  • lib/shared/widgets/section_header.dart
  • linux/flutter/generated_plugin_registrant.cc
  • linux/flutter/generated_plugins.cmake
  • macos/Flutter/GeneratedPluginRegistrant.swift
  • mock-api/db.json
  • mock-api/package.json
  • mock-api/server.js
  • mvp_flutter_starter_guide.md
  • pubspec.yaml
  • test/widget_test.dart
  • todo.md
  • windows/flutter/generated_plugin_registrant.cc
  • windows/flutter/generated_plugins.cmake

📝 Walkthrough

Walkthrough

This pull request introduces a complete Flutter MVP application for a service booking system. It adds project structure with core infrastructure (networking, routing, storage, theming), feature modules for authentication/services/bookings with Riverpod state management, multiple UI pages for client and admin roles, shared utilities and widgets, a mock backend with json-server, and comprehensive documentation guides.

Changes

Cohort / File(s) Summary
Project Configuration & Documentation
.gitignore, README.md, flutter-development-guide.md, mvp_flutter_starter_guide.md, todo.md
Added project overview, development guidelines, MVP starter guide, and task checklist. Excluded mock API dependencies from version control and updated .vscode settings for terminal tool approval.
App Entry & Theme
lib/main.dart, pubspec.yaml, lib/core/theme/app_theme.dart, lib/core/shared_widgets/app_colors.dart
Restructured app bootstrapping with Riverpod provider scope and router-based navigation. Added Material 3 theme with custom typography, button styles, input decoration, and comprehensive color palette.
Core Infrastructure
lib/core/config/env.dart, lib/core/network/dio_client.dart, lib/core/network/api_service.dart, lib/core/storage/secure_storage_service.dart
Established runtime environment configuration, Dio HTTP client with interceptors and token injection, API service layer with REST methods for auth/services/appointments, and secure token/role storage.
Routing & Navigation
lib/core/router/route_names.dart, lib/core/router/app_router.dart
Defined route constants for home, auth, client, and admin paths. Implemented role-based routing with redirect logic to enforce authentication and prevent unauthorized access.
Authentication Feature
lib/features/auth/data/models/auth_response_model.dart, lib/features/auth/data/models/login_request_model.dart, lib/features/auth/data/models/user_model.dart, lib/features/auth/providers/auth_provider.dart
Added auth DTOs (login request/response with user details) and Riverpod-based authentication state controller with login/logout flow and demo fallback for unimplemented backend.
Services Feature
lib/features/services/data/models/service_model.dart, lib/features/services/providers/services_provider.dart
Introduced service data model with JSON serialization and Riverpod providers for fetching and CRUD operations on services.
Booking Feature
lib/features/booking/data/models/appointment_model.dart, lib/features/booking/data/models/create_appointment_request_model.dart, lib/features/booking/providers/appointments_provider.dart
Added appointment data models with DateTime handling and Riverpod providers for creating/fetching user and admin appointments.
Client Pages
lib/pages/home_page.dart, lib/pages/login_page.dart, lib/pages/services_page.dart, lib/pages/booking_page.dart, lib/pages/my_appointments_page.dart, lib/pages/contact_page.dart, lib/pages/about_page.dart, lib/pages/not_found_page.dart
Implemented user-facing pages with form validation, async state handling, and navigation flows. Login page uses Riverpod and form validation; services, booking, and appointments pages consume providers and handle loading/error states.
Admin Pages
lib/pages/admin_dashboard_page.dart, lib/pages/manage_services_page.dart
Added admin dashboard showing metrics (revenue, completed appointments, today's schedule) and service management UI with edit/delete dialogs and inline form validation.
Shared Widgets & Utilities
lib/shared/widgets/client_bottom_nav.dart, lib/shared/widgets/admin_bottom_nav.dart, lib/shared/widgets/loading_view.dart, lib/shared/widgets/error_view.dart, lib/shared/widgets/section_header.dart, lib/shared/utils/validators.dart, lib/shared/data/demo_seed_data.dart
Created reusable UI components for navigation, loading/error states, and section headers. Added form validators and demo data for development/testing.
Mock Backend
mock-api/package.json, mock-api/server.js, mock-api/db.json
Set up Node.js json-server with custom endpoints for login (auto-role assignment), appointment filtering by user, and request validation middleware. Seeded with sample users, services, and appointments data.
Platform Plugin Registration
linux/flutter/generated_plugin_registrant.cc, linux/flutter/generated_plugins.cmake, macos/Flutter/GeneratedPluginRegistrant.swift, windows/flutter/generated_plugin_registrant.cc, windows/flutter/generated_plugins.cmake
Generated platform-specific plugin registrations for flutter_secure_storage on Linux, macOS, and Windows.
Tests
test/widget_test.dart
Updated widget test to use Riverpod provider scope and verify SharpCutApp widget tree instead of counter interaction test.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes


Hopping through code with glee, 🐰
Auth flows and services so free,
Riverpod's state so neat,
Router redirects, what a treat!
SharpCut's ready, can't you see?

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/1

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@bella-247 bella-247 merged commit d301425 into main Apr 5, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant