FChat is a modular, feature-oriented Flutter chat application built with GetX for reactive state management, navigation, and dependency injection. It leverages Firebase services including Firestore, Firebase Auth, Cloud Storage, and FCM to enable real-time messaging, authentication, and location-aware features.
The app is structured around self-contained feature modules (e.g., chat, contact, sign_in) with each feature managing its own controller, view, state, and binding logic. Shared components like UI widgets, helper utilities, API services, and entities are grouped under the common/ directory for global reuse.
✅ GetX-centric architecture for state, lifecycle, navigation, and DI\
✅ Feature-first project structure for clear separation and scalability
✅ Firebase integration: real-time Firestore, auth, file uploads, and messaging
✅ Reusable shared modules: ApiService, utils, custom widgets, route middleware
✅ Location support: integrates with Google Maps API to convert coordinates into addresses
✅ Dio-based HTTP layer: handles external API calls with support for headers, tokens, and error handling
FChat/
├── main.dart // Entry point
├── common/ // Shared code across features
└── feature/ // Modular feature-based code (GetX-driven)
common/
entities/: Shared models like User, Message, MyLocation
helpers/: Utilities like string formatters and file helpers
middlewares/: Navigation redirection logic
service/: Handles HTTP requests via Dio with support for auth, headers, and external APIs (e.g. Google Maps - geocode)
routes/: Centralized route naming and screen mapping
widget/: Reusable UI components like buttons, app bars, and toasts
ContactController
Loads contact list from Firestore (excluding self)
Navigates to chat with user
Ensures chat vessel exists in Firestore
ApplicationController
Manages page/tab changes
Controls bottom navigation bar
MessageController
Loads messages related to the current user
Fetches and updates user location and FCM token
ChatController
Sends/receives messages (text and image)
Uses Firestore streams for real-time chat
Manages recipient location tracking and image upload
SignInController
Handles Google Sign-In via FirebaseAuth
Registers new users in Firestore if needed
RouteWelcomeMiddleware: Redirects users based on auth or first-time use
ApiService: Unified HTTP client using Dio, with flexible request/response handling
From utils.dart:
Random string generator
File extension parser
Human-readable time formatting (5m ago, 2h ago)
Custom date formatters (dd-MM, dd-MM-yyyy)
Debug print wrapper
App Preview - Device 1 & Device 2
Login with Google Account
Success Login - List Chat
Chat Page - Text Messages
Image Messages - Pick Gallery or Camera
Pick from Galley to Send
Image Viewer - Can Zooming Also
Last Location(Scroll Horizontally)
Technical Captures
Preview App + Data Source
Preview App + Codes
Preview App + Codes + Structure
Contributed to this project as part of my role at Self Project.
Feb 2023 - Feb 2023