# `StarView.Events`
[🔗](https://github.com/Neophen/star_view/blob/v0.7.0/lib/star_view/events.ex#L1)

Opt-in event contracts derived from actual `handle_event/3` clauses.

Enable with `checked_events: true` on `use StarView`, `StarView.Page` or
`StarView.Component`. Each named clause must use a literal event string and
a literal HTTP method in its conn pattern. Wildcard clauses are fallbacks,
not additional public events. There is no separate event registration list.

Literal local request helpers in `~STAR` are checked when the module finishes
compiling. Both dispatchers reject unknown events and wrong methods before
starting SSE. Input validation and authorization remain the handler's job.

# `validate_request`

Checks a request against an opt-in contract before SSE starts.

Unchecked modules retain their existing behavior. Returns `:ok` or
`{:error, conn}` with a halted HTTP 404/405 response.

