# AInSight - Enterprise AI System A full-fledged Enterprise AI System with privacy-first on-device processing. ## π Overview **AInSight** is a comprehensive enterprise AI platform that combines: - **Web Dashboard** for admin management, analytics, and team collaboration - **Mobile App** with RunAnywhere SDK for offline AI processing - **Privacy-First Architecture** - all sensitive data processed on-device ## π― Key Features ### π§ On-Device AI Assistant (Mobile) - β Smart document summaries - β Professional email drafting - β Code assistance - β Task notes & voice memos - β Runs 100% offline using RunAnywhere SDK ### π Secure Admin Dashboard (Web) - β Employee access management - β Usage analytics & productivity trends - β Company-wide announcements - β Feature access control ### π Privacy & Compliance - β All AI inference runs locally on devices - β Only encrypted metadata sent to server - β GDPR & HIPAA compliant architecture - β Perfect for banks, hospitals, and startups ### π¬ AI Workspace Chat - β Encrypted P2P team communication - β Private AI-powered chat summaries (on-device) - β No server-side message storage ### π€ Voice-to-Note + Task Extraction - β Offline voice transcription - β AI-powered task extraction - β Auto-sync to dashboard ## π Project Structure ``` AInSight/ βββ backend/ # Python API Server β βββ app/ β β βββ models/ # Database models β β βββ routes/ # API endpoints β β βββ utils/ # Helpers & utilities β β βββ config.py # Configuration β βββ requirements.txt β βββ run.py β βββ frontend/ # Admin Dashboard β βββ index.html β βββ css/ β βββ js/ β βββ assets/ β βββ mobile/ # Mobile App (React Native) β βββ src/ β β βββ components/ β β βββ screens/ β β βββ services/ # RunAnywhere SDK integration β β βββ utils/ β βββ package.json β βββ README.md β βββ docs/ # Documentation βββ API.md βββ SETUP.md βββ ARCHITECTURE.md ``` ## π Quick Start ### Prerequisites - Python 3.8+ - Node.js 16+ - React Native environment (for mobile) - RunAnywhere SDK account ### Backend Setup ```bash cd backend pip install -r requirements.txt python run.py ``` ### Frontend Setup ```bash cd frontend # Open index.html in browser or serve with: python -m http.server 8080 ``` ### Mobile Setup ```bash cd mobile npm install npm run android # or npm run ios ``` ## ποΈ Architecture ``` βββββββββββββββββββ ββββββββββββββββββββ β Mobile App ββββββββββΊβ Web Backend β β (RunAnywhere) β HTTPS β (REST API) β βββββββββββββββββββ ββββββββββββββββββββ β β β β βΌ βΌ βββββββββββββββββββ ββββββββββββββββββββ β On-Device AI β β Admin Dashboard β β (Private) β β (Analytics) β βββββββββββββββββββ ββββββββββββββββββββ ``` ## π Security Features - **End-to-End Encryption** for all communications - **On-Device Processing** via RunAnywhere SDK - **Zero-Knowledge Architecture** - server never sees raw data - **Token-Based Authentication** (JWT) - **Role-Based Access Control** (RBAC) ## π± Mobile Features 1. **Document Summarizer** - Summarize PDFs, docs, meeting notes 2. **Email Assistant** - Draft professional emails with AI 3. **Code Helper** - Get code suggestions & debugging help 4. **Task Manager** - AI-powered task prioritization 5. **Voice Memos** - Speech-to-text with task extraction ## π₯οΈ Dashboard Features 1. **User Management** - Add/remove employees, set permissions 2. **Analytics** - Usage stats, productivity insights 3. **Announcements** - Broadcast messages to mobile app 4. **Access Control** - Enable/disable features per user 5. **Audit Logs** - Track system usage (privacy-safe) ## π οΈ Tech Stack ### Backend - **Framework**: Flask/FastAPI - **Database**: PostgreSQL/SQLite - **Auth**: JWT tokens - **Encryption**: AES-256, RSA ### Frontend - **UI**: HTML5, CSS3, JavaScript (Vanilla/React) - **Charts**: Chart.js / D3.js - **API Client**: Axios ### Mobile - **Framework**: React Native / Flutter - **AI SDK**: RunAnywhere SDK - **Storage**: SQLite (local) - **Networking**: Axios ## π API Endpoints - `POST /api/auth/login` - Admin login - `GET /api/users` - List employees - `POST /api/users` - Add employee - `GET /api/analytics` - Usage statistics - `POST /api/announcements` - Send announcement - `GET /api/tasks/:userId` - Sync user tasks ## π Local AI Integration Options AInSight supports multiple local AI SDKs for privacy-first, offline AI processing: ### Option 1: **Transformers.js** (Recommended for Web) β ```javascript import { pipeline } from '@xenova/transformers'; // Load model (cached for offline use) const summarizer = await pipeline('summarization', 'Xenova/distilbart-cnn-6-6'); const summary = await summarizer(documentText, { max_length: 130 }); ``` ### Option 2: **WebLLM** (For Advanced Models) ```javascript import * as webllm from "@mlc-ai/web-llm"; const engine = await webllm.CreateMLCEngine("Llama-2-7b-chat-hf-q4f32_1"); const reply = await engine.chat.completions.create({ messages: [{ role: "user", content: "Summarize this..." }] }); ``` ### Option 3: **MLC LLM** (Mobile Apps) ```javascript import * as MLCEngine from 'mlc-llm-react-native'; const engine = await MLCEngine.createEngine({ model: "Llama-2-7b-chat-q4f16_1", device: "auto" }); ``` ### Option 4: **RunAnywhere SDK** (Alternative) ```javascript import { RunAnywhere } from '@runanywhere/sdk'; const ai = new RunAnywhere({ modelType: 'llama-3-8b', offlineMode: true, privacy: 'on-device' }); ``` π **See [LOCAL_AI_OPTIONS.md](./LOCAL_AI_OPTIONS.md) for complete comparison and implementation guide** ### π― Try the Demo! Open `local-ai-demo.html` in your browser to see Transformers.js in action: - β Works 100% offline (after initial model download) - β Document summarization - β Email drafting - β Sentiment analysis - β Code generation - β Task extraction ## π License MIT License - See LICENSE file for details ## π₯ Contributing Contributions welcome! Please read CONTRIBUTING.md first. ## π§ Support For support, email support@ainsight.ai or open an issue. --- **Built with β€οΈ for Enterprise Privacy** # Site: https://alnsight.onrender.com