An open API service indexing awesome lists of open source software.

https://github.com/mihaibc/PrivacyCopilot

🛡️ PrivacyPilot – A privacy-centric backend API leveraging AI (LLaMA, Mistral, Ollama) to anonymize and moderate sensitive data in real-time. Built with Go, Node.js, and Perl. GDPR-compliant and infrastructure-ready.
https://github.com/mihaibc/PrivacyCopilot

ai anonymization azure-ai backend devops gdpr go microservices nodejs ollama perl5 privacy stable-diffusion

Last synced: 4 months ago
JSON representation

🛡️ PrivacyPilot – A privacy-centric backend API leveraging AI (LLaMA, Mistral, Ollama) to anonymize and moderate sensitive data in real-time. Built with Go, Node.js, and Perl. GDPR-compliant and infrastructure-ready.

Awesome Lists containing this project

README

          

# 🛡️ 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](https://git-scm.com/downloads).
2. **Docker:** [Install Docker Desktop](https://docs.docker.com/get-docker/). Docker Compose required.
3. **Python (optional):** For development/debugging AI service outside Docker.
4. **Go:** [Install Go](https://go.dev/doc/install) (for backend development).
5. **(Optional) Ollama:** For running certain open-source LLMs locally, see [Ollama](https://ollama.com/).
6. **(Optional) jq:** JSON CLI tool for testing API responses.

### ⚙️ Installation & Setup

1. **Clone the Repository:**
```bash
git clone https://github.com//privacy-copilot.git
cd privacy-copilot
```

2. **Copy & Edit Environment Variables:**
```bash
cp .env.example .env
# Edit .env as needed for DB, AI model paths, ports, etc.
```

3. **Start the Stack:**
```bash
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:**
```bash
ollama pull llama3
```

5. **Access Logs and Monitor:**
```bash
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

- [Contribution Guidelines](CONTRIBUTING.md)
- [API Reference](docs/api.md)
- [Architecture & Security](docs/architecture.md)
- [Deployment (Local/Cloud)](docs/deployment.md)
- [BYOM: Bring Your Own Model](docs/models.md)

---

## 🤝 Contributing

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

---

## 🏗️ Project Structure Overview

```text
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.