Learn & Drive
Lesson booking website for a UK driving instructor
- Role
- Full-Stack Developer
- Live since
- Nov 2026
- Status
- Live
In short
A UK driving instructor needed one place for learners to book lessons and for the instructor to run students, lessons and payments. I built a website with online booking, a student area and an admin panel for the calendar, payments and reports. It is live at learnanddrive.online, so bookings and records are now kept in one place.
The problem
Learners want to book lessons around college or work, and the instructor has to avoid double bookings.
The instructor also has to track who has paid after each lesson, who still owes money and how much comes in each month.
What I built
Learners visit the website to see lesson packages, a gallery, reviews, common questions and a blog. They then send a booking request for manual or automatic lessons. Nothing is paid upfront.
Students have their own login. They can download a copy of their data or ask for it to be deleted.
The instructor runs everything from an admin panel: students, a lesson calendar, payments and reports.
My role
I designed and built the website for the instructor as a full-stack developer: the public pages, the booking system, the student area and the admin panel.
Results
Live at learnanddrive.online. The instructor takes booking requests online, manages students and lessons from one calendar, records payments and refunds, and pulls reports, without double bookings.
Key features
- Two lessons can never be booked over the same time.
- Lesson times follow UK time, including the switch to summer time.
- Bookings can be created, repeated, confirmed, declined, moved to a suggested new time or cancelled.
- A payment record for each student: log a payment, a refund or an adjustment.
- Reports on payments, unpaid balances by student, and income by month and by package, downloadable as spreadsheets.
- A calendar feed, so lessons appear in the instructor's own calendar app.
- Student records with status and notes, which can be exported or made anonymous.
- Automatic lesson reminders.
- When a student's data is deleted, their personal details are removed but payment records are kept.
- Spam protection on forms and checks that uploaded files are what they claim to be.
How it’s built
Approach
A pnpm monorepo with a Next.js web app and a NestJS API, using Prisma on PostgreSQL. Background jobs use Redis and BullMQ and run inside the API process: lesson reminders hourly and data retention daily. The app runs under PM2 on a Linux server (my VPS).
Technical work
- Built the Next.js public site, booking flow and student area, and the NestJS API behind them.
- Admin: students (status, notes, export, anonymise), bookings (calendar, create, repeat, confirm, decline, propose, cancel), ledger (record payment, refund, adjust).
- Reports with CSV export: payments, unpaid by student, income by month and by package.
- ICS calendar feed for the instructor's bookings.
- Student data export and delete request: the student is anonymised and the ledger is kept.
- BullMQ jobs: hourly reminders and daily data retention.
- Deployed with PM2 on a Linux server.
Architecture
Next.js web app and NestJS API in one pnpm monorepo. The API owns the data through Prisma on PostgreSQL. Redis and BullMQ run the scheduled jobs (hourly reminders, daily data retention) inside the API process. PM2 keeps the processes running on a Linux server.
Key decisions and trade-offs
Times are stored in UTC and shown in London time (including BST) using date-fns tz. Money is stored in pence. Overlapping bookings are blocked by the database itself with an exclusion constraint, rather than only by application checks.
Engineering highlights
- A PostgreSQL exclusion constraint (EXCLUDE USING gist on the booking time range) stops two bookings overlapping at the database level, added as raw SQL in a Prisma migration.
- Security: argon2 password hashing, rate limiting (@nestjs/throttler), Cloudflare Turnstile plus a honeypot on forms, real file-type checks on uploads, helmet/CSP headers and an audit log.
Stack
- Next.js
- NestJS
- Prisma
- PostgreSQL
- Redis
- BullMQ
- date-fns tz
- argon2
- Cloudflare Turnstile
- PM2
- pnpm
