Skip to content

🛡️ Private AI assistant with Retrieval-Augmented Generation (RAG), secure document Q&A, local and cloud deployment, and full privacy controls. Hybrid Go + Python. Personal use free, contact for commercial license.

License

Notifications You must be signed in to change notification settings

mihaibc/PrivacyCopilot

Repository files navigation

🛡️ Privacy Copilot – Private AI, RAG & Backend Showcase

Privacy Copilot is an open-source, privacy-first platform that empowers individuals and organizations with a secure, local or cloud-deployable AI assistant for document Q&A, retrieval-augmented generation (RAG), and private LLM fine-tuning—without your data ever leaving your control.

This project is also a comprehensive showcase, demonstrating proficiency in:

  • Hybrid backend & AI engineering (Go + Python) with best practices.
  • Microservice and distributed systems architecture.
  • Integration of modern AI (LLMs, RAG, vector databases, fine-tuning).
  • MLOps, DevOps, cloud-native patterns, and CI/CD pipelines.
  • End-to-end privacy engineering and compliance-aware design.

🌟 Key Features

  • Private Document Q&A & Retrieval-Augmented Generation
    Upload documents and ask natural language questions—contextual answers are generated using Retrieval-Augmented Generation (RAG), all running locally or in your private cloud.

  • Per-User Data Isolation & End-to-End Encryption
    All data, embeddings, and models are encrypted at rest and in transit. Each user’s data is fully siloed for maximum privacy.

  • Personalized LLM Fine-Tuning
    (Optional) Fine-tune LLMs using your own documents or chat history, with all computation happening privately in your environment. Models are versioned and rollback-supported.

  • Bring Your Own Model (BYOM)
    Pluggable LLM support—use open-source models (Llama 3, Mistral, GPT-Neo, etc.) or connect your own model endpoints.

  • Multi-Modal Search
    Securely upload and search both text and images, powered by state-of-the-art embedding models.

  • Privacy Controls Dashboard
    Manage, export, or delete your data, review audit logs, and control your models—right from the UI.

  • Modern MLOps & DevOps
    Automated CI/CD, experiment tracking (MLflow), containerized deployment (Docker Compose, Kubernetes), and monitoring tools for both local and cloud setups.

  • Compliance & Security by Design
    Follows privacy-by-design principles (GDPR-aware), audit logging, and secure API access. No telemetry or external calls by default.


🎯 Showcase Goals

This project demonstrates advanced engineering in:

  • Hybrid Go + Python Architecture:
    Go for performant backend API, user management, and privacy enforcement. Python for AI pipelines (LLMs, RAG, embeddings, fine-tuning).
  • Modular Microservices:
    Clean separation between backend, AI services, vector DB, and front end—ready for local or cloud scaling.
  • Cloud-Native & On-Prem Deployments:
    Easily run locally (for full privacy) or scale in your own cloud with Kubernetes/Terraform.
  • AI & MLOps Best Practices:
    From RAG pipelines to model versioning, MLflow tracking, and experiment management.
  • Privacy & Security Engineering:
    User isolation, encryption, detailed audit trails, BYOM for ultimate control.
  • Enterprise-Ready Patterns:
    Role-based access (planned), OAuth2/OIDC support (planned), and compliance-aware architecture.

🛠️ Tech Stack

Category Technologies Used
Architecture Microservices, REST APIs
Backend Languages Go (API Gateway, user/session management), Python (AI/RAG, LLMs, embeddings)
AI/ML HuggingFace, LangChain, FastAPI, MLflow, ChromaDB/FAISS/Qdrant (vector DB)
Frontend React or Streamlit (privacy dashboard & chat UI)
Databases PostgreSQL (user data/audit logs), Vector DB (per-user embeddings), Encrypted Storage
Containerization Docker, Docker Compose
Orchestration Kubernetes/Helm (Cloud), Terraform (Infra as Code, planned)
CI/CD GitHub Actions
Observability Prometheus, Grafana, Jaeger
Security End-to-end encryption, OAuth2/OIDC (planned), audit logging

🚀 Getting Started (Local Development)

📋 Prerequisites

  1. Git: Install Git.
  2. Docker: Install Docker Desktop. Docker Compose required.
  3. Python (optional): For development/debugging AI service outside Docker.
  4. Go: Install Go (for backend development).
  5. (Optional) Ollama: For running certain open-source LLMs locally, see Ollama.
  6. (Optional) jq: JSON CLI tool for testing API responses.

⚙️ Installation & Setup

  1. Clone the Repository:

    git clone https://github.com/<your-username>/privacy-copilot.git
    cd privacy-copilot
  2. Copy & Edit Environment Variables:

    cp .env.example .env
    # Edit .env as needed for DB, AI model paths, ports, etc.
  3. Start the Stack:

    docker-compose up --build -d
    • This starts the Go API gateway, Python AI service, database(s), and vector DB.
    • Default UI at: http://localhost:8080
  4. (Optional) Run Ollama and Download a Model:

    ollama pull llama3
  5. Access Logs and Monitor:

    docker-compose logs -f

🧪 Testing the Platform

Try out the REST API (see API docs) or use the web UI:

  • Upload documents
  • Ask questions (“What is the main idea of this document?”)
  • Export or delete your data from the privacy dashboard
  • (Advanced) Launch a model fine-tuning job from the dashboard or via API

📚 Project Documentation


🤝 Contributing

We welcome community contributions! Please review CONTRIBUTING.md and link all PRs to relevant issues.


🏗️ Project Structure Overview

privacy-copilot/
├── backend/              # Go API gateway
├── ai_service/           # Python FastAPI RAG/LLM service
├── frontend/             # React or Streamlit UI
├── infra/                # Helm charts, Terraform scripts
├── mlops/                # MLflow configs, pipelines, experiment tracking
├── docs/                 # Documentation & API specs
├── docker-compose.yaml   # Local stack orchestration
└── ...                   # Standard configs (LICENSE, .gitignore, etc.)

📫 Contact & Commercial Use

Personal, research, and educational use is free. Commercial use requires a separate license—please contact: evana.blanche.privacycopilot@gmail.com

For questions, suggestions, or support: • Open an issue

⚖️ License

This project is licensed for non-commercial use only. Commercial, SaaS, or enterprise deployments require written permission. See LICENSE for full terms.

🙌 Acknowledgments • Thanks to the open-source and privacy communities for inspiration and support.

Built for privacy, flexibility, and as a modern AI/ML engineering showcase.

About

🛡️ Private AI assistant with Retrieval-Augmented Generation (RAG), secure document Q&A, local and cloud deployment, and full privacy controls. Hybrid Go + Python. Personal use free, contact for commercial license.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published