How it's built
Each thing Cloudflare gives the Worker does one job in this app. Open a page to see it work: nothing is used before then.
- AttachmentsR2D1Attach a file to one of your notes. The file is kept in a bucket; the list comes from the database.
- ActivityQueuesCron TriggersD1Durable ObjectsEach note is put on a queue and recorded a moment later; once a day a scheduled task counts them. The list is live.
- NoticeKVA line for everyone on the notes page, set by whoever may moderate. It is read on every visit and written rarely: what a key-value store is for.
- MailEmailThe Worker sends a message to its owner, at most one an hour, and shows the last one it was handed.
- Limits and cacheRate LimitingCache APITwo ways a Worker does less: a limit on how often each caller may write, and an answer kept for a minute where working it out takes a query.
- OutsidefetchTCP socketsA request to another site waits on that site, so it is made when you ask, never to show a page.