A Flutter mobile application for browsing and booking hotel rooms. Built with clean architecture principles and Riverpod state management.
- Authentication: Mock login with session persistence
- Room Browsing: View available rooms with search and filter options
- Room Details: Detailed view with amenities, pricing, and ratings
- Booking Flow: Select dates, check availability, and confirm bookings
- My Bookings: View upcoming, current, and past bookings with cancellation option
| Screen | Description |
|---|---|
| Login | Mock authentication with demo credentials |
| Home | Room listing with search and filter options |
| Room Details | Detailed view with amenities and pricing |
| Confirmation | Date selection and booking summary |
| My Bookings | View and manage your bookings |
- Framework: Flutter 3.38.2
- State Management: Riverpod
- Local Storage: Hive
- Navigation: go_router
- Error Handling: dartz (Either pattern)
- Flutter SDK (3.38.2 or higher)
- Dart SDK (3.0.0 or higher)
- Android Studio / VS Code with Flutter extensions
- iOS Simulator / Android Emulator or physical device
git clone <repository-url>
cd room_booking_appflutter pub getdart run build_runner build --delete-conflicting-outputs# For debug mode
flutter run
# For release mode
flutter run --releaseflutter build apk --releaseThe APK will be generated at build/app/outputs/flutter-apk/app-release.apk
Use the following credentials to log in:
| Password | |
|---|---|
| demo@example.com | password123 |
| test@example.com | test123 |
lib/
├── core/
│ ├── constants/ # App constants
│ ├── errors/ # Failure classes
│ ├── theme/ # Colors, text styles
│ ├── utils/ # Validators, date utils
│ └── widgets/ # Reusable widgets
├── features/
│ ├── auth/ # Authentication
│ │ ├── data/
│ │ ├── domain/
│ │ └── presentation/
│ ├── bookings/ # Booking management
│ │ ├── data/
│ │ ├── domain/
│ │ └── presentation/
│ └── rooms/ # Room browsing
│ ├── data/
│ ├── domain/
│ └── presentation/
├── routes/ # App navigation
└── main.dart # Entry point
assets/
└── mock/ # Mock JSON data
├── rooms.json
└── users.json
The app follows a feature-based clean architecture:
- Data Layer: Datasources and repositories for data operations
- Domain Layer: Models and business entities
- Presentation Layer: Screens, providers, and widgets
For detailed architecture documentation, see architecture-notes.txt.
StateNotifierProviderfor complex state (auth, booking form)FutureProviderfor async data fetchingStateProviderfor simple reactive values
- User session stored in Hive
- Bookings persisted locally
- Mock data loaded from JSON assets
- Either pattern for operation results
- Visual feedback for errors
- Graceful degradation
# Run all tests
flutter test
# Run with coverage
flutter test --coverageIf you encounter issues with generated files:
flutter clean
flutter pub get
dart run build_runner build --delete-conflicting-outputsEnsure you have Xcode installed and configured:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunchEnsure Android SDK is properly configured:
flutter doctorThis project is created for demonstration purposes as part of a technical assignment.




