Skip to content

laoz40/Horus

Repository files navigation

Horus

Project WIP

A web app to track my gym workouts. I created my own because I didn't enjoy existing solutions and my previous method of tracking workouts (excel spreadsheet) is super inefficient, laggy and doesn't scale well.

Link

Features

  • Create, edit, delete, and save workouts
  • Log exercises, sets, reps, and weights
  • Store workouts between sessions
  • Secure sign up and login
  • Personal accounts with each user’s data kept separate
  • Track workout history over time
  • Track stats like total workout volume and personal records
  • Built-in form validation to reduce mistakes
  • Clear error messages and feedback when something goes wrong
  • Mobile-friendly, responsive design
  • Multiple theme options with 3 visual variants
  • Clean, easy-to-use interface

Built using:

  • Next.js 16
  • React 19
  • TypeScript
  • Convex
  • Better Auth
  • Redis
  • Zod
  • React Hook Form
  • Tailwindcss
  • shadcn/ui

Why Next.js?

I used Next.js simply because I wanted to learn it. I wanted to learn how to build a full-stack app and focus on new things like authentication or working with a database, while using familiar tools like React and TypeScript as a foundation. I also chose a web app because its faster and easier to prototype and get running compared to using something like Flutter or Kotlin. In the future, I plan to build a native mobile version of this app.

This is a for-fun learning project. As a result, this is not a vibe-coded app. I'm using AI as a teacher, and not as a tool to generate code for me, because learning how to actually build things myself matters to me. I want to understand how everything works. Also I'm trying not to become useless and obsolete.


TODO:

General

  • redesign nav bar component
  • reorganise file structure
  • add modals
    • submitting workout
    • deleting
  • add toast notifications
  • fix destructive colour, not bright enough
  • adjust primary colour for light mode
  • add suspense/loading states
    • workout list
    • edit forms
    • user
  • make a proper dark mode, and have 3 app styles/themes (glass effect looks like slop unfortunately)
    • fix exercise name input having a margin/padding
    • fix borders not showing on dark mode
    • fix colours looking off for bg and grey
    • fix glass theme bg on UserButton component
  • fix grey colours on light mode for inputs and secondary buttons, so it doesn't look disabled
    • still need to fix inputs on light mode
  • implement convex as backend
    • remove unused prisma and sqlite code
  • implement auth (clerk)
    • connect to convex
    • add chevron to indicate profile bar is clickable without affecting trigger
    • fix div min height on profile bar
  • betterauth
    • implement otp
    • fix otp code ui
    • use resend to send emails
    • format email content
    • use jwt cache
    • fix signout route
    • setup rate limiter
    • setup oauth
    • add user avatar
    • make account page
    • fix sign out on dashboard doesn't refresh the name
    • increase time for session expiry
    • setup emails notifications for delete account, email change, etc
  • convex
    • use action cache component
    • use rate limiter
    • add max/upper character limits to inputs

Create Workout Page

  • fix stopwatch not resuming progress
  • implement react hook form instead of state
    • fix validation with RHF
      • fix reps validation error not dissappearing until submit
    • fix not loading previous data in edit mode
      • fix exercises loading in reverse order
    • fix autoscroll behaviour not working
      • need to get the id since it doesnt exist yet, cant use same var
      • fix not smooth scrolling
    • implement deleting sets/exercises
      • add toggle for edit mode
      • need to make buttons look like actual buttons, recent look like a heading
      • make the add exercise button toggle to delete exercise in edit mode
      • checkbox state needs to persist between changing edit mode
      • deleting a set during edit and re-adding it makes it show up again
      • deleting a set removed everything after it, not just that set
      • implement undo delete
  • print validation errors in the ui
    • fix no sets error doesn't go away when adding set
  • suggestions for exercises
    • get exercises from an api
    • show results that are actually similar/matching to the input
    • fix exercises names not loading for edit
    • fix choosing exercise from the list makes the set inputs nan
    • make function to turn exercises from api into title case
    • cache api results to prevent repeat api requests
      • @convex-dev/action-cache
      • clear suggestions (global exercises that have no instances, from that user)
        • need to make globals exercises linked to the user
    • make a search button instead of auto calling the api
    • add default exercises (common ones)
    • show loading state for fetching exercises from db and api
    • show error for too many requests as a toast
    • fix Error fetching from API: TypeError: groupTwo is not iterable
    • extract the toast messages into a toastMessages.ts
    • redo error handling
  • make exercise form appear after typing the name
    • fix exercise bottom bar not showing when loading a workout with a single exercise
  • always add empty set or exercise if last one is deleted
  • remove workout title input, only prompt workout title on submit
  • implement preset feature
    • add option to save an existing workout as a preset
    • add ability to keep rep and weights or use blank
  • implement saving incomplete workout draft
  • implement supersetting feature
  • add exercise indicator to show how many exercises in the workout
    • tap to select exercises from a list, to scroll to that one
  • history icon -> opens dialog to show last 5 sets of that exercise
  • fix dropdown not matching width of input
  • implement another way to delete exercise without inputting the name
  • filter out empty sets and exercises rather than invalidating the workout
  • clear input button on exercise name
  • fix duration timer to increment using real time
  • redesign the ui and remove the redundant add set button
    • move position of edit and recent buttons
    • change add exercise button to use text because its unclear
  • FIX: workouts always save as friday workout

History

  • load save workouts from db
  • edit workouts using the same form
  • make seperate workout view page for past workouts
  • fix card when no prs
  • implement muscle groups to display on the workout card
    • workouts need to save muscle groups info
    • update prisma schema to include muscleGroups
    • load muscle group for each exercise
    • keep space consistent when no muscle group badges are present
  • calculate prs
    • Weighted exercises -Heaviest weight: weight
      • Highest set volume: weight * reps
    • Bodyweight exercises
      • Highest reps: reps
    • dont make it a pr if its the first set
  • calculate prs on submission instead of history fetch, to allow for pagination and faster loading
  • calculate total volume lifted
  • calculate total exercises in workout
  • add search bar
    • make it expand from button
    • or opens modal?
    • search workouts by title or muscle group or exercise. use a dropdown to select type
  • filter workouts, by:
    • date ranges
    • workout type/presets
    • workouts containing specific exercise/muscle group
  • add pagination
  • fix cant tab through each card

Progress

  • graphs to show progression over time
    • chart.js?
  • filter stats
  • frequency heatmap to show sessions per time period
  • weekly summary

Dashboard

  • change to start workout instead of create (more clear)
  • show goals/stats on dashboard for motivation
    • show frequency heatmap of sessions
    • prs

About

A web app to track gym workouts and show cool stats.

Resources

Stars

Watchers

Forks

Contributors