IntentShield is a Zero-Trust Intent Security API system that classifies, scores, and enforces policies on user intents before execution using FastAPI + Open Policy Agent (OPA).
It acts as a security layer for AI-driven and API-driven systems, ensuring that every request is evaluated for intent, risk, and policy compliance.
Frontend (Lovable UI)
β
Cloudflare Tunnel (Public HTTPS URL)
β
Local Machine (FastAPI + Docker)
β
OPA Policy Engine + Risk Scoring + Intent Classification
Because the backend is running locally and exposed via Cloudflare Tunnel:
- Your laptop is ON
- Docker container is running
- Cloudflare tunnel is active
- You shut down your system
- You disconnect internet
- You stop Cloudflare tunnel process
Whenever you want to run IntentShield again:
docker build -t intentshield .
docker run -p 8000:8000 intentshieldOR if already built:
docker restart intentshieldcloudflared tunnel --url http://localhost:8000You will get a new URL like:
https://random-name.trycloudflare.com
Update Lovable frontend with new backend URL:
VITE_API_BASE_URL=https://new-cloudflare-url.trycloudflare.com
OR update API base URL in frontend config.
https://your-cloudflare-url.trycloudflare.com
GET /healthResponse:
{
"status": "ok"
}POST /intentContent-Type: application/json
X-API-Key: admin-key-123
X-Correlation-ID: demo-001
{
"intent": "transfer_funds"
}{
"intent_token": "ITX-xxxx",
"category": "financial_action",
"risk_score": 85,
"decision": "deny"
}Built-in development API keys:
| User | Role | API Key |
|---|---|---|
| Admin | admin | admin-key-123 |
| User | user | user-key-456 |
For frontend demos, use:
admin-key-123
The frontend is built using Lovable and connects directly to the backend API.
VITE_API_BASE_URL = <your-cloudflare-url>
Since Cloudflare Tunnel URLs are temporary:
So you must:
- Update frontend config manually
- Or re-run Lovable prompt with new URL
When backend URL changes, tell Lovable:
Update backend API base URL to:
https://NEW-CLOUDFLARE-URL.trycloudflare.com
Replace all previous API endpoints.
Do not modify UI or logic.
Currently, Cloudflare Tunnel is used for zero-cost deployment testing.
We will migrate to:
- Custom domain (e.g.
api.intentshield.io) - Stable backend hosting (Oracle Cloud / Render / AWS)
- CI/CD pipeline from GitHub
This will remove the need to update URLs manually.
- Intent classification engine
- Risk scoring system
- OPA policy enforcement
- API key authentication
- Correlation ID tracing
- Security decision engine (ALLOW / DENY)
- SOC-style frontend dashboard (Lovable)
Try sending intents like:
transfer_fundsdelete_all_usersaccess_admin_panelread_user_data
System will:
classify β score β enforce policy β return decision
IntentShield ensures:
- Authentication (who is calling)
- Intent classification (what is being done)
- Risk scoring (how dangerous it is)
- Policy enforcement (should it be allowed)
- Backend runs locally (not cloud hosted)
- Cloudflare URL changes on restart
- Manual frontend update required after restart
- No persistent domain yet (cost constraint)
- Stable cloud deployment (no URL changes)
- Custom domain setup
- Advanced SOC dashboard UI upgrades
- Attack simulation and audit logs
- Multi-tenant RBAC system
Built by Sathvik Shetty IntentShield β Zero-Trust Intent Security Framework
This system demonstrates:
A real-world Zero Trust API security architecture with live policy enforcement and frontend visualization.