ticket

Ticket is under construction. These docs follow the code as it lands, so expect changes. See the roadmap

Roadmap

Ticket is built one milestone at a time. Tickets for a milestone are written when the one before it lands, so plans further out are scope, not promises.

F0: Skeleton (done)

The package builds, and an example app depends on it and serves a page.

F1: Request to response (done)

  • Done: Conn, params, URL and cookie parsing
  • Done: the views zone and Ticket.Html
  • Done: the view_component zone
  • Done: the routes zone with resources and path helpers
  • Done: controllers, responses, filters and the routes task
  • Done: the ticket CLI with new, server and routes

F2: Data (done)

  • Done: a Db effect backed by node:sqlite, with no npm install
  • Done: a migrations zone that generates records and insert types
  • Done: ticket db:*, ticket g migration and ticket g model
  • Done: model queries. A generated Posts effect and typed columns, so a misspelled column or a wrong value type is a compile error. See Database
  • Done: forms and validations. Params.record decodes a form into the insert type, and a validations zone adds presence, length, inclusion, format and uniqueness
  • Done: associations. references columns give belongs_to and has_many functions, and on_delete
  • Done: the blog example, examples/blog

F2 is done when a blog example creates, edits, lists and deletes posts in SQLite through generated models, and invalid input re-renders with errors.

F3: App ergonomics (done)

  • Done: form helpers as JSX components, <Forms.TextField />, <Links.ButtonTo />
  • Done: signed-cookie sessions, flash and CSRF
  • Done: static files, request logging and a development error page
  • Done: generators: g controller, g scaffold, destroy
  • Done: test helpers and ticket test
  • Done: ticket console, which needs a polar repl that imports modules in folders (polar-lang P14)

F3 is done when ticket generate scaffold produces a working CRUD resource, and the blog's e2e covers flash and a CSRF rejection.

Growing Polar along the way

When Ticket needs something general-purpose that Polar lacks, it's built in Polar itself rather than worked around. URL decoding and generated sibling modules (Paths) already landed that way. Process args, the filesystem, time, crypto, polar test and polar repl have landed that way.

Not planned for v1

Background jobs, mailers, websockets, an asset pipeline, i18n, multiple databases, and Postgres or MySQL.