Protyre_SmartServiceScheduler
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
A comprehensive booking and management system for Protyre tyre service centers.
- Service type selection (tyre replacement, wheel alignment, brake check)
- Branch location selection
- Date and time slot picker
- Customer and vehicle details form
- Booking confirmation with SMS/Email notifications
- View all bookings by date and time
- Technician availability management
- Time slot management (add/block slots)
- Utilization charts per technician
- Auto-balance bookings across technicians
- Daily summary dashboard
- SMS and email confirmations
- Booking reminders
- Daily summary reports
βββ backend/
β βββ database/
β β βββ migrations.ts # Database schema
β β βββ queries.ts # Database operations
β βββ routes/
β β βββ bookings.ts # Booking management
β β βββ admin.ts # Admin operations
β β βββ notifications.ts # SMS/Email handling
β βββ index.ts # Main API server
βββ frontend/
β βββ components/
β β βββ App.tsx # Main app component
β β βββ BookingForm.tsx # Customer booking interface
β β βββ AdminPanel.tsx # Admin dashboard
β β βββ Dashboard.tsx # Summary dashboard
β βββ index.html # Main HTML template
β βββ index.tsx # Frontend entry point
β βββ style.css # Custom styles
βββ shared/
βββ types.ts # Shared TypeScript types
- Backend: Hono.js API framework
- Database: SQLite with Val Town's sqlite service
- Frontend: React with TypeScript
- Styling: TailwindCSS
- Notifications: Email via Val Town's email service
- Charts: Chart.js for utilization visualization
Set these in your Val Town environment:
TWILIO_ACCOUNT_SID
- For SMS notificationsTWILIO_AUTH_TOKEN
- For SMS authenticationTWILIO_PHONE_NUMBER
- Your Twilio phone number
- The backend API runs on the main HTTP endpoint
- Access the customer booking interface at
/
- Access the admin panel at
/admin
- View the dashboard at
/dashboard
GET /api/branches
- Get all branch locationsGET /api/services
- Get available servicesGET /api/availability
- Get available time slotsPOST /api/bookings
- Create new booking
GET /api/admin/bookings
- Get all bookingsGET /api/admin/technicians
- Get technician availabilityPOST /api/admin/slots
- Manage time slotsGET /api/admin/dashboard
- Get dashboard data