
Personal Trainer Planner
A single-tenant Next.js app for personal trainers to schedule and track events,
and manage and invoice trainees. Made in collaboration with and used in
production by a real personal trainer
(PT).
Features
- Shared calendar between PT and each trainee, editable by PT only.
- Three calendar event types:
Workouts
, created by PT, which trainees can check off as completed.
Appointments
, with fees for billing.
Bootcamps
, which trainees can check to confirm attendance, if they have
enough credits.
- Appointment attendance and fee data is viewable in a monthly table.
- Invoices can be generated and emailed to trainees with a button click.
- Mobile-friendly calendar list-view for trainees.
- Custom forms via Contentful CMS, emailed to the PT when the trainee completes
them.
Technology
DevOps
- Deployed on Vercel.
- Production and staging databases on Railway.
- Automated database backups, testing and code quality with
GitHub Actions.
Roadmap
- Migrate to multi-tenancy.
Screenshots
Run it locally
Prerequisites
- For the forgot-password api, and emailing invoices and forms, you will need to
set up an email account for use with nodemailer. See the
Auth.js docs and the
nodemailer docs.
- The app uses Contentful as a CMS for the trainer to create forms for their
clients, which are emailed to the trainer on completion. To use this feature
you will need a Contentful account.
Steps
- Clone the repo
git clone https://github.com/james-langridge/personal-trainer-planner.git
- Install NPM packages
npm install
- Copy the environment variable files and update the variables.
cp .env.example .env
- Create a postgres db in a Docker container:
docker run --name ptp-db -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=ptp -p 5432:5432 -d postgres
- Set the
DATABASE_URL
in your .env
file:DATABASE_URL=postgresql://postgres:postgres@localhost:5432/ptp
- Apply the migrations:
npx prisma migrate deploy
- Seed the database:
npx prisma db seed
- Start the development server:
npm run dev
- Open up http://localhost:3000 in a browser and log in with the email and
password from the seed script.
Deploy your own

See the Next.js deployment documentation
for more details.
License
Distributed under the
MIT License.