Are you bored of those inflexible Excel sheets when preparing a training schedule for your client? Worry no more, because you have the Gym-app. It is intended not only for personal trainers and their clients but also for the ones who want to build their own plans and track progress individually.
Gym-app allows users (trainers) to create a base of clients and a base of exercises. Out of the prepared exercise base, the user can create a schedule and assign it to a specific client.
Within the schedule planning view user has many options. Days can be swapped, it is possible to drag and drop individual exercises within a day, delete, copy items, etc. which really gives you a sense of freedom. The training schedule can be saved in a database and exported as a .xlsx file.
Exercises can be created individually by using a form, where users can input exercise names, related muscle groups, and even a link to a demo. Gym-app also offers a faster way of adding exercises to the base - by importing a .xlsx file. Setting up an Excel sheet should be relatively quick and then hundreds of exercises and exercise variants can be imported with just one click.
- Next.js
- React.js
- Shadcn.ui
- Tailwind CSS
- React Hook Form
- Tanstack Table
- Zod
- SheetsJS
- dnd kit
- Prisma.io
- MongoDB
- NextAuth
To get a local copy up and running, please follow these simple steps.
Here is what you need to be able to run Gym-app.
- Node.js (Version: >=18.17)
- MongoDB
- Yarn (recommended)
-
Clone the repo into a public GitHub repository.
git clone https://github.com/jprymak/gym-app
-
Go to the project folder
cd gym-app
-
Install packages with yarn
yarn
-
Set up your
.env
file- Duplicate
.env.example
to.env
- Use
openssl rand -base64 32
to generate a key and add it underNEXTAUTH_SECRET
in the.env
file.
- Duplicate
-
Setup Node If your Node version does not meet the project's requirements as instructed by the docs, "nvm" (Node Version Manager) allows using Node at the version required by the project:
nvm use
You first might need to install the specific version and then use it:
nvm install && nvm use
You can install nvm from here.
-
Configure environment variables in the
.env
file. Replace<user>
,<pass>
,<db-host>
with their applicable valuesDATABASE_URL='mongodb+srv://<user>:<pass>@<db-host>'
-
Open Prisma Studio to look at or modify the database content:
yarn db-studio
-
Click on the
User
model to add a new user record. -
Fill out the fields
email
,name
,password
,role
, (remembering to encrypt your password with BCrypt) and clickSave 1 change
to create your first user. -
Open a browser to http://localhost:3000 and login with your just created, first user.
Run tests in watch mode:
yarn test:watch
Special thanks to projects which made gym-app possible: