Secure, AI-powered access to enterprise data through intelligent chat, role-based access control, and Retrieval-Augmented Generation.
Revolutionizing secure and efficient access to enterprise data through AI-powered interactions.
Enterprises struggle to give employees secure, efficient access to corporate data. Traditional systems lack scalability, real-time querying, and reliably enforced role-based permissions β leaving fragmented access points and complex interfaces that hurt productivity and raise security risks.
Covalence AI solves this by combining advanced machine learning, role-based access control (RBAC), and dynamic AI chat interfaces. Employees interact with corporate data through natural language; every request is filtered through an ML-based access-control decision engine before retrieval, and responses are grounded with Retrieval-Augmented Generation (RAG) for accuracy.
Built by team India AI with Groq-powered RAG and dynamic UI generation.
- Natural-language queries over enterprise data with accurate, context-aware answers
- RAG architecture (LangChain + Chroma vector store) for grounded, source-aware responses
- ML-based decision engine (Random Forest classifier) analyzes every access request against user role, department, data sensitivity, and request intent
- Role-based permissions enforced across admin and employee experiences
- Process and extract insights from PDFs, CSVs, images, YouTube videos, and audio (Whisper transcription)
- Unified embeddings pipeline indexes heterogeneous sources into a vector database
- Chat interface that renders context-aware UI components (charts, tables, forms) based on query intent
- Powered by the Vercel AI SDK with Groq / OpenAI / xAI model support
- Real-time analytics: system usage, access patterns, and flagged requests
- User & permission management, data upload controls, and settings
- Chat assistant, document browsing, data uploads, access requests, and AI action suggestions
| Layer | Technologies |
|---|---|
| Frontend (Dashboard) | React 18, TypeScript, Vite, TailwindCSS, Chart.js, Recharts, Framer Motion |
| Chat (Dynamic UI) | Next.js 14, Vercel AI SDK, Groq, OpenAI, xAI, React Markdown |
| ML Backend | Flask, FastAPI, PyTorch, TensorFlow, scikit-learn (Random Forest), transformers |
| RAG Pipeline | LangChain, LangChain-Groq, Chroma DB, OpenAI embeddings, Hugging Face |
| Data & Media | pandas, numpy, PyPDF, moviepy, faster-whisper, youtube-transcript-api |
| Storage | Chroma vector database, Vercel KV |
| HTTP Client | Axios |
CovalenceAI-main/
βββ frontend/ # React + TypeScript admin/employee dashboard (Vite)
β βββ src/
β βββ pages/ # Admin & employee pages (Dashboard, Analytics, Chatβ¦)
β βββ layouts/ # Admin & employee layouts
β βββ contexts/ # Auth & theme context providers
β βββ services/ # API client
β βββ routes/ # Protected route guards
βββ chat-dynamic/ # Next.js AI chat with dynamic UI generation
β βββ app/ # Next.js app router
β βββ components/ # Chat & UI components
β βββ public/ # Static assets
β βββ .env.example # API key template
βββ ml/ # ML & RAG services (Flask)
β βββ app.py # Flask API: access control + RAG queries
β βββ all_embeddings_of_files.py # Embeddings pipeline & query answering
β βββ decision_logic_access_control.py # ML access decision logic
β βββ pdf_rag.py / rag_for_csv.py / rag_for_video.py # Per-format RAG
β βββ faster-transcription.ipynb # Whisper transcription notebook
β βββ requirements.txt
βββ convulance-mohit/ # FastAPI query classifier + corporate grounding
βββ app.py # FastAPI server (query classification API)
βββ main_model.py # Core classification & query processing
βββ access_control_model.py # Access control model logic
βββ corporate_grounding.py # Corporate data grounding
βββ requirements.txt
- Node.js v16+ (v20+ recommended)
- Python 3.8+
- npm or yarn
- API keys: Groq and OpenAI (for LLM + embeddings)
git clone https://github.com/comrade-era/CovalenceAI-main.git
cd CovalenceAI-mainCopy the template and add your keys:
cp chat-dynamic/.env.example chat-dynamic/.env.localSet the following (see .env.example at the repo root for all options):
| Variable | Description |
|---|---|
GROQ_API_KEY |
Groq API key (LLM inference for RAG & chat) |
OPENAI_API_KEY |
OpenAI API key (embeddings) |
VITE_GOOGLE_API_KEY |
Google API key (frontend, optional) |
cd ml
pip install -r requirements.txt
# Generate the ML model artifacts (.pkl) the API loads at startup.
# The trained Random Forest + label encoders are git-ignored, so a fresh
# clone must regenerate them before the server will start:
python final_classification_model_training.py
python app.pycd ../chat-dynamic
npm install
npm run dev
# This starts Next.js AND the ML server (see dev:all script)cd ../frontend
npm install
npm run devcd chat-dynamic
npm run dev:allPOST /chatβ RAG-grounded chat answering with access control- Access requests evaluated by the Random Forest classifier + label encoders
POST /classifyβ determines if a query is appropriate for the employee datasetPOST /queryβ processes a user query with corporate grounding- Auto-generated docs at
/(Swagger) and/redoc
# Frontend lint & build
cd frontend && npm run lint && npm run build
# Chat build
cd chat-dynamic && npm run build
# ML server (sanity check)
cd ml && python -c "import app"- π Enhanced ML models for more accurate access-control predictions
- π Advanced security features, including biometric authentication
- π Multi-language support for global enterprises
- π Integration with additional enterprise systems and data sources
- π± Mobile application for on-the-go data access
Dev Pandey β @comrade-era
This project is licensed under the MIT License β see the LICENSE file for details.