Skip to content

201Harsh/RaktFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

71 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฉธ RaktFlow - Private Realtime 1v1 Chat App MIT License

RaktFlow Banner

RaktFlow is a secure, real-time SaaS chat platform designed for private 1v1 conversations โ€” fast, encrypted, and minimal. Featuring seamless login, intelligent user discovery, and an integrated AI chatbot system powered by EndGaming AI API , RaktFlow offers users a unique blend of privacy, speed, and smart interaction. Whether you're chatting with friends or engaging in deep conversations with bots, your messages stay yours โ€” always private, always flowing.

React Node.js MongoDB Socket.IO


๐Ÿ“Œ Table of Contents


โœจ Features

Feature Description
๐Ÿ” Authentication Unique username and password registration & secure login/logout system
๐Ÿ‘ฅ User List View all existing users on the platform
๐Ÿ”Ž Search Users Easily search users by username
๐Ÿค– AI Bots Tab Chat with AI-powered bots in a separate section
๐Ÿ’ฌ 1v1 Private Chat True private messaging with no third-party visibility
๐Ÿ” Persistent Login Re-login anytime with your registered credentials
๐Ÿ”“ Logout Anytime Easily logout and return to login screen

๐Ÿ›  Tech Stack

Frontend:

  • React.js (Vite)
  • Tailwind CSS
  • Axios
  • Context API (for state management)
  • Socket.IO-client
  • React Router Dom (for routing)

Backend:

  • Node.js
  • Express.js
  • MongoDB (Mongoose)
  • Socket.IO (WebSockets)
  • JWT (Authentication)
  • Bcrypt (Password hashing)

๐Ÿ” System Flow

sequenceDiagram
    participant User
    participant Frontend
    participant Backend
    participant MongoDB
    participant Socket.IO

    User->>Frontend: Registers/Login
    Frontend->>Backend: POST /register or /login
    Backend->>MongoDB: Save/Check User
    MongoDB-->>Backend: Success/Error
    Backend-->>Frontend: JWT + User Info

    User->>Frontend: Navigates to Chat
    Frontend->>Socket.IO: Connect
    Frontend->>Backend: GET /users
    Frontend->>Backend: GET /chat/:userId

    User->>Frontend: Sends message
    Frontend->>Socket.IO: Emit message
    Socket.IO-->>Recipient: Real-time receive
Loading

๐Ÿงฐ Installation

๐Ÿ“ฆ Prerequisites

  • Node.js v18+
  • MongoDB Atlas or Local MongoDB
  • (Optional) AI API Key for chatbot

๐Ÿ“ Backend Setup

git clone https://github.com/201Harsh/RaktFlow.git
cd RaktFlow/Backend
npm install
cp .env
npm run dev

๐Ÿ’ป Frontend Setup

cd ../Frontend
npm install
cp .env
npm run dev

๐Ÿง‘โ€๐Ÿ’ป Usage Guide

  1. Register using a unique username and password
  2. Get redirected to the chat page
  3. Search users and start private chats
  4. Switch to the AI Bots tab to chat with AI
  5. Logout and login again anytime

๐Ÿ–ผ Screenshots

See the Screenshots Below

Register and Login Page

Chat Page


๐Ÿš€ Deployment

Render:

  • Backend: Deploy Express server and MongoDB URI in environment variables
  • Frontend: Build with npm run build and serve using static hosting

Vercel:

  • Frontend only (connect to backend API via HTTPS)

MongoDB Atlas:

  • Use cloud database connection string

๐Ÿค– AI Bot Integration (EndGaming AI)

This guide shows how to integrate the EndGaming AI API with your RaktFlow backend to enable real-time AI-powered chatbot interactions.


๐Ÿ“ฆ Setup

Ensure you have the following dependencies installed in your backend project:

npm install express axios dotenv

๐Ÿ” Environment Variable

Create or update your .env file with your EndGaming AI API key:

ENDGAMING_AI_KEY=your_actual_api_key_here

๐Ÿš€ Example Route

Here's a sample route for handling AI-powered replies using EndGaming AI API:

// backend/routes/ai.js
const express = require("express");
const router = express.Router();
const axios = require("axios");

router.post("/bot-reply", async (req, res) => {
  try {
    const { prompt } = req.body;

    const response = await axios.post(
      "https://api.endgamingai.com/v1/chat",
      {
        prompt,
        model: "endgaming-gpt",
        temperature: 0.7,
        maxTokens: 150,
      },
      {
        headers: {
          Authorization: `Bearer ${process.env.ENDGAMING_AI_KEY}`,
          "Content-Type": "application/json",
        },
      }
    );

    res.json({ reply: response.data.reply });
  } catch (error) {
    console.error("AI Bot Error:", error.message);
    res.status(500).json({ error: "Failed to get AI response" });
  }
});

module.exports = router;

๐Ÿ’ก Notes

  • You can adjust temperature, model, or maxTokens for different response behavior.
  • Consider adding rate limiting and fallback responses in case of failure.

Enjoy building smarter chatbots with EndGaming AI!


๐Ÿ›ฃ Roadmap

A glance at what's built, what's brewing, and what's coming soon:


โœ… Completed

  • โœ… Chat UI Cleanup โ€“ Minimal, sleek interface for better usability
  • โœ… User Search & AI Tabs โ€“ Switch between human chats and bots seamlessly
  • โœ… Chatbot Integration (Basic) โ€“ Initial integration with EndGaming AI API

๐Ÿšง In Progress / Planned

  • ๐Ÿ” End-to-End Encryption โ€“ Ensure full message privacy with E2EE protocols
  • ๐Ÿ“‚ Chat History Storage โ€“ Save and retrieve past conversations
  • ๐ŸŒ Typing Indicators & Online Status โ€“ Real-time awareness of user activity
  • ๐Ÿ“Ž File & Media Sharing โ€“ Allow images, PDFs, and more in chats
  • ๐Ÿ”” Notifications โ€“ Browser and in-app message alerts
  • ๐Ÿง  Advanced AI Bot Features โ€“ Contextual memory, personalized replies
  • ๐ŸŒ Internationalization (i18n) โ€“ Support for multiple languages
  • ๐Ÿ“ฑ Mobile Optimization โ€“ Fully responsive mobile experience
  • ๐Ÿ“Š Admin Dashboard โ€“ Manage users, bots, and conversations
  • ๐Ÿงช Unit & Integration Tests โ€“ Robust testing coverage for stability

๐Ÿค Contributing to RaktFlow

We welcome all contributions to make RaktFlow even better! Whether you're fixing bugs, improving the UI, enhancing chatbot logic, or adding new features โ€” your help is valued and appreciated.


๐Ÿ›  How to Contribute

  1. Fork the repository
  2. Clone your fork to your local machine
git clone https://github.com/201Harsh/RaktFlow.git
  1. Create a new branch for your feature/fix
git checkout -b feature/YourFeatureName
  1. Make your changes and commit
git commit -m "Add: Description of your feature"
  1. Push to your branch
git push origin feature/YourFeatureName
  1. Open a Pull Request on the main repo with a clear description of what youโ€™ve done.

๐Ÿงช Contribution Ideas

  • ๐Ÿงฑ Add support for emojis, images, or file sharing
  • ๐Ÿ” Implement more end-to-end encryption
  • ๐Ÿค– Improve AI bot responses using GPT/Gemini API
  • ๐Ÿง‘โ€๐ŸŽจ Refactor or redesign UI components (Tailwind + Plan CSS)
  • ๐Ÿ’ฌ Add message read receipts or typing indicators
  • ๐ŸŒ Add internationalization / localization support
  • ๐ŸŒ Add User's Online/Offline Feature

๐Ÿ“œ Guidelines

  • Follow consistent code style (Prettier + ESLint recommended)
  • Keep PRs small and focused
  • Add clear, meaningful commit messages
  • Document your changes where necessary

Live Preview

  • see the site live at

๐Ÿ“ƒ License

MIT License
Copyright (c) 2025 Harsh
Permission is hereby granted, free of charge, to any person obtaining a copy...

๐Ÿ“ฎ Contact


๐Ÿฉธ RaktFlow Wasnโ€™t Built โ€” It Was Summoned With Harshโ€™s Blood, Sweat & Sanity

About

RaktFlow - Private Realtime 1v1 Chat App with AI's Magic

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages