Skip to Content
suntzu rcdocs
Bits

Bits

A bit is the smallest piece of behaviour someone can trigger and check end to end: "a visitor sends the contact form", "an owner adds a property". Like a trace in a distributed system, it crosses every layer it touches (page, server, database, external services), and the same name is used in its specification, its test and, when the project has request logs, its log lines.

A system is its catalog of bits. Reading this catalog is the fastest way to know what the project does.

Catalog

BitWhat it doesStatusTest
auth.email-linkSomeone signs in with a link by emailverifiede2e/auth.email-link.e2e.ts, + 1 unit test
auth.email-codeSomeone signs in by typing the code from the emailverifiede2e/auth.email-code.e2e.ts, + 3 unit tests
auth.googleSomeone signs in with Googlenot verifiedmanual (needs Google credentials)
account.getA member opens My SunTzu RCverifiede2e/account.get.e2e.ts
account.updateA member changes their settingsverifiede2e/account.update.e2e.ts
account.deleteA member deletes their accountverifiede2e/account.delete.e2e.ts
follows.toggleA member follows or unfollows somethingverifiede2e/follows.toggle.e2e.ts
follows.stateA page's buttons show whether the member follows itverifiede2e/follows.state.e2e.ts
follows.listA member sees what they follow and where they're goingverifiede2e/follows.list.e2e.ts
follows.countAnyone sees how many people follow somethingverifiede2e/follows.count.e2e.ts
rsvp.toggleA member says they're goingverifiede2e/rsvp.toggle.e2e.ts
me.calendarA member's calendar app reads their private feedverifiede2e/me.calendar.e2e.ts
events.listA visitor finds eventsverifiede2e/events.list.e2e.ts
events.getA visitor opens an event's pageverifiede2e/events.get.e2e.ts
events.calendarSomeone subscribes to the events calendarverifiede2e/events.calendar.e2e.ts
events.event-calendarA visitor adds one event to their calendarverifiede2e/events.event-calendar.e2e.ts
events.share-imageAn event's page is sharedverifiede2e/events.share-image.e2e.ts
events.feedbackSomeone says whether an event's information was rightverifiede2e/events.feedback.e2e.ts
corrections.createA member suggests a correctionverifiede2e/corrections.create.e2e.ts, + 1 unit test
submissions.createA member sends an eventverifiede2e/submissions.create.e2e.ts, + 1 unit test
places.listA visitor browses every field and trackverifiede2e/places.list.e2e.ts
places.getA visitor opens a field's or track's pageverifiede2e/places.get.e2e.ts
airspace.checkSomeone asks "Can I fly here?"verifiede2e/airspace.check.e2e.ts
hosts.listA visitor browses every club and trackverifiede2e/hosts.list.e2e.ts
hosts.getA visitor opens a club's or track's pageverifiede2e/hosts.get.e2e.ts
search.queryA visitor searches the whole siteverifiede2e/search.query.e2e.ts
search.missesThe crew sees what people searched for and didn't findverifiede2e/search.misses.e2e.ts, + 2 unit tests
contact.sendA visitor sends the contact formverifiede2e/contact.send.e2e.ts, + 1 unit test
messages.createA visitor writes to the crewverifiede2e/messages.create.e2e.ts
community.share-buildA visitor shares a buildverifiede2e/community.share-build.e2e.ts
try.requestA newcomer asks to try RCverifiede2e/try.request.e2e.ts, e2e/database.ts, + 1 unit test
crew.queueThe crew sees what needs a personverifiede2e/crew.queue.e2e.ts
crew.decideThe crew decides a reviewverifiede2e/crew.decide.e2e.ts
crew.add-eventThe crew adds an event by handverifiede2e/crew.add-event.e2e.ts
crew.edit-eventThe crew changes an event directlyverifiede2e/crew.edit-event.e2e.ts
crew.inboxThe crew reads the inbox and marks messages as handledverifiede2e/crew.inbox.e2e.ts
crew.feedbackThe crew reads the feedback left after eventsverifiede2e/crew.feedback.e2e.ts
hosts.claimSomeone claims a club or trackverifiede2e/hosts.claim.e2e.ts
hosts.verifyA claim is provedverifiede2e/hosts.verify.e2e.ts
organiser.dashboardAn organiser opens the club dashboardverifiede2e/organiser.dashboard.e2e.ts
organiser.publishAn organiser publishes or changes an eventverifiede2e/organiser.publish.e2e.ts
organiser.update-clubAn organiser keeps the club's page currentverifiede2e/organiser.update-club.e2e.ts
places.confirmA steward confirms a place's detailsverifiede2e/places.confirm.e2e.ts
organiser.widgetA club's website shows its SunTzu RC calendarverifiede2e/organiser.widget.e2e.ts
notify.changesFollowers hear that an event moved or was cancelledverifiede2e/notify.changes.e2e.ts
notify.digestMembers get "this weekend near you"verifiede2e/notify.digest.e2e.ts
notify.organiser-reportOrganisers get their club's monthly reportverifiede2e/notify.organiser-report.e2e.ts
notify.unsubscribeSomeone stops an email with one clickverifiede2e/notify.unsubscribe.e2e.ts
engine.runThe engine reads its sourcesverifiedics.test.ts, json-ld.test.ts, + 6 more
engine.resolveWhat the sources say becomes eventsverifiedmatch.test.ts, resolve.test.ts
census.importPublic registers become places and hostsverifiedfria.test.ts, fixed-sites.test.ts, + 8 more
db.seedThe starting data is loadedverifiede2e/db.seed.e2e.ts
docs.publishThe docs portal is publishedverifiede2e/docs.publish.e2e.ts, + 1 unit test
notes.listA user sees their notesverifiede2e/notes.list.e2e.ts
notes.getThe API returns one of the user's notesverifiede2e/notes.get.e2e.ts
notes.createA user adds a noteverifiede2e/notes.create.e2e.ts
notes.deleteA user deletes one of their notesverifiede2e/notes.delete.e2e.ts

Status: verified (its test passes, or someone ran it and saw the result) · read in code (followed in the code, not run) · not verified · broken.

Adding or changing a bit

  1. Copy _template.md to <area>.<action>.md (for example contact.send.md, notes.create.md).
  2. Fill in every field; write "none yet" rather than leaving one out (except Test, which every bit needs).
  3. Write its end-to-end test in e2e/<area>.<action>.e2e.ts, inside test.describe("<area>.<action>", …), so pnpm test:e2e --grep <area>.<action> runs it. It does what a person would do (open the page, fill the form, read the answer) and checks what they would see. If it touches someone's data, add the "another member can't" and "signed out can't" cases. Jobs that read the internet (the engine, the census) are proved by the tests that run their code on saved copies of real pages and files.
  4. Add or update its row in the catalog above, in the same pull request as the code change.

pnpm check runs pnpm check:bits, which fails when a bit has no doc, no catalog row or no test, or when a test or the code (@Bit("…")) names a bit that has no doc.

On this page