All use cases

project.phase

Before, during, after

People think in campaigns, not in between on a date. A project has a time window. Before it the teaser, during it the offer, after it the thank-you page — even if the poster hangs for weeks more.

Where it hangs
Poster series, trade fair stand, special exhibition, election poster, sales sign, invoice with a deadline.
Why the paper stays
After the end date the posters are still up. The code must not be dead.

Live resolution

project.phase = before
project.name = Sommertourtime.tz = Europe/Zurichgeo.country = CH
  1. 1Before
  2. 2Running
  3. alwaysOtherwise
https://tour.example/soon

Phase of the project

The same snap frame in the foyer three times — advance sales, seating plan, look back — carrying the identical code in all three
Before — the run-upRunning — the thing itselfAfter — what stays when it is over
The same code on every shot.Poster series, trade fair stand, special exhibition, election poster, sales sign, invoice with a deadline.

The ruleset

Valid, storable, mandatory rule last.

Not a description of what the engine could do — this is the text a code carries. The first matching rule wins, and the last one always matches.

ruleset · version 1

{
  "rules": [
    {
      "when": { "project.phase": { "eq": "before" } },
      "then": { "type": "redirect", "url": "https://tour.example/soon" }
    },
    {
      "when": { "project.phase": { "eq": "running" } },
      "then": { "type": "redirect", "url": "https://tour.example/now" }
    },
    {
      "when": "always",
      "then": { "type": "redirect", "url": "https://tour.example/thanks" }
    }
  ]
}

phase has no ordering operators: alphabetically after < before < running, chronologically before → running → after. lt would read as one thing and do another. Allowed are eq, in, exists.

Also

Same window, different sign.

Trade fair
During it the form, after it the brochure.
Sales sign
The listing first, then the other properties.
Invoice
Pay while it is running, the reminder page after that.

All use cases

Reprinting is the expensive part. Stop doing it.