Skip to content

kavya-7777/Intelligence-Communication-Efficiency-Platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ICEP — Intelligent Communication Efficiency Platform

A full-stack AI-powered real-time communication platform built with the MERN stack + Socket.io.


Problem Statement

Modern teams face communication overload: long chat threads, missed urgent messages, no insight into communication habits. ICEP solves this by adding AI-powered summarization, smart replies, priority detection, and a communication analytics dashboard on top of a real-time chat platform.


Tech Stack

Layer Technology
Frontend React 18, Tailwind CSS, Vite
Backend Node.js, Express.js
Database MongoDB (Mongoose)
Real-time Socket.io
Auth JWT
File Upload Multer
AI OpenAI GPT-3.5 Turbo
Charts Chart.js / react-chartjs-2

Core Features

  1. User Authentication — Register / Login with JWT tokens
  2. Real-time One-to-One Chat — Instant messaging via Socket.io
  3. Group Chat — Create named groups with multiple participants
  4. File Sharing — Upload and share images, PDFs, and Word docs
  5. AI Chat Summarization — Summarize long conversations with OpenAI
  6. Smart Reply Suggestions — AI-generated quick reply buttons
  7. Priority Message Detection — Auto-flag urgent messages (keywords: urgent, deadline, important, asap, critical, emergency)
  8. Communication Analytics Dashboard — Charts for response time, messages sent, efficiency score, leaderboard
  9. Notifications System — In-app notifications for new messages
  10. Message Search — Search within a conversation

Novel Features

  • Communication Efficiency Score = (Replied Messages / Total Messages Received) × 100
  • AI-based chat summarization using OpenAI GPT-3.5
  • Smart reply suggestions with context-aware responses
  • Priority message detection via keyword analysis (no extra API cost)
  • Communication analytics dashboard with interactive Chart.js charts

System Architecture

User → React Frontend (Vite + Tailwind)
           ↓ HTTP (Axios)     ↓ WebSocket (Socket.io)
       Node.js / Express Backend
           ↓                      ↓
       MongoDB (Mongoose)    OpenAI API
           ↓
       Analytics Engine → Dashboard

Database Schema

Users

{ userId, name, email, password(hashed), avatar, role, isOnline, lastSeen, createdAt }

Conversations

{ conversationId, name, isGroup, participants[userId], admin(userId), lastMessage, createdAt }

Messages

{ messageId, sender(userId), conversation(conversationId), messageText, fileUrl, fileType, fileName, priority, readBy[], createdAt }

Notifications

{ notificationId, recipient(userId), sender(userId), type, message, conversation, readStatus, createdAt }

Analytics

{ userId, messagesSent, messagesReceived, repliedMessages, totalResponseTimeMs, responseCount, efficiencyScore }

ER Relationships

  • User → (1:N) → Messages (sender)
  • User → (M:N) → Conversations (participants)
  • Conversation → (1:N) → Messages
  • User → (1:N) → Notifications
  • User → (1:1) → Analytics

REST API Endpoints

Authentication

POST   /api/auth/register          Register a new user
POST   /api/auth/login             Login and receive JWT
GET    /api/auth/me                Get current user (protected)
GET    /api/auth/users             Get all users (protected)
PUT    /api/auth/profile           Update profile (protected)

Conversations

GET    /api/conversations          List user's conversations
POST   /api/conversations          Create/get DM conversation
POST   /api/conversations/group    Create group conversation
GET    /api/conversations/:id      Get conversation by ID

Messages

GET    /api/messages/:convId       Get messages (supports ?search=)
POST   /api/messages               Send a message
DELETE /api/messages/:id           Delete a message (own only)

Files

POST   /api/files/upload           Upload file (multipart/form-data)

AI

POST   /api/ai/summarize           Summarize conversation
POST   /api/ai/smart-reply         Get smart reply suggestions

Analytics

GET    /api/analytics/me           My analytics
GET    /api/analytics/all          All users analytics (leaderboard)
GET    /api/analytics/messages-per-day  Daily activity (last 7 days)

Notifications

GET    /api/notifications          Get user notifications
PUT    /api/notifications/read-all Mark all as read
PUT    /api/notifications/:id/read Mark one as read
DELETE /api/notifications/:id      Delete notification

Project Structure

root/
├── client/                     # React Frontend (Vite)
│   ├── src/
│   │   ├── components/         # Reusable UI components
│   │   ├── context/            # React context (Auth, Socket, Chat)
│   │   ├── pages/              # Full-page components
│   │   └── main.jsx
│   ├── index.html
│   ├── vite.config.js
│   └── package.json
│
├── server/                     # Node.js Backend
│   ├── config/                 # DB config
│   ├── controllers/            # Route handlers
│   ├── middleware/             # Auth middleware
│   ├── models/                 # Mongoose schemas
│   ├── routes/                 # Express routes
│   ├── uploads/                # File storage
│   ├── utils/                  # Socket.io logic
│   ├── index.js                # Entry point
│   └── package.json
│
├── docs/                       # Documentation
├── .env                        # Environment variables
├── .gitignore
└── README.md

Setup & Installation

Prerequisites

  • Node.js v18+
  • MongoDB (local or Atlas)
  • (Optional) OpenAI API key

1. Clone the repository

git clone https://github.com/yourusername/icep.git
cd icep

2. Configure environment

cp .env.example .env
# Edit .env with your MongoDB URI, JWT secret, OpenAI API key

3. Install & run backend

cd server
npm install
npm run dev
# Runs on http://localhost:5000

4. Install & run frontend

cd client
npm install
npm run dev
# Runs on http://localhost:5173

GitHub Workflow

Branching Strategy

main          ← Production-ready, stable
develop       ← Integration branch
feature/xxx   ← Individual feature branches
fix/xxx       ← Bug fix branches

Workflow

git clone <repo-url>
git checkout -b feature/my-feature develop
# ... make changes ...
git add <files>
git commit -m "feat: add smart reply panel"
git push origin feature/my-feature
# Create Pull Request → develop
# After review → merge → develop
# Release: develop → main

Commit Message Conventions

feat: add new feature
fix: bug fix
docs: documentation changes
style: formatting changes (no logic)
refactor: code refactoring
test: add/update tests
chore: build or config changes

UI/UX Wireframe Descriptions

Login / Register Page

┌──────────────────────────────────┐
│  [ICEP Logo]                     │
│  Intelligent Communication...    │
│                                  │
│  ┌────────────────────────────┐  │
│  │ Email        [__________]  │  │
│  │ Password     [__________]  │  │
│  │ [Sign In Button]           │  │
│  │ Don't have account? Sign up│  │
│  └────────────────────────────┘  │
└──────────────────────────────────┘

Chat Dashboard

┌────────────┬──────────────────────────────┐
│ [ICEP]  🔔 │  [Chat Name]     🔍 📄 ⚡   │
│ 🔍 Search  │                              │
│            │  [AI Summary Panel]          │
│ Conv 1  ● │  ─────────────────────────── │
│ Conv 2    │  [Message Bubbles]            │
│ Conv 3    │                              │
│ Group 1   │  [Smart Reply Chips]         │
│           │  ─────────────────────────── │
│ [Analytics│  📎 [Message Input...]  [➤]  │
│ [Settings]│                              │
│ [Logout]  │                              │
└────────────┴──────────────────────────────┘

Analytics Dashboard

┌─────────────────────────────────────────┐
│ ← Analytics Dashboard                   │
│                                         │
│ [Sent: 42] [Efficiency: 78%] [Time: 4s] │
│                                         │
│ ★ Most Active: John Doe (124 messages)  │
│                                         │
│ [Bar Chart: Daily]  [Doughnut: Top 3]   │
│                                         │
│ [Horizontal Bar: Leaderboard]           │
│                                         │
│ [Table: All Users]                      │
└─────────────────────────────────────────┘

Novelty & Innovation

  1. Communication Efficiency Score — A novel metric calculated as (Replied / Received) × 100, giving users actionable insight into their responsiveness.
  2. AI Summarization — Long conversation threads can be summarized in seconds using OpenAI, reducing information overload.
  3. Contextual Smart Replies — AI-generated replies based on conversation context, not just simple canned responses.
  4. Auto Priority Detection — Messages containing keywords like urgent, deadline, ASAP are automatically flagged with a priority badge — no manual tagging needed.
  5. Integrated Analytics — Unlike standalone chat apps, ICEP measures and displays communication performance metrics in real time.

Future Enhancements

  • Voice messages
  • Email/push notifications
  • AI-powered meeting scheduling assistant
  • Multi-language support
  • Dark mode
  • Message reactions / emoji
  • Read receipts per user in groups

About

A full-stack AI-powered real-time communication platform built with the MERN stack + Socket.io.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors