# Vijayawada Kidnap FIR Intake & Rescue Alert Portal

## PURPOSE
A FastAPI service that lets a police station register a kidnapping FIR the moment it is
reported — as happened in Vinayaka Nagar, Vijayawada on a Sunday night after a property
dispute — and immediately broadcast a structured rescue alert to nearby units and the
control room. It captures complainant details, last-seen location, dispute context and
suspect count, then exposes an alert feed so dispatch can act within minutes instead of
minutes-lost-to-phone-calls.

## WHY THIS MATTERS
The transcript shows the city police succeeded because they acted fast and used technical
evidence to locate the victim in Palnadu district and rescue him unharmed on Monday. The
single biggest lever in a kidnap case is the first hour: the cleaner the intake record, the
faster investigators can cross-reference CCTV, call records and vehicle data. This project
teaches how to turn a chaotic night-shift report into a machine-readable, API-first case
record.

## HOW TO BUILD
1. Model the case with Pydantic schemas: `CaseIn`, `CaseOut`, `Alert`.
2. Store cases in SQLite via a small repository layer (swap for Postgres later).
3. Add `POST /cases`, `GET /cases/{id}`, `POST /cases/{id}/alerts`, `GET /alerts`.
4. Generate a deterministic alert payload from transcript-derived fields (district, PS,
   suspect count) — the external SMS/CAD call is stubbed.

```python
@app.post("/cases", response_model=CaseOut, status_code=201)
def create_case(payload: CaseIn) -> CaseOut:
    case = repo.add(payload)          # persists FIR + dispute context
    repo.raise_alert(case.id)          # TODO: real rescue-alert fan-out
    return case
```

## WHEN TO USE IN PRODUCTION
Use it for real-time FIR intake at district control rooms, multi-station case handoff
between Vijayawada city and Palnadu district units, and as the intake front-door feeding a
CAD/dispatch system. Do NOT use it as a long-term evidence vault (it is intake, not chain
of custody), and do not expose it to the public internet without auth — victim data is
sensitive.

## HOW IT HELPS STUDENTS
Students practise typed API design, request validation, repository patterns, status
workflows (reported → alerted → located → rescued → remand) and responsible handling of
personally identifiable victim data — exactly the skills a public-sector API job needs.

## STARTER CODE
See `starter/main.py`: a runnable FastAPI skeleton with in-memory/SQLite repo, three
endpoints, a stubbed alert fan-out marked `# TODO`, and `uvicorn` bootstrap.
