How arsany-osama/spotta-flutterapp works
Project Type & Purpose
• Mobile full-stack application (Flutter/Dart)
• Purpose: Venue booking + real-time chat between clients and venue owners
• Backend is serverless, using Firebase (Auth + Database) and Open Route Service API
File Structure & Layers
• Platform folders:
• android/ and ios/ — native wrappers, Gradle and Xcode projects, platform resources
• Dart code (lib/):
• lib/Frontend — UI pages for clients, owners, shared widgets
• lib/Backend — controllers, models, services
– controllers: handle UI events, orchestrate services
– services: interface with Firebase (Auth, Database) and Open Route Service API
– models: User, Reservation, Venue, ChatMessage, etc.
• lib/main.dart — app entry point, dependency injection, routing
• lib/firebase_options.dart — Firebase configuration
README Insights
• Authentication via Firebase Phone Auth & OTP
• Real-time chat (Firebase Realtime DB or Firestore)
• Venue data and reservations in Firebase Database
• Location selection through Open Route Service REST API
• Pure Flutter UI, no custom server
Main Components
a. Mobile App (Flutter)
– UI Layer (Pages/Widgets in lib/Frontend)
– Controller Layer (lib/Backend/controllers)
– Service Layer (lib/Backend/services)
– Data Models (lib/Backend/models)
b. External Services
– Firebase Authentication
– Firebase Database (Firestore or Realtime)
– Open Route Service API
c. Native Platforms
– Android (Gradle modules, MainActivity.kt)
– iOS (AppDelegate.swift, Info.plist)
Relationships & Data Flows
• UI → Controller: user taps “chat,” controller handles event
• Controller → Service: invokes chat_service or venue_service
• Service ↔ Firebase Auth/DB: authentication, read/write venue data, chat messages
• Service ↔ Open Route Service API: GET/POST for geolocation data
• Platform channels aren’t used here (pure Dart), but show native wrappers as “shells.”
Architectural Patterns & Principles
• Layered (Presentation → Controller → Service → External)
• MVC-like separation inside the app
• Serverless/Backend-as-a-Service
• Dependency injection via main.dart