Enterprise-grade Compliance-First AI Content Generation & Validation POC with strict role separation and deterministic rule enforcement.
- Docker & Docker Compose
- API keys configured in
.envfile
docker-compose up -dThis will:
- Start PostgreSQL database
- Start FastAPI backend (runs seed script automatically)
- Start React frontend
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
- Agent:
agent_user - Admin:
admin_user - Super Admin:
super_admin_user
/backend/app/models/- SQLAlchemy ORM models/backend/app/providers/- Cloud-swappable LLM & vector DB abstractions/backend/app/services/- Business logic (rule management, content generation, compliance checking)/backend/app/api/- FastAPI endpoints (agent, admin, super_admin)
/frontend/src/components/- React components by role/frontend/src/pages/- Page components/frontend/src/services/- API client/frontend/src/types/- TypeScript definitions
✅ Rule-First Architecture - Rules override AI outputs
✅ Duplicate Detection - SQL exact match + Pinecone semantic similarity
✅ Immutable Versioning - All rule updates create new versions
✅ Token-Based Chunking - Preserves legal meaning in documents
✅ Audit Trail - Every action logged
✅ Cloud-Swappable - Provider abstraction for easy migration
- Backend: FastAPI, SQLAlchemy, PostgreSQL
- LLMs: Gemini / Groq (swappable)
- Vector DB: Pinecone (swappable to OpenSearch)
- Frontend: React, TypeScript, Vite
- Deployment: Docker Compose
cd backend
pip install -r requirements.txt
python seed_data.py
uvicorn app.main:app --reloadcd frontend
npm install
npm run devVisit http://localhost:8000/docs for interactive API documentation.
This is a POC. For production:
- Add proper authentication (OAuth/JWT)
- Implement rate limiting
- Add comprehensive logging
- Set up monitoring and alerting
- Configure CORS properly
- Use managed database services
- Implement proper secret management