Zzzzzz......
Playing with AWS lambda and snoozing slack every Thursday.
- Read datetimes, duration & other config
- from a file
- from a db
- provider table (Slack, Gmail)
- account table (F4S, rocketspace, personal, work)
- user table (Me!, Bruno etc)
- snooze table (every thursday)
- a provider can have users and accounts
- a user can have multiple snoozes
- a snooze belongs to a user & a account
- a account can have many users, a user can have many accounts
- UX - slack commands
- set a snooze
- list snoozes
- delete a snooze
- generally think about syntax
- one off vs repeat (calendar)
- nlp - what is out there already?
- submitting to slack
- pricing (stripe?)
- landing page (netlify)
- other notifications?
- Gmail (OOO)
- other chat providers
- Chrome Extension (web notifications)
- app notifications (mobile app)
a user creates multiple naps a nap has a start datetime and end datetime a nap has an optional text status and icon a nap can snooze notifications a nap can be applied to multiple accounts
an example of an account is a Slack Workspace a Slack Workspace is associated with an email an email can be associated with multiple Slack Workspaces a workspace is is a type of provider
Start datetime End datetime Status Optional Text Status - is this the end of onboarding? - do I have everything to schedule a single DnD on Slack?
CRON is for repeated tasks - what about one off tasks? cron(Minutes Hours Day-of-month Month Day-of-week Year)
-
Add the Provider to the nap (essentially fully flesh out the Nap to be a actional unit of data)
-
Create the nap in faunaDB
-
Call a function to read naps from faunaDB and add them to [a Cron Service]
-
how should this function be called?
-
from the frontend - could do but opens naps to be in an unclean state/never getting scheduled if second request fails
-
from the previous function
-
every X period - NO
-
triggered from faunaDB - NO
-
- how should this function work?
- should it be per nap/per user/globally?
- faunaDB lends itself to globally
- query all naps that have a state of 'new'
- then
- should it be per nap/per user/globally?
- [Cron Service] calls faunaDB to read data to then execute the Naptime
- this grabs the Slack user data and nap data from FaunaDB
- makes the DnD API call to Slack
- then update the status of the nap
A user can currently create duplicate naps Page animations for onboarding
Should a Nap have a state? - New, scheduled, Nap Started, Nap Finished New --> Scheduled --> Nap Started --> Nap Finished (--> Scheduled)
- Status should be split - a dropdown with Online, Busy, Away, others? and a secondary text field for customised text
bucket - thing people have access to. relationship between a thing (id) and people. - no content bucketable - value of the bucket - eg. project name - immutable.
a recording is a piece of data - data to bucket recordable - contains the content. - immutable
-
user auth with slack
-
user auth with google (calendar)
-
register, login, logout
-
API setup
-
build out the models
-
build out the API itself
-
convert the login/sign up views to be on brand
-
could I convert the graphql view to be async? is that enabled in aridne?
-
we have normal oauth2 to google to sign up.. this is done.
-
how do we auth with the graphQL
-
remove accounts if a user removes social connection
-
User signs up with Google
-
User adds Slack
-
Present Calendar to user (there maybe other options to display/other onboarding screens)
-
User creates a 'nap' on their calendar or selects an existing event to nap
- Create a nap, that is linked to a calendar
- Get an event from a the calendar
- work out trigger for the nap
-
API to recieve nap and call the relevant APIs to perform the snoozes
- What does authentication look like at this point? What type of OAuth2 do I need to support?
- The queue calling back to naptime.
-
Drop on to the queue again to cancel snooze
-
ought to be the same as 5 with an extra hook
Default off
start a nap: dnd - on set status and icon away minutes = length of nap
end a nap dnd - off set default status and icon auto minutes = 0
Default on: (every X time - set DND, away and icon)
start a 'nap' dnd - off icon & status auto mintues = length of nap
end a 'nap' dnd - on icon & status away minutes = 1 week
setting sun on top line moon on the bottom
- when defaults (dnd, icon, status) change properate these to the actual Slack account
-
fetching calendar data on demand from the API
-
events based on a date filter, it a week at a time?
-
(re)Start the frontend!
-
this means actually sorting out the auth flows...
- split out schema into each django app?
https://relay.dev/docs/guides/graphql-server-specification/ https://relay.dev/assets/files/connections-61fc54c286f0afc0b4f230f7c4b150bf.htm#
- frontend calls to Google
- setup new frontend!
- Add Oauth library there...
- Configure Oauth ont the frontend
- That flowthen completes
- Frontend makes a call to the backend with
- Backend verifies token and gives the frontend our own token (wihc could be an outh access token?)
- Backend makes actual API requests to Google for Calendar stuff