Skip to content

Spidy394/Konvo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’¬ Konvo

Where conversations come alive in real-time

React Node.js Express MongoDB Socket.io

Live Demo Status


πŸš€ Live Demo | πŸ“š Documentation | πŸ› Report Bug | πŸ’‘ Request Feature

πŸ“‹ Table of Contents

✨ Features

πŸ”₯ Core Features
  • πŸ’¬ Real-time Messaging: Instant message delivery with Socket.io
  • πŸ‘₯ User Authentication: Secure JWT-based auth with bcrypt encryption
  • πŸ–ΌοΈ Media Sharing: Image and file uploads via Cloudinary integration
  • 🌐 Online Status: Real-time user presence indicators
  • πŸ“± Responsive Design: Mobile-first approach with TailwindCSS
  • 🎨 Modern UI: Beautiful interface with DaisyUI components
  • πŸŒ™ Theme Support: Dark/Light theme switching
  • ⚑ Fast Performance: Optimized with Vite and modern React patterns
πŸš€ Advanced Features
  • πŸ“Š Real-time Analytics: Live user activity tracking
  • πŸ‘€ User Profiles: Customizable user profiles with avatars
  • πŸ” Secure Sessions: HTTP-only cookies with CORS protection
  • πŸ“ˆ Scalable Architecture: Microservice-ready design
  • πŸ›‘οΈ Data Validation: Comprehensive input validation and sanitization
  • ⚠️ Error Handling: Graceful error handling with user-friendly messages
  • πŸ“± PWA Ready: Progressive Web App capabilities

πŸ› οΈ Tech Stack

Frontend (Client)

graph LR
    A[React 19.1.0] --> B[Vite Build Tool]
    A --> C[TailwindCSS 4.1.8]
    C --> D[DaisyUI Components]
    A --> E[Socket.io Client]
    A --> F[Zustand State]
    A --> G[React Router DOM]
    A --> H[Axios HTTP]
    A --> I[React Hot Toast]
    A --> J[Lucide Icons]
Loading
Technology Version Purpose
React 19.1.0 UI Framework
Vite 6.3.5 Build Tool & Dev Server
TailwindCSS 4.1.8 Utility-first CSS Framework
DaisyUI 5.0.43 Pre-built UI Components
Socket.io Client 4.8.1 Real-time Communication
Zustand 5.0.5 State Management
React Router DOM 7.6.1 Client-side Routing
Axios 1.9.0 HTTP Client
React Hot Toast 2.5.2 Notification System
Lucide React 0.511.0 Modern Icons

Backend (Server)

graph LR
    A[Node.js] --> B[Express 5.1.0]
    B --> C[MongoDB]
    C --> D[Mongoose ODM]
    B --> E[Socket.io Server]
    B --> F[JWT Auth]
    F --> G[bcryptjs]
    B --> H[Cloudinary]
    B --> I[CORS]
    B --> J[Cookie Parser]
Loading
Technology Version Purpose
Node.js 20+ Runtime Environment
Express 5.1.0 Web Framework
MongoDB Latest NoSQL Database
Mongoose 8.15.1 MongoDB ODM
Socket.io 4.8.1 WebSocket Server
JWT 9.0.2 Authentication Tokens
bcryptjs 3.0.2 Password Hashing
Cloudinary 2.6.1 Media Management
CORS 2.8.5 Cross-Origin Requests
dotenv 16.5.0 Environment Variables

πŸ—οΈ Architecture

πŸ“Š System Architecture Diagram
graph TB
    subgraph "Client Side"
        A[React App] --> B[Zustand Store]
        A --> C[Socket.io Client]
        A --> D[Axios HTTP Client]
        B --> E[Auth Store]
        B --> F[Chat Store]
        B --> G[Theme Store]
    end
    
    subgraph "Server Side"
        H[Express Server] --> I[Socket.io Server]
        H --> J[Auth Routes]
        H --> K[Message Routes]
        H --> L[Auth Middleware]
        I --> M[Real-time Events]
    end
    
    subgraph "Database"
        N[MongoDB]
        O[User Collection]
        P[Message Collection]
        N --> O
        N --> P
    end
    
    subgraph "External Services"
        Q[Cloudinary]
        R[JWT Tokens]
    end
    
    C -.->|WebSocket| I
    D -->|HTTP/HTTPS| H
    H --> N
    H --> Q
    L --> R
    
    style A fill:#61DAFB
    style H fill:#339933
    style N fill:#47A248
    style Q fill:#3448C5
Loading
πŸ—„οΈ Database Schema
erDiagram
    User {
        ObjectId _id
        String email
        String fullName
        String password
        String profilePic
        Date createdAt
        Date updatedAt
    }
    
    Message {
        ObjectId _id
        ObjectId senderId
        ObjectId receiverId
        String text
        String image
        Date createdAt
        Date updatedAt
    }
    
    User ||--}o Message : sends
    User ||--}o Message : receives
Loading

⚑ Quick Start

Prerequisites: Node.js 20+, MongoDB, Git

# πŸš€ Clone the repository
git clone https://github.com/Spidy394/Konvo.git
cd Konvo

# πŸ“¦ Install dependencies for both client and server
npm run build

# πŸ”§ Set up environment variables
cp server/.env.example server/.env
# Edit server/.env with your configuration

# πŸƒβ€β™‚οΈ Start development servers
npm run dev:server  # Backend on port 5001
npm run dev:client  # Frontend on port 5173

πŸŽ‰ Open http://localhost:5173 to view the app!

πŸ”§ Installation

πŸ“‹ Detailed Setup Instructions

1. Clone Repository

git clone https://github.com/Spidy394/Konvo.git
cd Konvo

2. Install Dependencies

Root Level

npm install

Server Dependencies

cd server
npm install

Client Dependencies

cd client
npm install

3. Database Setup

Option A: MongoDB Atlas (Recommended)

  1. Create account at MongoDB Atlas
  2. Create a new cluster
  3. Get connection string
  4. Add to environment variables

Option B: Local MongoDB

# Install MongoDB locally
# Ubuntu/Debian
sudo apt-get install mongodb

# macOS
brew install mongodb-community

# Start MongoDB service
sudo systemctl start mongod  # Linux
brew services start mongodb-community  # macOS

βš™οΈ Configuration

πŸ” Environment Variables

Create a .env file in the server directory:

# Server Configuration
PORT=5001
NODE_ENV=development

# Database
MONGODB_URI=

# JWT Configuration
JWT_SECRET=
JWT_EXPIRES_IN=

# Cloudinary Configuration
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=

# CORS Configuration
CLIENT_URL=
🎨 Client Configuration

The client uses Vite configuration in client/vite.config.js:

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
  plugins: [react()],
  server: {
    proxy: {
      '/api': {
        target: 'http://localhost:5001',
        changeOrigin: true
      }
    }
  }
})

πŸš€ Deployment

☁️ Deploy to Render.com

Automatic Deployment

  1. Fork this repository
  2. Connect your GitHub account to Render
  3. Create a new Web Service
  4. Connect your forked repository
  5. Configure environment variables
  6. Deploy!

πŸ“„ License

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

ISC License

Copyright (c) 2025 Shubhodeep Mondal

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

πŸ‘₯ Authors

πŸ§‘β€πŸ’» Shubhodeep Mondal

Full-Stack Developer

GitHub LinkedIn Email


🌟 Show your support

Give a ⭐️ if this project helped you!

Star History Chart


Built with ❀️ by Shubhodeep Mondal

Konvo - Where conversations come alive in real-time πŸ’¬βœ¨

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages