Skip to content

Latest commit

Β 

History

History
246 lines (196 loc) Β· 7.21 KB

File metadata and controls

246 lines (196 loc) Β· 7.21 KB
# 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