# Chroma Awards Season 2 Intake API

## PURPOSE
Season 2 of the Chroma Awards is billed as "the world's largest AI film and media
competition," returning with more resources and bigger prizes and drawing entries from
creators, communities, and top companies. This project is a FastAPI service that ingests a
single competition entry: a title, a category, a theme pillar (the trailer's "tell your
story," "leave your mark," "find your rhythm," "build your world," "make your voice heard,"
and "your true colors"), the creator handle, and the media asset URL. It replaces a chaotic
shared spreadsheet with a typed, validated, auditable intake endpoint.

## WHY THIS MATTERS
A competition at this scale lives or dies on clean data. If categories and theme pillars are
free text, judging panels cannot route entries and prize allocation becomes arbitrary. This
project teaches schema-first API design: define the allowed vocabulary once, reject anything
outside it, and hand downstream tools (judging, dashboards, notifications) a consistent shape.

## HOW TO BUILD
Use FastAPI with Pydantic models for request validation and an in-memory store keyed by entry
id. Define enums for category and theme pillar so invalid submissions fail fast with a 422.

```python
from enum import Enum
from pydantic import BaseModel, HttpUrl

class Theme(str, Enum):
    true_colors = "true_colors"
    tell_your_story = "tell_your_story"

class Entry(BaseModel):
    title: str
    category: str
    theme: Theme
    creator_handle: str
    media_url: HttpUrl
```

Add `POST /entries`, `GET /entries`, `GET /entries/{id}`, and a `GET /entries/stats`
endpoint that counts entries per theme pillar.

## WHEN TO USE IN PRODUCTION
Use it when a program needs a single controlled door for submissions — hackathons, film fests,
grant intake, leaderboards. Do **not** use it when submissions are long-lived, high-volume, or
need search/indexing: swap the in-memory store for a real database, and add auth before any
public deployment.

## HOW IT HELPS STUDENTS
Students practice Pydantic validation, enum-constrained vocabularies, REST resource design,
and the discipline of separating intake from downstream processing — core backend skills
interviewers probe.

## STARTER CODE
See `starter/main.py` for a runnable FastAPI skeleton with the entry model, enum vocabularies,
CRUD endpoints, and a statistics route. `# TODO` markers show where to add persistence and auth.
