# Kurnool Dasara Dandiya Community Event Service

## PURPOSE
A Flask REST service that registers participants and manages schedules for the
Kurnool Dasara Dandiya celebrations reported in this video, where Minister Bharat
joined the traditional celebrations. It solves the problem of organising a public
cultural festival: taking registrations, capping group sizes, storing team names,
and exposing an event-day schedule so organisers and attendees share one source of
truth instead of WhatsApp sheets.

## WHY THIS MATTERS
The transcript states that "such wonderful traditional celebrations fill the youth
with great enthusiasm and immense inspiration." That is a participation problem:
enthusiasm only converts into a successful event when registrations are reliably
captured. This project teaches the web-service fundamentals (routing, validation,
in-memory persistence, JSON contracts) needed to turn community interest into a
run event.

## HOW TO BUILD
Use Flask with a blueprint per resource and Pydantic-style validation done by hand.

```python
from flask import Flask, request, jsonify
app = Flask(__name__)

@app.post("/registrations")
def register():
    data = request.get_json(force=True)
    if not data.get("name") or not data.get("team"):
        return jsonify({"error": "name and team are required"}), 400
    reg = store.add(name=data["name"], team=data["team"], dance="dandiya")
    return jsonify(reg), 201

@app.get("/schedule")
def schedule():
    return jsonify(EVENT_SLOTS)
```

1. Model a `Registration` record (name, team, dance style, contact).
2. Add `POST /registrations` with required-field validation and a per-team cap.
3. Add `GET /registrations` and `GET /schedule` endpoints.
4. Swap the in-memory dict for SQLAlchemy later (see the p4 project).

## WHEN TO USE IN PRODUCTION
Use it for real public festivals, temple events, college cultural fests, and any
walk-in registration that needs a lightweight API plus admin listing. Do NOT use a
single-process Flask in-memory store for a multi-day, thousands-of-people event —
you need a real database, auth, and rate limiting. Not suitable when you only need
a static page with no data capture.

## HOW IT HELPS STUDENTS
Students learn HTTP verbs, status codes, request validation, and how a community
event maps onto a clean data model. It is small enough to finish in an afternoon
but teaches the exact shape of a production CRUD service.

## STARTER CODE
`starter/main.py` contains a runnable Flask skeleton with `/health`,
`/registrations`, and `/schedule` routes, an in-memory store, and `# TODO` markers
for validation, team caps, and database persistence.
