| 1 | # Scratchpad |
| 2 | |
| 3 | Scratchpad is the small app Base installs to prove that installing, signing |
| 4 | in and uninstalling work. It has one page: a line saying who you're signed |
| 5 | in as, and one note that everyone shares. |
| 6 | |
| 7 | ## Who can use it |
| 8 | |
| 9 | Anyone the Base that installed it vouches for can read and change the note. |
| 10 | Scratchpad trusts one Base, the one named in `BASE_APP_ISSUER`, and checks |
| 11 | each sign-in against the keys in `BASE_APP_KEYS`. It has no roles: every |
| 12 | member of that Base sees the same note and can change it. (CARLOS app spec |
| 13 | 1.7: Base says who someone is, and each app decides what they may do.) |
| 14 | |
| 15 | A sign-in lasts 12 hours, so people stay signed in while Base is briefly |
| 16 | down, and someone removed from Base loses access within a day. **Sign out of |
| 17 | Scratchpad** ends it sooner. That signs you out of Scratchpad only: you stay |
| 18 | signed in to Base, and **Sign in again** brings you straight back. |
| 19 | |
| 20 | Two people can edit the note at once. If someone else saved while you were |
| 21 | typing, your save is refused and your text stays on the page, so nothing is |
| 22 | lost. Save again to replace their version. |
| 23 | |
| 24 | ## Settings |
| 25 | |
| 26 | Base writes all four when it installs the app: |
| 27 | |
| 28 | - `BASE_APP_ORIGIN`: Scratchpad's own address, such as `https://acme-scratchpad.example.com` |
| 29 | - `BASE_APP_ISSUER`: Base's address |
| 30 | - `BASE_APP_CONSUMER_ID`: `scratchpad` |
| 31 | - `BASE_APP_KEYS`: Base's public keys, for checking sign-ins |
| 32 | |