Skip to content

Developer-ritesh/Flutter-Redis-Real-Time-Chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redis_learn

A Flutter chat application demonstrating real-time messaging using Redis.

Description

This project is a Flutter-based chat app that connects to a Redis server for real-time messaging, presence detection, and typing indicators. It uses Redis Pub/Sub channels to broadcast chat messages, typing status, and user presence. The app also stores chat history locally using Hive and manages unique client IDs with SharedPreferences.

Features

  • Real-time chat messaging using Redis Pub/Sub
  • User presence detection (online/offline status)
  • Typing indicators for active users
  • Local chat history storage with Hive database
  • Persistent unique client IDs using SharedPreferences
  • Cross-platform support (Android, iOS, Web, Desktop)

Prerequisites

  • Flutter SDK installed: Flutter Installation Guide
  • Access to a Redis server (the project uses a remote Redis instance; update credentials in lib/main.dart if needed)
  • An IDE such as VSCode or Android Studio

Getting Started

  1. Clone the repository:

    git clone <repository-url>
    cd redis_learn
  2. Install dependencies:

    flutter pub get
  3. Ensure the Redis server credentials in lib/main.dart are correct and accessible.

Running the App

Run the app on your desired platform:

flutter run

You can specify a device or emulator as needed.

Project Structure

  • lib/main.dart - Main Flutter app source code implementing chat functionality with Redis integration.
  • android/, ios/, macos/, windows/, linux/, web/ - Platform-specific files for Flutter.
  • pubspec.yaml - Flutter project configuration and dependencies.

Dependencies

  • redis - Redis client for Dart
  • uuid - For generating unique client IDs
  • shared_preferences - For storing client IDs persistently
  • hive_flutter - Local database for storing chat messages

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published