Skip to content

cmnord/jep

Repository files navigation

Jep!

Play Jeopardy! online with your friends at Jep!. Choose from past games or make your own. Just share the link to play with friends.

๐ŸŒŽ Play a game: https://whatis.club

๐Ÿ“ฐ Read the blog post: https://clairenord.com/jep.html

Development

To run the app locally, first install Docker.

Next, install the project's local dependencies:

npm install

Start the Supabase project:

npm run db:start

Set environment variables. In particular, set SUPABASE_URL, SUPABASE_ANON_KEY, and SUPABASE_SERVICE_ROLE_KEY from the results of npx supabase status.

cp .env.example .env
vim .env # add secrets to .env
source .env

Afterwards, start the Remix development server like so:

npm run dev

Open up http://localhost:3000 and you should be ready to go!

Supabase

View the local Supabase dashboard at http://localhost:54323/.

View mock emails sent for password reset and email verification at http://localhost:54324/.

Link to your own production Supabase project with:

npx supabase link --project-ref $SUPABASE_PROJECT_REF --password $SUPABASE_DB_PASSWORD

Make a migration1

npx supabase db diff -f my_migration_name

Deploy a migration2

npx supabase db push

Generate Typescript types from the database schema:

npx supabase gen types typescript --linked > app/models/database.types.ts

Tools used

Thanks

License

MIT ยฉ cmnord

Footnotes

  1. https://supabase.com/docs/guides/cli/local-development#database-migrations โ†ฉ

  2. https://supabase.com/docs/guides/cli/local-development#deploy-database-changes โ†ฉ