Audit-AI

AuditAI

AuditAI extracts structured compliance fields from unstructured clinical notes using an LLM, runs them through configurable rules, and returns a detailed audit report flagging billing and clinical compliance risks. Built for healthcare platforms that need automated documentation review.

Quick start

# Clone and run
git clone https://github.com/puneethkotha/Audit-AI.git
cd Audit-AI

# Set your Anthropic API key
export ANTHROPIC_API_KEY=your_key_here

# Start all services
docker-compose up --build

# Seed default compliance rules (first run)
docker-compose exec backend python seed_rules.py

GitHub Pages

The frontend deploys to GitHub Pages on each push to main. Enable it in your repository: Settings > Pages > Source: GitHub Actions. The static site runs at https://puneethkotha.github.io/Audit-AI/. For full audit functionality, run the backend locally or deploy it separately and set VITE_API_URL when building.

Architecture

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   React     │────▶│   FastAPI    │────▶│   Claude    │
│  Frontend   │     │   Backend    │     │    API      │
└─────────────┘     └──────┬───────┘     └─────────────┘
                          │
           ┌──────────────┼──────────────┐
           ▼              ▼              ▼
    ┌────────────┐  ┌──────────┐  ┌──────────┐
    │ PostgreSQL │  │  Redis   │  │Prometheus │
    └────────────┘  └──────────┘  └──────────┘

API endpoints

Method Path Description
POST /audit Run compliance audit on a clinical note
GET /audit/{id} Retrieve audit result by ID
GET /rules List all compliance rules
POST /rules Create a new rule
GET /health Health check
GET /metrics Prometheus metrics

Sample request

curl -X POST http://localhost:8000/audit \
  -H "Content-Type: application/json" \
  -d '{"note_text": "Patient is a 67-year-old male presenting with chest pain. History of hypertension. Medications: metformin, lisinopril, oxycodone PRN. Vitals: BP 158/92. Admitted for observation."}'

Tech stack

Python FastAPI React TypeScript PostgreSQL Redis Docker

Project structure

auditai/
├── backend/           # FastAPI service
│   ├── main.py
│   ├── routers/       # audit, rules
│   ├── services/      # extractor, rule_engine, audit_service
│   ├── models/        # db, schemas
│   └── core/          # config, metrics, database
├── frontend/          # React app
└── docker-compose.yml

License

MIT