DEV Community

LEONARDO DE SOUZA JUNIOR
LEONARDO DE SOUZA JUNIOR

Posted on

LGPD Sentinel AI — Automated LGPD Compliance Audits with Local AI (Free + 7-Day Pro Trial)

The Problem

Brazil's LGPD (Lei Geral de Proteção de Dados) is the Brazilian equivalent of GDPR. ANPD can fine companies up to R$50 million per violation. Hiring consultants for a compliance audit costs R$8,000–R$30,000. Most SMEs simply don't do it.

What if you could automate LGPD compliance audits locally — with no data leaving your server, using open source AI?

That's LGPD Sentinel AI.


What It Does

LGPD Sentinel AI is an open source tool that automates the three pillars of LGPD compliance:

Feature What it delivers LGPD Article
Data Mapping Classifies personal/sensitive data, suggests legal basis, scores compliance 0–100 Art. 5, 7, 11
DPIA / RIPD Full impact report with risks, mitigations, and PDF ready for ANPD Art. 38
DSR (Direitos do Titular) Analyzes all 8 data subject rights, generates official response letters Art. 18

Everything runs 100% locally via Ollama — zero data sent to external APIs.


Stack

  • Backend: Python 3.11 + FastAPI
  • AI: LangChain + Ollama (llama3.1:8b or Mistral)
  • Frontend: Streamlit dashboard (5 tabs)
  • DB: SQLite (zero config)
  • PDF: ReportLab
  • Payments: Stripe (freemium)
  • Deploy: Docker Compose

Getting Started (3 commands)

git clone https://github.com/ldsjunior-ui/lgpd-sentinel-ai
cd lgpd-sentinel-ai
docker compose up
Enter fullscreen mode Exit fullscreen mode

API Example

# Generate API key (includes 7-day Pro trial, no credit card)
curl -X POST http://localhost:8000/api/v1/billing/keys \
  -H "Content-Type: application/json" \
  -d '{"email": "you@company.com"}'

# Run a data mapping audit
curl -X POST http://localhost:8000/api/v1/map-data \
  -H "X-API-Key: lgpd_your_key" \
  -H "Content-Type: application/json" \
  -d '{"data": [{"key": "cpf", "value": "123.456.789-00"}, {"key": "email", "value": "user@example.com"}]}'
Enter fullscreen mode Exit fullscreen mode

Freemium Model

Every new API key gets a 7-day Pro trial (unlimited usage, no credit card required).

After trial:

  • Free: 5 mappings, 2 DPIAs, 10 DSRs/month
  • Pro: R$97/month — unlimited everything

Current Status

  • ✅ 29 passing tests
  • ✅ Docker Compose ready
  • ✅ Streamlit dashboard (5 tabs)
  • ✅ Freemium with Stripe integration
  • ✅ API key management + quota enforcement
  • ✅ PDF export (DPIA/RIPD)
  • ✅ Audit history with charts
  • 🚀 Launched on Product Hunt today!

Why Local AI?

Privacy-by-design is a core LGPD principle. It would be ironic to send sensitive business data to an external API just to check for privacy violations. With Ollama, inference happens entirely on your hardware.


GitHub: https://github.com/ldsjunior-ui/lgpd-sentinel-ai

Product Hunt: https://www.producthunt.com/posts/lgpd-sentinel-ai

Feedback and contributions very welcome! Happy to answer questions about LGPD specifics or the local AI architecture.

Top comments (0)