How dalpat98/barber-booking-app works
Purpose and runtime
This is a Flutter/Dart mobile client for discovering nearby barber shops, viewing their services/gallery/reviews, and selecting appointment slots. It is described as part of a larger fashion-recommendation concept, but this repository contains the barber-booking app UI and local data layer. It targets Android and iOS; run through Flutter from the repository root.
Entry points and host integration
Flutter starts at lib/main.dart, which composes the application and its screen flow. Native hosts bootstrap Flutter and register plugins:
• android/app/src/main/kotlin/com/example/basp/MainActivity.kt
• ios/Runner/AppDelegate.swift
• android/app/src/main/AndroidManifest.xml
The Android manifest and iOS app delegate are also the documented integration boundary for Google Maps API-key configuration.
Discovery and map stage
Map/location discovery is centered on the map screen and map-specific provider/model:
• lib/screens/mapsScreen.dart
• lib/Provider/map_data_provider.dart
• lib/core/Data_models/map_data_model.dart
This stage presents Google Maps preview and location/barber search, then supplies selected shop/map information to detail and booking-oriented UI. Map records appear to be sourced from bundled temporary JSON rather than a repository-visible backend: lib/Temporary_data/map_data.json.
Barber detail and catalog stage
Barber-specific content is represented separately from map data, including service offerings and comments/reviews:
• lib/core/Data_models/barber_data_from_map/barber_data_from_map_model.dart
• lib/core/Data_models/barber_data_from_map/service_mode.dart
• lib/core/Data_models/barber_data_from_map/comment_model.dart
lib/Provider/barber_data_from_map_provider.dart is the intended boundary for converting selected-map-barber context into detail data. A duplicated nested provider path, lib/Provider/barber_data_from_map_provider.dart/barber_data_from_map_provider.dart, should be treated carefully when tracing the effective implementation.
Detail presentation
Reusable detail sections split the barber profile into visual/gallery and service catalog views:
• lib/Views/gallerybody.dart
• lib/Views/serviceBody.dart
These views consume barber detail data and lead users toward choosing a service and starting booking, rather than owning discovery or native-map concerns.
Appointment flow
Booking is implemented as a screen-level workflow, with a separate appointment-oriented screen:
• lib/screens/bookingScreen.dart
• lib/screens/AppointmentScreen.dart
The intended control flow is map/search → barber detail/gallery/services → preferred time slot → appointment confirmation. The README advertises payment and discounts, but no explicit payment-service integration or backend API layer is present in the supplied tree; treat payment as UI/product scope until implementation is verified.
Data and service boundaries
The app’s visible data source is local fixture-style JSON:
• lib/Temporary_data/map_data.json
• lib/Temporary_data/barber_data_from_map.json
Providers isolate screens from these records, while models define the app’s domain shape. There is no visible server, authentication system, database, payment SDK, or API client, so availability, appointments, reviews, and pricing likely remain static/demo data unless dependencies reveal otherwise.
Infrastructure
Flutter is the primary runtime, with Gradle Android packaging under android/app/build.gradle and Xcode/iOS Runner packaging under ios/Runner.xcodeproj/project.pbxproj. Google Maps is the material external platform dependency and requires platform API-key setup. Internet connectivity is stated as a dependency, but no concrete remote service endpoint is represented in the repository tree.
Main entry points: barber_data_from_map_provider.dart Barber detail provider · mapsScreen.dart Map & discovery · map_data_provider.dart Map data provider · barber_data_from_map_model.dart Barber detail model
Components 18
Flutter app
- App entry & navigation · Composes the screen flow.
lib/main.dart - Map & discovery · Searches nearby barbers and shows a Google Maps preview.
lib/screens/mapsScreen.dart - Map data provider
lib/Provider/map_data_provider.dart - Barber detail provider · Transforms the selected map barber into detail content.
lib/Provider/barber_data_from_map_provider.dart - Gallery detail section
lib/Views/gallerybody.dart - Service catalog section · Lets users choose a service before booking.
lib/Views/serviceBody.dart - Booking workflow · Selects a preferred appointment slot.
lib/screens/bookingScreen.dart - Appointment confirmation
lib/screens/AppointmentScreen.dart
Local data layer
- Map record model
lib/core/Data_models/map_data_model.dart - Map fixture data · Bundled temporary discovery records.
lib/Temporary_data/map_data.json - Barber detail model
lib/core/Data_models/barber_data_from_map/barber_data_from_map_model.dart - Service model
lib/core/Data_models/barber_data_from_map/service_mode.dart - Review model
lib/core/Data_models/barber_data_from_map/comment_model.dart - Barber detail fixture · Bundled service and review data.
lib/Temporary_data/barber_data_from_map.json
Native platforms
- Android Flutter host
android/app/src/main/kotlin/com/example/basp/MainActivity.kt - Android map configuration · Google Maps API-key integration boundary.
android/app/src/main/AndroidManifest.xml - iOS Flutter host · Google Maps API-key integration boundary.
ios/Runner/AppDelegate.swift
Other components
- Google Maps · Requires API-key setup in native hosts.
Connections 19
- Android Flutter host → App entry & navigation: boots Flutter
- iOS Flutter host → App entry & navigation: boots Flutter
- App entry & navigation → Map & discovery: starts discovery
- Map & discovery → Map data provider: reads map data
- Map data provider → Map fixture data: loads
- Map data provider → Map record model: maps records
- Map & discovery → Google Maps: renders map
- Android map configuration → Google Maps: configures API key
- iOS Flutter host → Google Maps: configures API key
- Map & discovery → Barber detail provider: selects barber
- Barber detail provider → Barber detail fixture: loads
- Barber detail provider → Barber detail model: builds detail
- Barber detail model → Service model: includes services
- Barber detail model → Review model: includes reviews
- Barber detail provider → Gallery detail section: supplies profile
- Barber detail provider → Service catalog section: supplies catalog
- Service catalog section → Booking workflow: chosen service
- Gallery detail section → Booking workflow: starts booking
- Booking workflow → Appointment confirmation: confirms slot