SaaS.Dev

The leaseclock.com sample

The one sample definition on SaaS.Dev: leaseclock.com's Property and Lease Nouns, the Verbs renew and terminate, and an example Offer.

leaseclock.com is the one sample Startup on SaaS.Dev. It tracks lease renewal dates for small property managers, and every example on the site reads its two Nouns.

What leaseclock.com does

A property manager records each building and each resident's lease, then renews or ends the lease when its end date nears. The Startup sells one Offer and comes from the Solo SaaS Template, as in the hub's quickstart.

Property

nouns/Property.mdx
---
properties:
  name: string
  address?: string
  units: integer
---
A Property is one building a manager rents out, unit by unit.
PartWhat the Admin shows for PropertyRule
Key and labelsproperties; Property, Propertieskey, labels
Screensa list, a record page, a create form and an edit formscreens
Namename, such as 14 Elm Streetrepresentation
Listcolumns Name, Address and Units, and one search boxlist-columns, list-search
namea one-line text box, requiredcontrol-text, required-input
addressa one-line text boxcontrol-text
unitsa number box, requiredcontrol-number, required-input
Actionsnone: Property declares no Verb beyond the standard fiveverb-action

name names a Property wherever a Lease points at one: in the lease's record page and in its picker. A Property record page shows no list of its leases.

Lease

nouns/Lease.mdx
---
extends: [Thing]
properties:
  residentName: string
  residentEmail?: email
  listingUrl?: url
  startsOn: date
  endsOn: date
  monthlyRent: number
  status: active | renewed | terminated
  notes?: text
  terms?: json
  documents?: string[]
  property: Property
verbs:
  renew: {}
  terminate: {}
---
A Lease is one resident's agreement on one unit of a Property, from signing to renewal.

Lease extends Thing, points at one Property, and lists its lifecycle in status. Lease in the leaseclock.com Admin shows every part of its screens.

Verbs

Lease declares two Verbs beyond the standard five. Each takes the record alone, and each keeps its rule in its Function.

VerbTakesMoves statusRefuses
Lease.renewthe recordactive to renewed, and endsOn one year latera lease that is not active
Lease.terminatethe recordactive or renewed to terminateda lease that is terminated
nouns/Lease.renew.ts
export default async (lease: Lease, input: LeaseRenewInput, $: $) => {
  const end = new Date(lease.endsOn)
  end.setFullYear(end.getFullYear() + 1)
  return $.Lease.update({ id: lease.$id, endsOn: end.toISOString().slice(0, 10) })
}

In the Admin, Renew and Terminate run these Verbs from each list row, the record page and the edit form. Admin actions: Verbs, refusals and Approvals shows a refusal.

Reads of both Nouns run on every Interface.

PlanThe same Verbs over the API

In the design, Lease.renew and Lease.terminate run on the API, SDK, CLI and MCP server, and each call returns an Action.

Offer

The Offer is an example only: no rule that prints today reads it.

offers/pro.mdx
---
price: { amount: 29, currency: USD }
interval: month
---

pro charges $29 a month through Stripe.

Contents