Skip to content

Repository files navigation

The Truth Driving School - Web Application

Professional driving school management system with online payments, booking, and student management

🌐 Live Website: https://thetruthdrivingschool.ca


πŸš€ Quick Start

# Start services
docker-compose up -d

# Check status
docker-compose ps

# View logs
docker-compose logs -f

# Start tunnel (for production)
./tunnel-manager.sh

πŸ“š Documentation

Main Guides

Quick Links


πŸ—οΈ Tech Stack

Frontend

  • React - UI framework
  • Stripe - Payment processing
  • Framer Motion - Animations
  • React Router - Navigation
  • Axios - API calls

Backend

  • Node.js + Express - API server
  • PostgreSQL - Database
  • Redis - Caching & brute force protection
  • JWT - Authentication
  • Sequelize - ORM
  • Nodemailer - Email service

Infrastructure

  • Docker - Containerization
  • Nginx - Reverse proxy
  • Cloudflare Tunnel - Secure access
  • Cloudflare - DNS & SSL

πŸ” Security

  • βœ… SQL Injection Protection - Fixed
  • βœ… XSS Protection - Fixed
  • βœ… Brute Force Protection - Redis-based
  • βœ… JWT Authentication - Enhanced
  • βœ… HTTPS Only - Via Cloudflare
  • βœ… Security Headers - Helmet
  • βœ… Input Validation - Comprehensive

Security Score: 72/100 (improved from 35/100)

View Full Security Audit β†’


πŸ’³ Payment System

  • Provider: Stripe
  • Mode: πŸ”΄ LIVE (Real payments enabled)
  • Currency: CAD (Canadian Dollars)
  • Packages: 6 active packages ($80 - $1000)

Pricing:

  • 1 Hour Driving Lesson: $80
  • 1.5 Hours Lessons: $110
  • Package A (4 lessons): $420
  • Package B (6 lessons): $610
  • Package C (10 lessons): $1000
  • Road Test: $170

View Payment Guide β†’


πŸš€ Deployment Status

  • Environment: Production
  • Domain: thetruthdrivingschool.ca
  • SSL: Enabled via Cloudflare
  • Services: All running
  • Tunnel: Active

Check Status

# Services
docker-compose ps

# Tunnel
./tunnel-manager.sh  # Press 4 for status

# Website
curl https://thetruthdrivingschool.ca

πŸ“ Project Structure

driving_school/
β”œβ”€β”€ backend/           # Node.js API server
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   └── services/
β”‚   └── tests/
β”œβ”€β”€ frontend/          # React application
β”‚   β”œβ”€β”€ public/
β”‚   └── src/
β”‚       β”œβ”€β”€ components/
β”‚       β”œβ”€β”€ pages/
β”‚       └── context/
β”œβ”€β”€ database/          # SQL schemas & seeds
β”œβ”€β”€ docs/             # Documentation
β”‚   β”œβ”€β”€ Guide.md      # Complete guide
β”‚   └── Security.md   # Security guide
β”œβ”€β”€ nginx/            # Reverse proxy config
└── tunnel-manager.sh # Cloudflare tunnel manager

πŸ”§ Configuration

Environment Variables

Required in .env file:

  • DATABASE_URL - PostgreSQL connection
  • JWT_SECRET - JWT secret key
  • STRIPE_SECRET_KEY - Stripe secret (live)
  • STRIPE_PUBLISHABLE_KEY - Stripe public (live)
  • FRONTEND_URL - Production URL
  • REDIS_HOST - Redis host
  • SESSION_SECRET - Session secret

View Full Configuration β†’


πŸ› οΈ Common Commands

Development

# Install dependencies
cd backend && npm install
cd frontend && npm install

# Start development
docker-compose up -d

Production

# Build frontend
cd frontend && npm run build

# Start production
docker-compose -f docker-compose.prod.yml up -d

# Start tunnel
./tunnel-manager.sh

Database

# Connect to database
docker exec -it driving_school_db psql -U postgres -d driving_school

# View packages
docker exec -i driving_school_db psql -U postgres -d driving_school -c \
  "SELECT name, price FROM lesson_packages;"

# Backup
docker exec -i driving_school_db pg_dump -U postgres driving_school > backup.sql

Tunnel

# Interactive manager
./tunnel-manager.sh

# Quick status
./tunnel-manager.sh  # Press 4

# View logs
./tunnel-manager.sh  # Press 6

πŸ“Š Features

Student Features

  • βœ… Online registration & login
  • βœ… Browse & purchase lesson packages
  • βœ… Stripe payment integration
  • βœ… Book driving lessons
  • βœ… View lesson history & progress
  • βœ… Email receipts & confirmations

Admin Features

  • βœ… User management
  • βœ… Booking management
  • βœ… Payment tracking
  • βœ… Package management
  • βœ… Instructor management
  • βœ… Analytics & reporting

Technical Features

  • βœ… Responsive design
  • βœ… Real-time updates
  • βœ… Secure authentication
  • βœ… Payment processing
  • βœ… Email notifications
  • βœ… Database backups
  • βœ… Error monitoring

πŸ”— Important Links

Production

External Services

Documentation


πŸ“ž Support

Documentation

Quick Help

# Check logs
docker-compose logs backend --tail=50

# Check tunnel
./tunnel-manager.sh  # Press 4

# Check database
docker exec -i driving_school_db psql -U postgres -d driving_school -c "SELECT 1;"

πŸ“ˆ Status

  • Development: βœ… Complete
  • Production: βœ… Live
  • Payments: πŸ”΄ Live Mode (Real money)
  • Security: 🟑 B- (72/100)
  • Documentation: βœ… Complete

πŸ“ License

Private - The Truth Driving School


🎯 Quick Reference

Task Command
Start all services docker-compose up -d
Stop all services docker-compose down
View logs docker-compose logs -f
Start tunnel ./tunnel-manager.sh β†’ Press 1
Check status ./tunnel-manager.sh β†’ Press 4
Update prices See Price Management
Security audit See Security Guide
Deploy See Deployment

Built with ❀️ for The Truth Driving School
Last Updated: October 9, 2025

About

this is driving school application test

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages