Skip to content

AloyBranCheung/workout-app

Repository files navigation

workout-app

Technologies

typescript next.js tailwindcss supabase postgres prisma

Workout App

  • Create your own workout plan
  • Add your own exercises
  • Track your workouts
  • Track your progress (BMI, weight etc.)

Getting Started

  1. Configure .env file
    • Supabase API Settings
    • Copy Project URL to DATABASE_URL and NEXT_PUBLIC_SUPABASE_URL
    • Copy Project API Keys: anon/public key to NEXT_PUBLIC_SUPABASE_ANON_KEY
  2. Run yarn install && npx prisma generate
  3. Run ./reset_db.sh
  4. Run ./dev.sh (make sure have docker)
  5. Disable email confirmation under Authentication > Providers > Email in Supabase UI
  6. run create_user.sh in scripts folder

Debugging:

  • make sure you are not ip banned on the supabase admin dashboard (if you failed to login)

Dev

Prisma

https://www.prisma.io/docs/concepts/components/prisma-migrate/mental-model

prisma migrate dev for development environment

prisma migrate deploy for deployment (PRD) environment

  • Edit the DBML documentation before editing the schema

Resources

Notes to self

  • index.tsx is the 'container'
  • wrap logic in hooks where possible
  • kebab-case for non-react file names
  • PascalCase for class files
  • camelCase by default

To-do list

  • Landing Page
  • Login Page
  • Home Page
  • Workout Plan
  • Execute Workout Plan and track history/progress
  • Run Plan/History

Releases

No releases published

Packages

No packages published