Last active
March 15, 2020 01:03
-
-
Save ryanbateman/8d2bb1e058508927d251061f8634c86d to your computer and use it in GitHub Desktop.
temp-check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assumptions: | |
All interactions with the service is over SMS | |
There is no other interaction with any other users other than the updated temperatures or names | |
No phone numbers will be sent over SMS _ever_ | |
All data sent over the service is low-stakes, low security information (?!) - names, temperatures and associations - that people would be fine publicly sharing if it came to it (because it is, to some extent, public as described) | |
Basic rules: | |
A USER is a phone number, desired name, and their most recent UPDATE | |
An UPDATE is the temperature and time a USER took it | |
A USER creates an UPDATE by sending their temperature to the service | |
Whenever a USER sends an UPDATE they receive a RESPONSE | |
A RESPONSE is a list of all the UPDATES by USERS in all the GROUPs the sender has joined | |
A GROUP is a list of users and a SHORTCODE that can be shared to join it | |
A SHORTCODE is 3 random words that can be used to join the group | |
A USER can join many GROUPs and leave any of them whenever they want | |
Joining a GROUP automatically means you can see all of the groups' USERs and UPDATEs simply by sending an UPDATE yourself | |
To join a GROUP (and see all the latest UPDATEs) a USER must have set their name | |
A USER can create a new group via SMS | |
:: 'create' | |
:: 'Created and joined a new group. The shortcode is GEESE ZEBRA PIE' | |
A USER must set their name and can re-set their name at any point (assuming there will be duplicates, misunderstandings): | |
:: 'name bob' | |
:: 'Your name is set and will be shown as `bob`' | |
A USER can join a new group via SMS | |
:: 'join geese zebra pie' | |
:: 'You've joined the temperature sharing group GEESE ZEBRA PIE. Send your temperature now to see the group's updates' | |
A USER cannot join a group without having set their name | |
:: 'join geese zebra pie' | |
:: 'To join this group you first need to set your name by responding to this message with `NAME ` and your name' | |
A USER can leave a new group via SMS | |
:: 'leave geese zebra pie' | |
:: 'You've left the temperature sharing group GEESE ZEBRA PIE. Your updates will no longer be shared with the group' | |
A USER can update | |
:: '36.4' | |
:: 'bob: 36.2, 14/3, 3:42pm. mary: 36.9, 13/3, 5:33pm' | |
A USER can list their groups | |
:: 'list' | |
:: 'Groups: GEESE ZEBRA PIE: bob, mary, sarah. DISTINCT NAIL PENITENT: andy' | |
A USER can request help | |
:: 'help' | |
:: 'You can join a group by responding with JOIN and the group's 3 words. You can leave a group by responding with LEAVE and the group's 3 words. You can set your name by responding with NAME and your name. You can update your temperature by reponding with just the measurement.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment