Designing an app · Lesson 6
An app is not only what people click. Records arrive, dates come due, clocks tick, people decide: each is an event, and the manifest says what each one starts. This part runs without any model: whether a trigger fires is decided by rules, the same every time.
Use Next, or the ← → keys. Fire the events, edit the cron, move the day, type a company: every answer is computed by the runtime’s own functions.
on.collection (+ op, where) — a record inserted, updated, or both, optionally only when its fields match.on.date — a date field of a record, moved by offsetDays: reminders and deadlines.on.approval (+ decision) — a person approved, rejected, or did not decide in time.on.payment · on.webhook · on.cron · on.call — a plan or pack paid; an external system calling the app; a clock; a phone call started, ended or missed.start — an agent, a team or a data job, with a goal; asUser runs it as the user of the event.notify · write · charge — an email; a record saved from the event; credits taken from the event’s user.A trigger whose agent writes the collection that starts it is refused unless a where breaks the cycle; on top of that, the runtime starts at most twenty triggered runs a minute per app, so a mistake that slipped through still stops.
Lesson 7 is about money: how the app’s users pay, how the price follows the work, and how limits protect the owner.