myheats

Live heats, scoring and leaderboard for sport events
git clone https://git.in0rdr.ch/myheats.git
Log | Files | Refs | Pull requests | README | LICENSE

commit a7d9787fce36b870ab0b1344e6d1e219da93a6e8
parent f6ef1ce1029f6350d3692d0642741081f248895d
Author: Andreas Gruhler <andreas.gruhler@adfinis.com>
Date:   Sun, 25 Aug 2024 14:52:40 +0200

doc: magic link mail limits

Diffstat:
MREADME.md | 43++++++++++++++++++++++++++-----------------
1 file changed, 26 insertions(+), 17 deletions(-)

diff --git a/README.md b/README.md @@ -1,14 +1,15 @@ # My Heats - Live heats, scoring and leaderboard for sport events. -This React application was build using [Vite](https://vitejs.dev) (`npm create vite@latest . --template react`) and the following core componentes: -* [`react-router-dom`](https://reactrouter.com) for routing between the React components -* [`@supabase/supabase-js`](https://supabase.com/docs/guides/getting-started/quickstarts/reactjs) for connection to the Supabase database +This React application was build using [Vite](https://vitejs.dev) (`npm create +vite@latest . --template react`) and the following core componentes: +* [`react-router-dom`](https://reactrouter.com) for routing between the React + components +* [`@supabase/supabase-js`](https://supabase.com/docs/guides/getting-started/quickstarts/reactjs) + for connection to the Supabase database * [`react-select`](https://react-select.com) for the selectbox widgets ## Running the App - ```bash # Install dependencies npm install @@ -16,13 +17,14 @@ npm install # Export Supabase URI and database access key export VITE_APP_SUPABASE_URL= export VITE_APP_SUPABASE_KEY= +# Export the email magic link redirect URI +export VITE_APP_EMAIL_REDIRECT_TO=https://my-heats-instance.com # Start app for development npm run dev ``` ## Scoring and ranking logic - The scoring and ranking logic is defined in `utils.js` inside the `rankByHeat` function. Following ranking options can be selected. Rank by: * Start number: Rank by athlete start number @@ -31,8 +33,7 @@ function. Following ranking options can be selected. Rank by: bad) * Total: Ranks by sum of all selected heats -## Database Schema - +## Database schema The Supabase schema is stored in the `schema` folder and can be created using plain psql. ![supabase-schema](assets/supabase-schema.png) @@ -114,23 +115,31 @@ alter This is required for the leaderboard to automatically update scores when they are created or changed by judges. -## Authentication with Magic Links - -Authentication of judges is performed using [Supabase Magic Links](https://supabase.com/docs/guides/auth/auth-magic-link). +## Authentication with magic links +Authentication of judges is performed using [Supabase Magic +Links](https://supabase.com/docs/guides/auth/auth-magic-link). -The basic code for the authentication flow was taken from the [official React Getting Started Tutorial](https://supabase.com/docs/guides/getting-started/tutorials/with-react). +The basic code for the authentication flow was taken from the [official React +Getting Started +Tutorial](https://supabase.com/docs/guides/getting-started/tutorials/with-react). Sign up process for new judges: * The judge is required to have a valid email address -* Judges can be invied to the scoring backend by invite only (Click ["Invite"](https://app.supabase.com/project/_/auth/users) in Supabase backend) -* The UUID is referenced automatically in the `judges` table, row can be amended with name of the judge +* Judges can be invied to the scoring backend by invite only (Click + ["Invite"](https://app.supabase.com/project/_/auth/users) in Supabase +backend) +* The UUID is referenced automatically in the `judges` table, row can be + amended with name of the judge Sign in process: * For sign in, the judge enters her email adress and receives a login link * The login information is stored in the browser session until sign out -## Bulk Import/Export +### Supabase rate limits +* 4 emails per hour (e.g., sign-in magic links) +* https://supabase.com/docs/guides/auth/rate-limits +## Bulk import/export Use direct postgres database access: ```bash psql -h db.youruniquedb.supabase.co -U postgres @@ -146,13 +155,13 @@ To export data to local csv: \copy public.scores to 'scores_rows.csv' DELIMITER ',' CSV HEADER; ``` -## Development & Contributions +## Development & contributions * All source code is available in this repository. Contributions are always welcome! * A [Kanban board](https://board.in0rdr.ch/public/board/c445667f1c999857f6149cad967fa44f196f2e9fef02069c5f5136e036dd) documents plans, todos and decisions for further development of the project. -## Community and Support +## Community and support For question and support visit [#p0c/libera](https://web.libera.chat/gamja/#p0c) on IRC.