Blame
| b8596f | Kaushal Lamkhade | 2025-09-25 08:18:45 | 1 | # Project: CommNet |
| 9543ec | Kaushal Lamkhade | 2025-09-25 08:16:56 | 2 | |
| 3 | > **โThe AI-driven network for client communication.โ** |
|||
| 4 | ||||
| 5 | --- |
|||
| 6 | ||||
| 7 | ||||
| 403428 | Kaushal Lamkhade | 2025-09-25 12:47:13 | 8 | **About Team : ** |
| 6e6512 | Kaushal Lamkhade | 2025-09-25 12:44:17 | 9 | [[https://wiki.enovate-it.com/Teams/Team%20Spark]] |
| 10 | ||||
| d19bf0 | Kaushal Lamkhade | 2025-09-25 08:00:07 | 11 | # Project Description |
| 12 | ||||
| 13 | The **Client Communication Management Application** is a multi-tenant platform designed to help businesses manage customer interactions through AI-powered communication channels. |
|||
| 23a3e5 | Vaishnavi Shinde | 2025-10-07 13:11:36 | 14 | It allows each client to onboard their projects, configure communication channels (Telegram, Email, etc.), integrate with preferred AI models (ChatGPT, Gemini, etc.), and leverage a knowledge base for context-aware responses. |
| d19bf0 | Kaushal Lamkhade | 2025-09-25 08:00:07 | 15 | |
| 16 | The application provides: |
|||
| 17 | - A dedicated **client dashboard** for project setup, knowledge base upload, and communication channel configuration. |
|||
| 18 | - A **customer-facing AI interface** (chat page, Telegram bot, or email integration) where end-users can interact with the AI assistant. |
|||
| 19 | - An **admin dashboard** to monitor, review, and override AI responses when necessary. |
|||
| 20 | ||||
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 21 | Uploaded project documents and external resources are indexed in a knowledge base powered by vector embeddings (Postgres `pgvector`). This enables retrieval-augmented generation (RAG), ensuring AI responses are accurate and project-specific. |
| d19bf0 | Kaushal Lamkhade | 2025-09-25 08:00:07 | 22 | |
| 23 | The platform supports multiple AI connectors, enabling flexibility for businesses to choose the best model for their needs. Clients can seamlessly manage communication, while administrators maintain oversight and control over all conversations. |
|||
| 24 | ||||
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 25 | The system is built on a Go lang backend, PostgreSQL database, and integrates with external APIs for AI, messaging, email, and storage services. |
| d19bf0 | Kaushal Lamkhade | 2025-09-25 08:00:07 | 26 | |
| 27 | ||||
| b2b8d4 | Kaushal Lamkhade | 2025-09-25 08:09:13 | 28 | # System Architecture |
| 111e06 | Kaushal Lamkhade | 2025-09-25 07:54:36 | 29 | |
| 30 | ## Frontend |
|||
| 23a3e5 | Vaishnavi Shinde | 2025-10-07 13:11:36 | 31 | |
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 32 | - **UI:** React |
| 23a3e5 | Vaishnavi Shinde | 2025-10-07 13:11:36 | 33 | |
| 34 | - **Build Tool:** Vite |
|||
| 35 | ||||
| 36 | - **Routing:** TanStack Router |
|||
| 37 | ||||
| 38 | - **Type Checking:** TypeScript |
|||
| 39 | ||||
| 40 | - **Linting/Formatting:** Eslint & Prettier |
|||
| 41 | ||||
| 42 | - **Icons:** Lucide Icons, Tabler Icons (Brand icons only) |
|||
| 43 | ||||
| 111e06 | Kaushal Lamkhade | 2025-09-25 07:54:36 | 44 | - **Client dashboard**: onboarding, project setup, knowledge base upload, channel configuration |
| 45 | - **Customer-facing AI bot interface**: chat page embedded in clientโs site, Telegram, email, etc. |
|||
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 46 | |
| 111e06 | Kaushal Lamkhade | 2025-09-25 07:54:36 | 47 | |
| c8d48c | Vaishnavi Shinde | 2025-10-16 07:09:56 | 48 | ## Backend (Go) |
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 49 | - **Core framework**: Go (Golang) using a modular, clean architecture pattern. |
| 50 | - **API layer: Standard** Go HTTP server with Gin for routing. |
|||
| c8d48c | Vaishnavi Shinde | 2025-10-16 07:09:56 | 51 | - **Authentication & Accounts**: JWT-based multi-tenant authentication. |
| 52 | - **Project & Channel Management**: Business logic for workspaces, channels, and configurations. |
|||
| 53 | - **Message Orchestration**: Handles incoming messages, context injection, AI processing pipeline, and logging. |
|||
| 54 | - **Knowledge Base Integration**: Document ingestion, indexing, and retrieval pipeline in Go. |
|||
| 55 | ||||
| 111e06 | Kaushal Lamkhade | 2025-09-25 07:54:36 | 56 | |
| 57 | ## Database |
|||
| 9aef94 | Kaushal Lamkhade | 2025-09-25 08:03:55 | 58 | - **PostgreSQL**: for structured data (users, projects, configs, logs) |
| 23a3e5 | Vaishnavi Shinde | 2025-10-07 13:11:36 | 59 | - **Vector DB**: pgvector |
| 111e06 | Kaushal Lamkhade | 2025-09-25 07:54:36 | 60 | |
| 61 | ## AI / NLP |
|||
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 62 | - **Connector**: OpenAI API (Gemini) |
| 111e06 | Kaushal Lamkhade | 2025-09-25 07:54:36 | 63 | - **Pre-/Post-processing pipeline**: inject context, system prompts, etc. |
| 64 | - **Retrieval Augmented Generation (RAG)**: option to fine-tune or use RAG with knowledge base |
|||
| 65 | ||||
| 66 | ## Communication Integrations |
|||
| 67 | - **Telegram Bot API**: customer chats |
|||
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 68 | - **Email Gateway**: SMTP + IMAP, or services like SendGrid |
| 111e06 | Kaushal Lamkhade | 2025-09-25 07:54:36 | 69 | |
| 70 | ## File Handling & Knowledge Base |
|||
| 71 | - **File parser**: PDF, DOCX, TXT |
|||
| 72 | - **Cloud storage integration**: Google Drive/Dropbox API for linked knowledge sources |
|||
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 73 | - **Embeddings generator**: OLLAMA_MODEL(bge-m3) |
| 111e06 | Kaushal Lamkhade | 2025-09-25 07:54:36 | 74 | - **Indexing service**: store embeddings into Vector DB |
| 75 | ||||
| 76 | ## Infrastructure |
|||
| 9aef94 | Kaushal Lamkhade | 2025-09-25 08:03:55 | 77 | - **Cloud deployment**: AWS |
| 111e06 | Kaushal Lamkhade | 2025-09-25 07:54:36 | 78 | - **Containerization**: Docker |
| 79 | - **Caching**: Redis for messages and sessions |
|||
| 9aef94 | Kaushal Lamkhade | 2025-09-25 08:03:55 | 80 | - **CI/CD**: GITLAB |
| 00bb19 | Kaushal Lamkhade | 2025-09-25 07:58:08 | 81 | |
| 9aedda | Kaushal Lamkhade | 2025-09-25 08:22:52 | 82 | ## System Architecutre Diagram |
| 2da127 | Kaushal Lamkhade | 2025-10-13 07:20:03 | 83 |  |
| 00bb19 | Kaushal Lamkhade | 2025-09-25 07:58:08 | 84 | |
| 85 | ## 1. Tech Stack |
|||
| c8d48c | Vaishnavi Shinde | 2025-10-16 07:09:56 | 86 | - **Backend (Go backend)** |
| 87 | - The backend is implemented in Go, providing a performant and scalable foundation for multi-tenant communication workflows. |
|||
| 00bb19 | Kaushal Lamkhade | 2025-09-25 07:58:08 | 88 | - **Database** |
| 9aef94 | Kaushal Lamkhade | 2025-09-25 08:03:55 | 89 | - **PostgreSQL** (perfectly suited for multi-tenant, relational data storage). |
| 00bb19 | Kaushal Lamkhade | 2025-09-25 07:58:08 | 90 | - **Frontend** |
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 91 | - React , vite |
| 00bb19 | Kaushal Lamkhade | 2025-09-25 07:58:08 | 92 | - Admin dashboard + Client dashboard. |
| 93 | - **AI/ML Integrations** |
|||
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 94 | - OpenAI API. |
| 23a3e5 | Vaishnavi Shinde | 2025-10-07 13:11:36 | 95 | - Knowledge Base Indexing (e.g., **LangChain + Vector DB** like **Postgres pgvector**). |
| 00bb19 | Kaushal Lamkhade | 2025-09-25 07:58:08 | 96 | - MCP Server (for tool orchestration + context passing). |
| 97 | - **Communication Channels** |
|||
| 98 | - **Telegram Bot API** integration. |
|||
| 99 | - **Email integration** (IMAP/SMTP or services like SendGrid/Mailgun). |
|||
| 100 | - **Infrastructure** |
|||
| 101 | - Docker for containerization. |
|||
| 102 | - Nginx / Traefik for reverse proxy. |
|||
| 103 | - Optional: Kubernetes for scaling. |
|||
| 104 | ||||
| 105 | --- |
|||
| 106 | ||||
| 107 | ## 2. Core Modules & Features |
|||
| 108 | ||||
| 109 | ### ๐น Client Onboarding |
|||
| 23a3e5 | Vaishnavi Shinde | 2025-10-07 13:11:36 | 110 | |
| 00bb19 | Kaushal Lamkhade | 2025-09-25 07:58:08 | 111 | - Form to capture client + project details. |
| 112 | - Generate dedicated project page for embedding AI bot. |
|||
| 113 | - Multi-tenant user management (each client = tenant). |
|||
| 114 | ||||
| 115 | ### ๐น Communication Channels |
|||
| 116 | - Configurable options for each client: |
|||
| 117 | - Telegram bot setup. |
|||
| 118 | - Email inbox setup. |
|||
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 119 | - Future: Slack. |
| 00bb19 | Kaushal Lamkhade | 2025-09-25 07:58:08 | 120 | |
| 121 | ### ๐น AI Model Connector |
|||
| 122 | - Ability to select which AI model: |
|||
| 123 | - ChatGPT (OpenAI). |
|||
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 124 | - Gemini |
| 125 | - Ollama. |
|||
| 00bb19 | Kaushal Lamkhade | 2025-09-25 07:58:08 | 126 | - Standardized response pipeline regardless of model. |
| 127 | ||||
| 128 | ### ๐น Knowledge Base |
|||
| 129 | - Upload project docs (PDF, DOCX, TXT). |
|||
| 130 | - Import from Drive links / Notion / Confluence. |
|||
| 131 | - Store embeddings in **pgvector** (Postgres extension). |
|||
| 132 | - Retrieval-Augmented Generation (RAG) for query responses. |
|||
| a48fca | Vaishnavi Shinde | 2025-11-13 07:32:16 | 133 | - |
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 134 | ### ๐น MCP (Model Context Protocol) |
| a48fca | Vaishnavi Shinde | 2025-11-13 07:32:16 | 135 | - Centralized system for managing **connections between AI agents and models**. |
| 136 | - Handles authentication, routing, and configuration for both **local** and **remote** models. |
|||
| 137 | - Decouples application logic from model APIs, enabling **dynamic model switching**. |
|||
| 138 | - Standardizes inference requests and responses for consistent performance. |
|||
| 139 | - Forms the foundation for future **multi-model orchestration** and **context-aware AI pipelines**. |
|||
| 54a3fa | Vaishnavi Shinde | 2025-12-08 09:28:43 | 140 |  |
| 141 |  |
|||
| 142 |  |
|||
| 00bb19 | Kaushal Lamkhade | 2025-09-25 07:58:08 | 143 | |
| 144 | ### ๐น Query Processing |
|||
| 145 | - Customer submits query โ AI pipeline: |
|||
| 146 | 1. Normalize input. |
|||
| 147 | 2. Retrieve context from Knowledge Base. |
|||
| 148 | 3. Feed context + query to chosen AI model. |
|||
| 149 | 4. Return AI response. |
|||
| 150 | - Option for admin override & monitoring. |
|||
| 151 | ||||
| 152 | ### ๐น Monitoring & Admin Portal |
|||
| 153 | - View all conversations per client/project. |
|||
| 154 | - Override/edit AI responses. |
|||
| 155 | - Track usage per channel/model. |
|||
| 156 | - Analytics & logs. |
|||
| 157 | ||||
| 54a3fa | Vaishnavi Shinde | 2025-12-08 09:28:43 | 158 | ### RAG system- |
| 159 |  |
|||
| 160 | ||||
| 161 | ||||
| 9aedda | Kaushal Lamkhade | 2025-09-25 08:22:52 | 162 | ## Dataflow Diagram |
| 2da127 | Kaushal Lamkhade | 2025-10-13 07:20:03 | 163 |  |
| 698f26 | Kaushal Lamkhade | 2025-09-25 08:21:24 | 164 | |
| 00bb19 | Kaushal Lamkhade | 2025-09-25 07:58:08 | 165 | --- |
| 166 | ||||
| 167 | ||||
| c8d48c | Vaishnavi Shinde | 2025-10-16 07:09:56 | 168 | ## 3. Database Design (PostgreSQL) |
| 169 | ||||
| 170 | ### Tables |
|||
| 171 | ||||
| 172 | - **`accounts`** |
|||
| 173 | Stores client/organization information. |
|||
| 174 | **Fields:** |
|||
| 175 | - `id` (string, PK) |
|||
| 176 | - `name` (varchar(150)) |
|||
| 177 | - `domain` (varchar(100)) |
|||
| 178 | - `description` (text) |
|||
| 179 | ||||
| 180 | - **`workspaces`** |
|||
| 181 | Stores project metadata linked to an account. |
|||
| 182 | **Fields:** |
|||
| 183 | - `id` (string, PK) |
|||
| 184 | - `account_id` (string, FK โ accounts.id) |
|||
| 185 | - `name` (varchar(150)) |
|||
| 186 | - `description` (text) |
|||
| 187 | ||||
| 188 | - **`users`** |
|||
| 189 | Stores basic user profile information. |
|||
| 190 | **Fields:** |
|||
| 191 | - `id` (string, PK) |
|||
| 192 | - `username` (varchar(50)) |
|||
| 193 | - `full_name` (varchar(150)) |
|||
| 194 | - `email` (varchar(150)) |
|||
| 195 | - `phone_number` (varchar(20)) |
|||
| 196 | - `password_hash` (varchar(255)) |
|||
| 197 | - `auth_token` (varchar(500)) |
|||
| 198 | ||||
| 199 | - **`user_accounts`** |
|||
| 200 | Maps users to accounts and optionally workspaces; stores roles and status. |
|||
| 201 | **Fields:** |
|||
| 202 | - `id` (string, PK) |
|||
| 203 | - `user_id` (string, FK โ users.id) |
|||
| 204 | - `account_id` (string, FK โ accounts.id) |
|||
| 205 | - `workspace_id` (string, nullable, FK โ workspaces.id) |
|||
| 206 | - `role` (varchar(50)) |
|||
| 207 | - `status` (varchar(50)) |
|||
| 208 | ||||
| 209 | - **`workspace_users`** |
|||
| 210 | Maps users to workspaces for workspace-specific roles/status. |
|||
| 211 | **Fields:** |
|||
| 212 | - `id` (string, PK) |
|||
| 213 | - `user_id` (string, FK โ users.id) |
|||
| 214 | - `workspace_id` (string, FK โ workspaces.id) |
|||
| 215 | - `role` (varchar(50)) |
|||
| 216 | - `status` (varchar(50)) |
|||
| 217 | ||||
| 218 | - **`groups`** |
|||
| 219 | Represents functional teams or user groups within a workspace. |
|||
| 220 | **Fields:** |
|||
| 221 | - `id` (string, PK) |
|||
| 222 | - `workspace_id` (string, FK โ workspaces.id) |
|||
| 223 | - `name` (varchar(100)) |
|||
| 224 | - `description` (text) |
|||
| 225 | ||||
| 226 | - **`group_users`** |
|||
| 227 | Maps users to groups. |
|||
| 228 | **Fields:** |
|||
| 229 | - `id` (string, PK) |
|||
| 230 | - `group_id` (string, FK โ groups.id) |
|||
| 231 | - `user_id` (string, FK โ users.id) |
|||
| 232 | - `role` (varchar(50)) |
|||
| 233 | ||||
| 234 | - **`channels`** |
|||
| 235 | Configured communication channels within a workspace. |
|||
| 236 | **Fields:** |
|||
| 237 | - `id` (string, PK) |
|||
| 238 | - `workspace_id` (string, FK โ workspaces.id) |
|||
| 239 | - `type` (varchar(50)) |
|||
| 240 | - `config` (jsonb) |
|||
| 241 | - `description` (text) |
|||
| 242 | ||||
| 243 | - **`ai_models`** |
|||
| 244 | Available AI model connectors for accounts. |
|||
| 245 | **Fields:** |
|||
| 246 | - `id` (string, PK) |
|||
| 247 | - `account_id` (string, FK โ accounts.id) |
|||
| 248 | - `name` (varchar(100)) |
|||
| 249 | - `ai_type` (varchar(50)) |
|||
| 250 | - `version` (varchar(50)) |
|||
| 251 | - `config` (jsonb) |
|||
| 252 | - `description` (text) |
|||
| 253 | ||||
| 254 | - **`ai_agents`** |
|||
| 255 | Agents linked to a workspace and a single channel; connect to AI models. |
|||
| 256 | **Fields:** |
|||
| 257 | - `id` (string, PK) |
|||
| 258 | - `workspace_id` (string, FK โ workspaces.id) |
|||
| 259 | - `channel_id` (string, unique, FK โ channels.id) |
|||
| 260 | - `ai_model_id` (string, FK โ ai_models.id) |
|||
| 261 | - `name` (varchar(100)) |
|||
| 262 | - `status` (varchar(50)) |
|||
| 263 | - `description` (text) |
|||
| 264 | ||||
| 265 | - **`mcp_connections`** |
|||
| 266 | Stores Message Coordination Processor connection configuration. |
|||
| 267 | **Fields:** |
|||
| 268 | - `id` (string, PK) |
|||
| 269 | - `workspace_id` (string, FK โ workspaces.id) |
|||
| 270 | - `type` (varchar(50)) |
|||
| 271 | - `config` (jsonb) |
|||
| 272 | - `description` (text) |
|||
| 273 | ||||
| 274 | - **`mcp_logs`** |
|||
| 275 | Stores request and response logs for MCP connections. |
|||
| 276 | **Fields:** |
|||
| 277 | - `id` (string, PK) |
|||
| 278 | - `mcp_connection_id` (string, FK โ mcp_connections.id) |
|||
| 279 | - `request_data` (jsonb) |
|||
| 280 | - `response_data` (jsonb) |
|||
| 281 | - `status` (varchar(50)) |
|||
| 282 | - `log_timestamp` (timestamp) |
|||
| 283 | ||||
| 284 | - **`knowledge_bases`** |
|||
| 285 | Stores knowledge base entries linked to workspaces. |
|||
| 286 | **Fields:** |
|||
| 287 | - `id` (string, PK) |
|||
| 288 | - `workspace_id` (string, FK โ workspaces.id) |
|||
| 289 | - `title` (varchar(200)) |
|||
| 290 | - `description` (text) |
|||
| 291 | ||||
| 292 | - **`kb_files`** |
|||
| 293 | Stores files uploaded to a knowledge base. |
|||
| 294 | **Fields:** |
|||
| 295 | - `id` (string, PK) |
|||
| 296 | - `knowledge_base_id` (string, FK โ knowledge_bases.id) |
|||
| 297 | - `workspace_id` (string, FK โ workspaces.id) |
|||
| 298 | - `user_id` (string, FK โ users.id) |
|||
| 299 | - `file_name` (varchar(255)) |
|||
| 300 | - `file_path` (text) |
|||
| 301 | - `mime_type` (varchar(100)) |
|||
| 302 | - `file_size` (bigint) |
|||
| 303 | ||||
| 304 | - **`kb_file_chunks`** |
|||
| 305 | Stores content chunks for each knowledge base file, along with vector embeddings. |
|||
| 306 | **Fields:** |
|||
| 307 | - `id` (string, PK) |
|||
| 308 | - `kb_file_id` (string, FK โ kb_files.id) |
|||
| 309 | - `chunk_index` (int) |
|||
| 310 | - `content` (text) |
|||
| 311 | - `vector_embedding` (text) |
|||
| 312 | ||||
| 313 | - **`tasks`** |
|||
| 314 | Tracks tasks created in a workspace (optionally linked to a conversation). |
|||
| 315 | **Fields:** |
|||
| 316 | - `id` (string, PK) |
|||
| 317 | - `workspace_id` (string, FK โ workspaces.id) |
|||
| 318 | - `agent_id` (string, FK โ ai_agents.id) |
|||
| 319 | - `user_id` (string, FK โ users.id) |
|||
| 320 | - `conversation_id` (string, nullable, FK โ conversations.id) |
|||
| 321 | - `title` (varchar(200)) |
|||
| 322 | - `description` (text) |
|||
| 323 | - `status` (varchar(50)) |
|||
| 324 | ||||
| 325 | - **`task_activity`** |
|||
| 326 | Logs actions and updates performed on tasks. |
|||
| 327 | **Fields:** |
|||
| 328 | - `id` (string, PK) |
|||
| 329 | - `task_id` (string, FK โ tasks.id) |
|||
| 330 | - `action` (varchar(100)) |
|||
| 331 | - `performed_by` (string) |
|||
| 332 | - `details` (jsonb) |
|||
| 333 | - `activity_timestamp` (timestamp) |
|||
| 334 | ||||
| 335 | - **`conversations`** |
|||
| 336 | Stores conversation metadata within a workspace. |
|||
| 337 | **Fields:** |
|||
| 338 | - `id` (string, PK) |
|||
| 339 | - `workspace_id` (string, FK โ workspaces.id) |
|||
| 340 | - `channel_id` (string, FK โ channels.id) |
|||
| 341 | - `agent_id` (string, FK โ ai_agents.id) |
|||
| 342 | - `title` (varchar(200)) |
|||
| 343 | - `status` (varchar(50)) |
|||
| 344 | ||||
| 345 | - **`messages`** |
|||
| 346 | Stores messages in a conversation, including prompts and memory/archive info. |
|||
| 347 | **Fields:** |
|||
| 348 | - `id` (string, PK) |
|||
| 349 | - `conversation_id` (string, FK โ conversations.id) |
|||
| 350 | - `user_id` (string, FK โ users.id) |
|||
| 351 | - `sender_type` (varchar(50)) |
|||
| 352 | - `prompt_id` (string, nullable) |
|||
| 353 | - `content` (text) |
|||
| 354 | - `is_memory_archived` (bool) |
|||
| 355 | - `metadata` (jsonb) |
|||
| 356 | ||||
| 357 | - **`memories`** |
|||
| 358 | Stores memory entries for agents within a conversation. |
|||
| 359 | **Fields:** |
|||
| 360 | - `id` (string, PK) |
|||
| 361 | - `agent_id` (string, FK โ ai_agents.id) |
|||
| 362 | - `conversation_id` (string, FK โ conversations.id) |
|||
| 363 | - `memory_type` (varchar(50)) |
|||
| 364 | - `content` (text) |
|||
| 365 | ||||
| 366 | - **`invites`** |
|||
| 367 | Stores workspace invitation records for users. |
|||
| 368 | **Fields:** |
|||
| 369 | - `id` (string, PK) |
|||
| 370 | - `workspace_id` (string, FK โ workspaces.id) |
|||
| 371 | - `email` (varchar(150)) |
|||
| 372 | - `role` (varchar(50)) |
|||
| 373 | - `token` (varchar(255)) |
|||
| 374 | - `status` (varchar(50)) |
|||
| 375 | - `invited_by` (string, FK โ users.id) |
|||
| 376 | - `expires_at` (timestamp) |
|||
| 00bb19 | Kaushal Lamkhade | 2025-09-25 07:58:08 | 377 | |
| 378 | ||||
| 379 | --- |
|||
| 380 | ||||
| 381 | ## 4. External Integrations |
|||
| 382 | - **Telegram Bot API** โ Webhook for messages. |
|||
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 383 | - **Email API** โ SendGrid. |
| 384 | - **AI APIs** โ OpenAI, Gemini, etc. |
|||
| 00bb19 | Kaushal Lamkhade | 2025-09-25 07:58:08 | 385 | - **Drive APIs** โ Google Drive API (for fetching docs). |
| 386 | - **Authentication** โ JWT or OAuth2 (multi-tenant). |
|||
| 387 | ||||
| 388 | --- |
|||
| 389 | ||||
| 390 | ## 5. Deployment & Scaling |
|||
| 391 | - Containerize with Docker. |
|||
| 392 | - CI/CD (GitHub Actions / GitLab CI). |
|||
| 393 | - Cloud hosting (AWS/GCP/Azure/DigitalOcean). |
|||
| 394 | - Use Postgres + pgvector for persistence + semantic search. |
|||
| 395 | - Caching layer (Redis) for session storage & rate limiting. |
|||
| 396 | ||||
| 397 | --- |
|||
| 82801a | Kaushal Lamkhade | 2025-09-25 08:28:05 | 398 | |
| c8d48c | Vaishnavi Shinde | 2025-10-16 07:09:56 | 399 | # Sequence Diagram - [Click to View](https://getu.at/hWuEId) |
| 2da127 | Kaushal Lamkhade | 2025-10-13 07:20:03 | 400 | |
| 401 | ```mermaid |
|||
| 402 | sequenceDiagram |
|||
| c8d48c | Vaishnavi Shinde | 2025-10-16 07:09:56 | 403 | %% Participants |
| 404 | participant ClientUser as Client (Registers on Comnet) |
|||
| 405 | participant Comnet as Comnet System |
|||
| 406 | participant Workspace as Workspace (Project) |
|||
| 407 | participant WorkspaceOwner as Workspace Owner (ClientUser Role) |
|||
| 408 | participant ChannelConfig as Channel Configuration |
|||
| 409 | participant Channel as Communication Channel (Email/Telegram/SMS) |
|||
| 410 | participant Agent as Channel Agent |
|||
| 411 | participant Customer as Customer (Client's customer) |
|||
| 412 | participant MCP as MCP Server (Message Coordination Processor) |
|||
| 413 | participant AI as AI Model (ChatGPT/Gemini) |
|||
| 414 | participant KB as Knowledge Base |
|||
| 415 | participant Task as Task Management Module |
|||
| 416 | participant Group as Group (Managers & Members) |
|||
| 417 | participant Member as Group Member |
|||
| 418 | ||||
| 419 | %% Registration and Workspace Creation by Client (Workspace Owner) |
|||
| 420 | ClientUser->>Comnet: Register account |
|||
| 421 | Comnet-->>ClientUser: Account created |
|||
| 422 | ClientUser->>Workspace: Create new workspace (project) |
|||
| 423 | Workspace-->>ClientUser: Workspace created |
|||
| 424 | ClientUser->>WorkspaceOwner: Become workspace owner |
|||
| 425 | ||||
| 426 | %% Workspace Setup & Channel Configuration (done by workspace owner) |
|||
| 427 | ||||
| 428 | WorkspaceOwner->>Workspace: Create groups and assign roles (Manager / Member) |
|||
| 429 | WorkspaceOwner->>ChannelConfig: Add and configure channels (Email / Telegram / SMS) |
|||
| 430 | ChannelConfig-->>Workspace: Channels registered and linked to workspace |
|||
| 431 | ChannelConfig->>Agent: Provision Channel Agents for each channel |
|||
| 432 | Agent-->>Workspace: Channel Agents ready and bound to workspace |
|||
| 433 | ||||
| 434 | %% Normal flow: Customer raises query on a configured channel |
|||
| 435 | Customer->>Channel: Send message/query (via configured channel) |
|||
| 436 | Channel->>Agent: Channel Agent receives and forwards message |
|||
| 437 | Agent->>MCP: Forward message + workspace context (client id, channel id, conversation history) |
|||
| 438 | ||||
| 439 | %% AI processing using KB and workspace context |
|||
| 440 | MCP->>AI: Send message + workspace context + KB pointers |
|||
| 441 | AI->>KB: Request relevant KB entries and workspace-specific context |
|||
| 442 | KB-->>AI: Return KB results and context |
|||
| 443 | AI-->>MCP: Return generated response + intent detection (actionable? yes/no) + confidence |
|||
| 444 | ||||
| 445 | %% Conditional: If AI detects actionable intent -> create task in same workspace and assign to group |
|||
| 446 | alt Actionable intent detected |
|||
| 447 | MCP->>Task: Create Task in Workspace (details, priority, assignee group) |
|||
| 448 | Task->>Group: Assign task to specific group or manager |
|||
| 449 | Group-->>Task: Acknowledgement of task assignment |
|||
| 450 | Task->>Workspace: Log task creation and link it to conversation |
|||
| 451 | Workspace-->>WorkspaceOwner: Notify workspace members (or assigned group) of new task |
|||
| 2da127 | Kaushal Lamkhade | 2025-10-13 07:20:03 | 452 | end |
| 453 | ||||
| c8d48c | Vaishnavi Shinde | 2025-10-16 07:09:56 | 454 | %% Response delivery back to customer via same channel |
| 455 | MCP-->>Agent: Return AI-generated reply (and task info if created) |
|||
| 456 | Agent-->>Channel: Send reply via originating channel |
|||
| 457 | Channel-->>Customer: Deliver AI response to customer |
|||
| 458 | ||||
| 459 | %% Group resolves task (if created) |
|||
| 460 | alt Task exists |
|||
| 461 | Member->>Task: View task and start work |
|||
| 462 | Member->>Group: Update task status / add comments / attach files |
|||
| 463 | Group-->>Task: Mark task progress or resolution |
|||
| 464 | Task-->>Workspace: Update task log and notify conversation thread |
|||
| 465 | Workspace-->>Customer: Optionally send status update (via Channel) if configured |
|||
| 1fd46b | Kaushal Lamkhade | 2025-10-16 06:22:18 | 466 | end |
| 2da127 | Kaushal Lamkhade | 2025-10-13 07:20:03 | 467 | |
| c8d48c | Vaishnavi Shinde | 2025-10-16 07:09:56 | 468 | %% Logging, KB updates and analytics (always) |
| 469 | Agent->>Workspace: Log conversation and response metadata |
|||
| 470 | AI->>Workspace: (optional) Suggest KB update based on conversation |
|||
| 471 | Workspace->>KB: Update KB (optional manual review or auto-suggest) |
|||
| 472 | Workspace-->>WorkspaceOwner: Update analytics / reports / conversation history |
|||
| 473 | ||||
| 474 | %% Ongoing conversation loop |
|||
| 475 | Customer-->>Channel: Follow-up messages (loop continues) |
|||
| 476 | Channel->>Agent: Forward follow-ups |
|||
| 477 | Agent->>MCP: Repeat AI processing with updated context |
|||
| 2da127 | Kaushal Lamkhade | 2025-10-13 07:20:03 | 478 | |
| 479 | ``` |
|||
| 480 | ||||
| 82801a | Kaushal Lamkhade | 2025-09-25 08:28:05 | 481 | # Future Scope |
| 482 | ||||
| 483 | The platform is designed with scalability in mind, allowing integration of new features and channels to enhance client communication and management. Planned future improvements include: |
|||
| 484 | ||||
| 485 | ## 1. Additional Communication Channels |
|||
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 486 | - **Channels** |
| 487 | - Integration with email |
|||
| 488 | - Integration with telephony services. |
|||
| 82801a | Kaushal Lamkhade | 2025-09-25 08:28:05 | 489 | - AI-powered call transcription, sentiment analysis, and automated follow-up responses. |
| 490 | ||||
| 491 | ## 2. Ticketing & Workflow Management |
|||
| 06d021 | Vaishnavi Shinde | 2025-12-08 09:10:22 | 492 | - **Jira Integrations** |
| 82801a | Kaushal Lamkhade | 2025-09-25 08:28:05 | 493 | - Automatic ticket creation from client queries. |
| 494 | - Linking AI conversations to tasks and workflows. |
|||
| 495 | - Syncing client issues directly into project management tools. |
|||
| 496 | ||||
| 497 | - **Internal Ticketing System** |
|||
| 498 | - Native ticket creation and tracking within the platform. |
|||
| 499 | - Escalation workflows and admin assignment for unresolved queries. |
|||
| 500 | ||||
| 501 | ## 3. Advanced AI Features |
|||
| 502 | - **Sentiment & Intent Analysis** |
|||
| 503 | - Understanding customer tone and urgency for better prioritization. |
|||
| 504 | ||||
| 505 | - **Personalized AI Responses** |
|||
| 506 | - AI models trained on client-specific style guides and communication tone. |
|||
| 507 | ||||
| 508 | ## 4. Analytics & Insights |
|||
| 509 | - Advanced reporting on client queries, response times, and AI performance. |
|||
| 510 | - Predictive analytics for identifying recurring issues or potential churn risks. |
|||
| 511 | - Exportable insights for stakeholders. |
|||
| 512 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 513 | ## ๐ธ Scope of Demo 1 |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 514 | |
| 515 | The first demo of **CommNet** establishes the **core multi-tenant communication foundation** and **essential management modules**. |
|||
| 516 | ||||
| 517 | --- |
|||
| 518 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 519 | ### โ
Completed in Demo 1 |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 520 | |
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 521 | #### ๐งฉ Client Onboarding & Authentication |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 522 | - Registration, login, and onboarding workflows for businesses. |
| 523 | - Multi-tenant user and organization setup. |
|||
| 524 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 525 | #### ๐ค AI Model Management |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 526 | - Create, update, and manage AI connectors. |
| 527 | - Support for pluggable AI model configurations. |
|||
| 528 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 529 | #### ๐ข Workspace Management |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 530 | - Create and manage workspaces under business accounts. |
| 531 | - Link AI models to specific workspaces. |
|||
| 532 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 533 | #### โ๏ธ MCP Server Management |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 534 | - Configure and manage MCP connections. |
| 535 | - Store, validate, and monitor MCP configurations. |
|||
| 536 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 537 | #### ๐ฌ Communication Channel (Telegram) |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 538 | - Telegram bot setup and configuration as the first supported channel. |
| 539 | - Webhook-based message handling integrated with MCP and AI pipelines. |
|||
| 540 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 541 | #### ๐ง AI Agent Management |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 542 | - Manage AI agents linked to workspaces and channels. |
| 543 | - Configure model bindings, activation states, and AI routing logic. |
|||
| 544 | ||||
| 545 | --- |
|||
| 546 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 547 | ### ๐ฎ Future Scope |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 548 | |
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 549 | ### A. Functional Enhancements |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 550 | |
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 551 | #### ๐ Knowledge Base (KB) Management |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 552 | - Upload, parse, and index documents (**PDF**, **DOCX**, **TXT**). |
| 553 | - Store embeddings using **pgvector** for contextual **RAG** responses. |
|||
| 554 | - Support integration with **Google Drive** and other data sources. |
|||
| 555 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 556 | #### ๐ฌ Conversation & Message Flow |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 557 | - End-to-end conversation orchestration between channels, MCP, and AI models. |
| 558 | - Store conversation history, enable admin override, and manage AI memory. |
|||
| 559 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 560 | #### ๐ Task & Group Management |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 561 | - Auto-create tasks from actionable AI intents. |
| 562 | - Assign and track tasks within workspace groups. |
|||
| 563 | - Provide activity logs and notifications. |
|||
| 564 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 565 | #### ๐ Additional Communication Channels |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 566 | - Extend support to **Email (IMAP/SMTP, SendGrid)** and **WhatsApp Business API**. |
| 567 | - Standardized message orchestration across all channels. |
|||
| 568 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 569 | #### ๐ Admin & Analytics Dashboard |
| 577131 | Vaishnavi Shinde | 2025-11-13 07:46:11 | 570 | - Comprehensive dashboard for monitoring usage, AI performance, and matrix. |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 571 | - Reports for workspace activity, AI accuracy, and user engagement. |
| 572 | ||||
| 573 | --- |
|||
| 574 | ||||
| 575 | ## B. Non-Functional Enhancements |
|||
| 576 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 577 | #### ๐ Scalability & Performance |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 578 | - Optimize backend services for high concurrency using **Go routines**. |
| 579 | - Container orchestration via **Docker/Kubernetes** for horizontal scaling. |
|||
| 580 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 581 | #### ๐ Security & Compliance |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 582 | - Role-Based Access Control (**RBAC**). |
| 583 | - **JWT/OAuth2** authentication with tenant isolation. |
|||
| 584 | - Data encryption at rest and in transit. |
|||
| 585 | - Audit logs for compliance (**GDPR-ready**). |
|||
| 586 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 587 | #### โ๏ธ Reliability & Observability |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 588 | - Centralized logging using **Grafana + Loki + Prometheus**. |
| 589 | - Real-time error tracking and health checks. |
|||
| 590 | - Backup and disaster recovery mechanisms. |
|||
| 591 | ||||
| 03f443 | Vaishnavi Shinde | 2025-11-13 07:51:35 | 592 | #### ๐จ User Experience |
| 76a278 | Vaishnavi Shinde | 2025-11-13 06:27:56 | 593 | - Improved UI using **ShadcnUI** components. |
| 594 | - Responsive layouts and faster navigation with **Vite + TanStack Router**. |