Create, save, and share workout routines.
- Node.js (latest LTS version recommended)
- Docker Desktop (latest version recommended)
Install dependencies with
npm installTo start the Supabase development environment, run:
npx supabase startYou can view the local Supabase dashboard at http://127.0.0.1:54323
Create a .env file in the root of your project using the provided .env.example as a template.
After starting the Supabase development environment, it will print out your local credentials. Update the PUBLIC_SUPABASE_URL and PUBLIC_SUPABASE_PUBLISHABLE_KEY variables in your .env file with the corresponding values.
Update the GROQ_API_KEY variable in your .env file with your Groq API key.
To start the SvelteKit development server, run:
npm run devYou can view your app at http://localhost:5173
To sign in in the development environment, create a user in the local Supabase dashboard and go to http://localhost:5173/login/dev
To stop the Supabase development environment, run:
npx supabase stopTo stop the Supabase development environment and remove all data, run:
npx supabase stop --no-backupTo create a production version of your app:
npm run buildYou can preview the production build with npm run preview.
If you want to deploy your own instance of the app, first create a project on Supabase.
Go to Project Settings > General and copy the Project ID.
Log in to the Supabase CLI:
npx supabase loginLink your local project to your Supabase project:
npx supabase link --project-ref <your-project-id>Push the database schema to your Supabase project:
npx supabase db pushIn your Supabase project, from the Project Overview page, under the name, click Copy > Project URL. Under Project Settings > API Keys page, copy the publishable key.
Get the GROQ_API_KEY from Groq Console.
To deploy your app, you may need to install an adapter for your target environment.
Deploy your app to your target environment (e.g. Cloudflare Workers) with the appropriate environment variables set.
Don't forget to update the Site URL in your Supabase project under Authentication > URL Configuration to match the URL of your deployed app.
To set up Google OAuth, follow the instructions in the Supabase documentation
After making changes to your database using the local Supabase dashboard, you can generate a migration file with:
npx supabase db diff -f <migration-name>Then, regenerate the types with:
npx supabase gen types typescript --local > src/lib/database.types.tsFinally, push the migration to your Supabase project with:
npx supabase db pushIf you pull changes that include new migrations, run the following command to apply them to your local database:
npx supabase db reset