Skip to content

drax6055/flutter-redis-chat-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter Redis Real-time Chat App

Flutter NodeJS Redis Socket.io License

A high-performance, real-time 1-to-1 chat application built with Flutter 3.x and a Node.js backend powered by Redis for ephemeral message storage and Socket.io for instant bidirectional communication.

🚀 Features

  • Real-time Messaging: Instant message delivery using Socket.io (WebSocket).
  • Ephemeral Chat: Messages are stored in Redis with TTL (Time-To-Live), ensuring privacy and automatic cleanup.
  • Cross-Platform: Flutter app runs on Android, iOS, and Web.
  • Scalable Backend: Designed with Redis for high-speed read/write operations.
  • Modern UI: Dark-themed, premium interface using Google Fonts (Outfit).
  • Status Updates: Real-time "Chat Started" and "Chat Ended" notifications.

🛠️ Tech Stack

Frontend (Mobile/Web)

  • Framework: Flutter
  • Networking: socket_io_client
  • Typography: google_fonts
  • State Management: setState / StreamController

Backend (Server)

📂 Project Structure

├── flutter_chat_app/      # Flutter application source code
│   ├── lib/
│   │   ├── models/        # Data models (Message)
│   │   ├── screens/       # UI Screens (Login, Home, Chat)
│   │   └── services/      # SocketService singleton
│   └── pubspec.yaml
│
└── redis-chat-backend/    # Node.js Server source code
    ├── src/
    │   ├── config/        # Redis configuration
    │   ├── services/      # Chat business logic
    │   ├── socket/        # Socket.io event handlers
    │   └── server.js      # Entry point
    └── package.json

⚡ Getting Started

Prerequisites

1. Setup Backend

Navigate to the backend directory, install dependencies, and start the server.

cd redis-chat-backend

# Install dependencies
npm install

# Start Redis (if using Docker)
# docker run --name redis-chat -p 6379:6379 -d redis

# Start the server
npm start

The server works on port 3000 by default.

2. Setup Frontend (Flutter)

Navigate to the app directory, install dependencies, and run.

cd flutter_chat_app

# Get packages
flutter pub get

# Run on Android Emulator or Real Device
flutter run

Note for Real Devices: The app is configured to connect to XXX.XXX.XX.XX:3000. Ensure your phone and computer are on the same Wi-Fi network and your firewall allows connections on port 3000.

🤝 Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

flutter redis chat-application real-time-chat one-to-one-chat session-based in-memory-database backend frontend mobile-app

About

A real-time 1-to-1 chat app built with Flutter and Redis, featuring session-based messaging, temporary in-memory storage, and automatic message deletion after session closure. Includes both frontend and backend implementation for fast, secure, and private communication.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors