AI-Powered Broadcast Compliance Monitoring Platform for NBC Nigeria
# AirScan
AirScan is a full-stack SaaS for **broadcast compliance monitoring** for the **National Broadcasting Commission (NBC), Nigeria**.
**Pipeline:** Upload → Whisper transcription → Gemini breach analysis → reviewer workflow → PDF/CSV exports.
## Monorepo
```
airscan/
frontend/ # Next.js 14 (App Router) + Clerk
backend/ # FastAPI + SQLAlchemy + RQ worker
docker-compose.yml
.env.example
```
## Tech Stack
- **Frontend:** Next.js 14, TypeScript, Tailwind, shadcn/ui-style components, Clerk auth, Lucide icons, sonner toasts
- **Backend:** FastAPI, SQLAlchemy, Postgres
- **Jobs:** Redis + RQ
- **AI:** OpenAI Whisper (`whisper-1`) → Gemini 2.0 Flash (`gemini-2.0-flash`)
- **Storage:** S3-compatible (Cloudflare R2)
- **Payments:** Paystack (NGN)
## Local Development
### 1) Start Postgres + Redis
```bash
cd airscan
docker compose up -d
```
### 2) Backend setup
```bash
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e .
```
Create `backend/.env` (copy from repo root `.env.example`) and set values:
- `DATABASE_URL` (points to docker postgres)
- `REDIS_URL` (points to docker redis)
- `CLERK_SECRET_KEY`
- `OPENAI_API_KEY`
- `GEMINI_API_KEY`
- S3/R2 config: `AWS_*`
- Paystack: `PAYSTACK_SECRET_KEY`
Initialize DB tables and seed the default NBC policy pack:
```bash
python -c "from app.main import init_db; init_db()"
python seed_policies.py
```
Run the API:
```bash
uvicorn app.main:app --reload --port 8000
```
Run the worker (separate terminal):
```bash
python worker.py
```
### 3) Frontend setup
```bash
cd ../frontend
npm install
```
Create `frontend/.env.local` with:
```bash
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
NEXT_PUBLIC_API_URL=
localhost
```
Run the Next.js app:
```bash
npm run dev
```
Visit:
- Landing:
localhost
- Dashboard:
localhost
## Key Product Screens
- `/` landing page (navy + gold)
- `/dashboard` stats + recent cases + usage bar …