Metadata-Version: 2.4
Name: ai-video-compliance-dashboard
Version: 0.1.0
Summary: Enterprise dashboard for AI video compliance auditing and certification
Project-URL: Homepage, https://github.com/yourusername/ai-video-compliance-dashboard
Project-URL: Documentation, https://github.com/yourusername/ai-video-compliance-dashboard#readme
Project-URL: Repository, https://github.com/yourusername/ai-video-compliance-dashboard
Author: AI Video Compliance Team
License: MIT
Requires-Python: >=3.11
Requires-Dist: alembic>=1.13.1
Requires-Dist: celery>=5.3.6
Requires-Dist: fastapi>=0.110.0
Requires-Dist: httpx>=0.26.0
Requires-Dist: opencv-python>=4.9.0
Requires-Dist: passlib[bcrypt]>=1.7.4
Requires-Dist: pillow>=10.2.0
Requires-Dist: pydantic-settings>=2.1.0
Requires-Dist: pydantic>=2.6.0
Requires-Dist: python-jose[cryptography]>=3.3.0
Requires-Dist: python-magic>=0.4.27
Requires-Dist: python-multipart>=0.0.9
Requires-Dist: qrcode>=7.4.2
Requires-Dist: redis>=5.0.1
Requires-Dist: reportlab>=4.0.9
Requires-Dist: sqlalchemy>=2.0.25
Requires-Dist: stripe>=8.0.0
Requires-Dist: uvicorn[standard]>=0.27.0
Provides-Extra: dev
Requires-Dist: black>=24.1.1; extra == 'dev'
Requires-Dist: mypy>=1.8.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.4; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.2.1; extra == 'dev'
Description-Content-Type: text/markdown

# AI Video Compliance Dashboard

**Enterprise-grade compliance scanning and certification for AI-generated video projects.**

## What is this?

A production-ready web dashboard that analyzes AI video projects (Clapper, MimicMotion, Runway workflows) and generates audit trails with full model provenance tracking, training data license verification, and EU AI Act compliance scoring. It integrates your existing synth-provenance-api and eu-compliance-certificate-generator into a polished SaaS interface that studios can confidently use to ship AI video to enterprise clients with legal documentation.

## Features

- **Drag-and-drop video upload** with automatic metadata extraction
- **Real-time provenance scanning** – detects Stable Diffusion, Runway, Pika, and other model signatures
- **EU AI Act compliance scoring** with specific Article citations (Articles 10, 52, etc.)
- **One-click PDF certificate generation** with studio branding options
- **API integration** for Clapper/MimicMotion projects via webhooks and CLI plugins
- **Compliance dashboard** – track audit trails and certification history across projects
- **Team collaboration** – multi-user accounts with role-based access
- **Freemium SaaS billing** – integrated Stripe for subscriptions and metering

## Quick Start

### Prerequisites
- Python 3.11+
- PostgreSQL 14+
- Docker & Docker Compose (optional)

### Installation

1. **Clone and install dependencies:**
   ```bash
   pip install -r requirements.txt
   ```

2. **Configure environment:**
   ```bash
   cp .env.example .env
   # Edit .env with your API keys, database URL, Stripe credentials
   ```

3. **Run database migrations:**
   ```bash
   alembic upgrade head
   ```

4. **Start the application:**
   ```bash
   python app/main.py
   ```

   Or with Docker:
   ```bash
   docker-compose up -d
   ```

5. **Access the dashboard** at `http://localhost:8000`

## Usage Examples

### Upload and scan a video project
```bash
curl -X POST http://localhost:8000/api/projects \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -F "file=@video.mp4" \
  -F "project_name=Q1 Campaign"
```

### Generate compliance certificate
```bash
curl -X POST http://localhost:8000/api/certificates \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "proj_123",
    "studio_name": "Acme Studios",
    "include_branding": true
  }'
```

### Webhook integration (MimicMotion/Clapper)
```bash
# Configure webhook endpoint in your video tool:
POST /api/webhooks/video-export
{
  "project_id": "clapper_proj_456",
  "video_url": "s3://bucket/video.mp4",
  "model_metadata": {...}
}
```

## Tech Stack

- **Backend**: FastAPI + SQLAlchemy
- **Database**: PostgreSQL with Alembic migrations
- **Authentication**: JWT-based auth with role-based access control
- **Integrations**: Stripe (billing), synth-provenance-api (model detection), eu-compliance-certificate-generator (PDF certificates)
- **Deployment**: Docker, Docker Compose
- **API Documentation**: Auto-generated OpenAPI/Swagger at `/docs`

## Project Structure

```
app/
├── main.py              # FastAPI application
├── config.py            # Environment and app configuration
├── database.py          # SQLAlchemy setup
├── models.py            # Database models
├── schemas.py           # Pydantic request/response schemas
├── auth.py              # JWT and auth logic
└── routers/
    ├── auth.py          # User login/registration
    ├── projects.py      # Video project endpoints
    ├── scans.py         # Compliance scanning
    ├── certificates.py  # PDF generation
    ├── subscriptions.py # Stripe billing
    └── webhooks.py      # Inbound integrations
```

## Environment Variables

See `.env.example` for all required variables. Key settings:

- `DATABASE_URL` – PostgreSQL connection string
- `STRIPE_API_KEY` – Stripe secret key for billing
- `SYNTH_PROVENANCE_API_URL` – Your model detection microservice
- `EU_COMPLIANCE_API_URL` – Your compliance certificate generator
- `JWT_SECRET` – Secret key for token signing

## API Documentation

Full interactive API docs available at `/docs` (Swagger UI) or `/redoc` (ReDoc) after starting the server.

## License

MIT