Skip to content

jensen/supabooked

Repository files navigation

Supabooked

Submitted to Launch Week 5 Hackathon.

Demo

https://supabooked.netlify.app/

Supabooked

Application Design

Backed by Supabase, a user can create invitations to schedule meetings. The user is presented with a weekly calendar of available hours that can be booked. These hours are based on the settings determined by the admin in their own timezone.

Schedule Session

Admin Invitations

Application Design

Backed by Supabase, a user can create invitations to schedule meetings. The user is presented with a weekly calendar of available hours that can be booked. These hours are based on the settings determined by the admin in their own timezone.

Technical Considerations

Timezones

For the most part, we can let the browser convert the dates for us. In some cases, we need to compare dates based on the specific timezone of a user.

supabase-js v2

Using the latest release candidate for supabase-js to handle realtime, storage, auth and database queries.

Authentication

I am still searching for ideal authentication strategies. In this prototype, the persistence is turned off since the server runtime has no local storage. Instead, we use a session stored in a cookie.

Refreshing the token on the client and the server is ripe for desyncing.

Realtime

When a user views an invitation or signs up after being invited, the updates to the db are subscribed to by the admin panel.

The new real-time presence is used to show an admin which of the invited users are currently active on the site. This is shown with a green lightning bolt that is otherwise grayed out when the user is inactive.

Storage

An admin can upload a video that attaches to a session. A database trigger is listening for updates to the storage.objects table; it updates the sesssions table with file keys.

Next Steps

  • Support devices with smaller screen
  • Fix authentication bugs