Skip to content

πŸš€ Modern messaging app showcasing Flutter clean architecture, type-safe network layer & real-time features with Firebase

Notifications You must be signed in to change notification settings

osmancan23/ChatFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ChatFlow - Real-Time Messaging Application

πŸš€ About The Project

ChatFlow is a modern and user-friendly real-time messaging application. Built with Flutter framework, it provides seamless functionality across both iOS and Android platforms.

πŸ“± Screenshots

Login View
Login View
Register View
Register View
Home View
Home View
Chat View
Chat View
Users View
Users View
Profile View
Profile View

πŸ“‚ Project Structure

lib/
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ base/
β”‚   β”‚   β”œβ”€β”€ model/              # Base model interfaces
β”‚   β”‚   └── view/               # Base view classes
β”‚   β”œβ”€β”€ bloc/                   # Global BLoC states
β”‚   β”œβ”€β”€ constants/              # App constants
β”‚   β”œβ”€β”€ init/
β”‚   β”‚   β”œβ”€β”€ network/           # Network layer management
β”‚   β”‚   β”œβ”€β”€ cache/             # Local storage management
β”‚   β”‚   β”œβ”€β”€ notification/      # Push notification setup
β”‚   β”‚   └── theme/             # App theme configuration
β”‚   β”œβ”€β”€ models/                # Data models
β”‚   └── service/               # API services
β”œβ”€β”€ feature/
β”‚   β”œβ”€β”€ auth/                  # Authentication feature
β”‚   β”‚   β”œβ”€β”€ login/
β”‚   β”‚   └── register/
β”‚   β”œβ”€β”€ chat/                  # Chat feature
β”‚   β”œβ”€β”€ home/                  # Home feature
β”‚   └── profile/               # Profile feature
└── main.dart

πŸ” Case Studies

1. Network Layer Implementation

The project includes a robust network layer implementation with the following features:

Network Manager

  • Singleton pattern for network operations
  • Generic response handling
  • Type-safe API calls
  • Automatic error handling
Future<R?> send<T extends INetworkModel<T>, R>({
  required String path,
  required RequestType type,
  required T parseModel,
  Map<String, dynamic>? queryParameters,
  Map<String, dynamic>? data,
})

Base Network Model

  • Generic base model for all network responses
  • Type-safe JSON parsing
abstract class INetworkModel<T> {
  T fromJson(Map<String, dynamic> json);
  Map<String, dynamic> toJson();
}

2. Service Layer Implementation

Example service implementation showing CRUD operations:

abstract class IPostService {
  Future<List<PostModel>?> getPosts();
  Future<PostModel?> getPost(int id);
  Future<PostModel?> createPost(String title, String body, int userId);
  Future<PostModel?> updatePost(int id, String title, String body);
  Future<bool> deletePost(int id);
}

✨ Features

πŸ” Authentication

  • Secure session management with JWT
  • User registration and login
  • Secure password storage

πŸ’¬ Real-Time Chat

  • Instant messaging with Firebase Realtime Database
  • Typing indicators
  • Message read/unread status
  • Last seen feature

πŸ”” Notifications

  • Firebase Cloud Messaging (FCM) integration
  • Customizable notification settings
  • In-app notification management

πŸ‘€ User Profile

  • Profile creation and editing
  • Profile picture upload with Firebase Storage
  • User settings management

πŸ›  Technical Features

  • Clean Architecture principles
  • State management with BLoC pattern
  • Firebase services integration
  • Comprehensive error handling
  • Unit and widget tests
  • Generic network layer
  • Type-safe API calls

πŸ”§ Installation

  1. Prerequisites:

    • Flutter SDK (latest version)
    • Dart SDK (latest version)
    • Android Studio / VS Code
    • Firebase account
  2. Clone the project:

    git clone [repo-url]
    cd chat_flow
  3. Install dependencies:

    flutter pub get
  4. Configure Firebase:

    • Add your google-services.json for Android
    • Add your GoogleService-Info.plist for iOS
  5. Run the app:

    flutter run

πŸ§ͺ Testing

Run tests using:

flutter test

πŸ“š Documentation

For detailed documentation about the implementation:

πŸ“± Supported Platforms

  • iOS 11.0 and above
  • Android 5.0 (API level 21) and above

🀝 Contributing

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License.

πŸ“Έ Directory Structure for Screenshots

screenshots/
β”œβ”€β”€ login.png
β”œβ”€β”€ chat_list.png
β”œβ”€β”€ chat_detail.png
└── profile.png

Note: Please add your application screenshots to the screenshots directory following the structure above.

About

πŸš€ Modern messaging app showcasing Flutter clean architecture, type-safe network layer & real-time features with Firebase

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published