📅 A1 App Builders — Addon

AppointmentPro
Reference Guide

A self-hosted, zero-dependency PHP appointment management system with a sleek dark admin panel. Drop it into any website and start taking bookings in minutes.

PHP + SQLite3 No Dependencies CSRF Protected Mobile Responsive Email Notifications
01

What It Does

AppointmentPro is a complete booking management addon built for PHP websites. It gives businesses a polished dark-themed admin panel where appointments can be tracked, services defined, and unavailable times blocked out — all powered by a lightweight SQLite database with no external server required.

📆
Appointment Dashboard
View all bookings in a sortable, filterable table. See totals for Pending, Confirmed, Completed, and Cancelled appointments at a glance with stat cards.
🛠️
Service Manager
Create unlimited services with custom durations and descriptions. Toggle them active/inactive on the fly without losing appointment history.
🚫
Blocked Times
Block out individual time slots or full days — for holidays, staff absence, or any reason. Prevents clients from booking during those windows.
✉️
Email Confirmations
When an appointment is marked Confirmed, the system automatically emails the client a branded HTML confirmation with their service, date, and time.
🔒
Password-Protected Admin
Simple session-based authentication with CSRF token protection on every form. Admin panel is fully gated behind a password login page.
📱
Fully Responsive
The admin panel works on desktop and mobile. Tables reflow to card-style layouts on small screens. Sidebar collapses gracefully.
02

Feature Breakdown

Feature Details Notes
Status Management Pending → Confirmed → Completed → Cancelled Dropdown + save button per row; triggers email on Confirmed
Search Live search by name, email, or service GET-based, preserves active filter tab
Filter Tabs All / Pending / Confirmed / Completed / Cancelled Counts shown live in each tab
Services CRUD Add, enable/disable, delete services Duration in minutes, optional description
Blocked Times Block by date + optional time, or mark all-day Reason field for internal notes; deletable
CSRF Protection Token on every POST form appt_csrf_token() + appt_verify_csrf()
Session Auth Password login with session flag Change default password in login.php
Email on Confirm HTML email sent via sendEmail() Includes service, date, and time in styled table
SQLite Storage Zero-config file-based database No MySQL required; portable and fast
03

Pricing & Market Value

AppointmentPro is a complete, production-ready scheduling addon. Here's how it compares to the market — and why the one-time pricing is a significant advantage.

One-Time License

Pay once. Own it forever. All future upgrades are included at no additional cost — no subscriptions, no renewal fees, no per-seat pricing.

$149
one-time · unlimited sites
Market avg: $30–$79/mo SaaS
SaaS Competitors
$49/mo
Typical Calendly / Acuity pricing
  • Online booking widget
  • Email reminders
  • You own the data
  • Self-hosted
  • One-time cost
  • White-label admin
Custom Dev (Agency)
$2k+
Freelancer / dev shop estimate
  • Custom built
  • Email notifications
  • You own the data
  • Self-hosted
  • Months to deliver
  • Ongoing maintenance cost
💡
At $149 one-time, AppointmentPro pays for itself vs. Calendly Pro in under 4 months — and you keep it forever. Equivalent SaaS costs $588–$948 per year annually. Resellers and agencies can white-label and charge clients $49–$99/month, recovering cost in the first month.
04

Free Upgrades — For Life

Every customer who purchases AppointmentPro receives all future updates at no additional charge. The roadmap below shows what's planned — all included.

🔄

Lifetime Upgrade Guarantee

Buy once and receive every new feature, security patch, and version upgrade automatically. No upgrade fees. No tier locks. No expiration.

Planned Feature Status Description
Public Booking Widget Upcoming Embeddable booking form for your website front-end
SMS Reminders Upcoming Twilio-powered SMS confirmations and reminders
Google Calendar Sync Planned Two-way sync with Google Calendar for admins
Recurring Appointments Planned Weekly / biweekly / monthly repeat bookings
Multi-Staff Support Planned Assign appointments to individual team members
Payment Integration Planned Stripe deposit or full payment at booking time
Client Portal Planned Let clients view, reschedule, or cancel their own bookings
MySQL Support Planned Optional MySQL/MariaDB backend for high-volume sites
05

File Structure

AppointmentPro lives in a self-contained directory that can be dropped into any PHP host. No Composer, no npm, no build step.

addons/appointments/ ├── admin/ │ ├── index.php # Appointments dashboard + status management │ ├── services.php # Service CRUD (add / toggle / delete) │ ├── blocked.php # Block dates and time slots │ ├── login.php # Password authentication page │ └── includes/ │ ├── config.php # DB class, helpers, CSRF, auth guard │ └── logout.php # Session destroy + redirect └── database/ └── appointments.sql # Schema + default seed data
FileMethodPurpose
admin/index.php GET POST Main dashboard — lists, filters, searches, and updates appointment statuses; triggers confirmation email
admin/services.php GET POST CRUD for services: add with name/duration/desc, toggle active state, delete
admin/blocked.php GET POST Add or remove blocked dates/times; supports all-day flag
admin/login.php POST Session-based password authentication; redirects to dashboard on success
includes/config.php PHP ApptDB class, sanitize(), post(), get(), CSRF helpers, appt_require_admin(), sendEmail()
database/appointments.sql SQL SQLite schema creation + 4 default service rows seeded on first install
06

Database Schema

Three SQLite tables power the entire system. The database file is auto-created and requires no manual setup beyond running the SQL schema once.

appointments — Core booking records
idINTEGER PKAuto-incrementing primary key
nameTEXT NOT NULLClient full name
emailTEXT NOT NULLClient email — used for confirmation emails
phoneTEXTOptional client phone number
serviceTEXT NOT NULLService name at time of booking (denormalized)
appt_dateTEXT NOT NULLAppointment date (YYYY-MM-DD)
appt_timeTEXT NOT NULLAppointment time (HH:MM)
notesTEXTOptional client notes or special requests
statusTEXTpending | confirmed | completed | cancelled
created_atTEXTAuto-set to datetime('now') on insert
updated_atTEXTUpdated on every status change
services — Bookable service catalog
idINTEGER PKAuto-incrementing primary key
nameTEXT NOT NULLDisplay name shown to clients and admin
duration_minutesINTEGERDuration of the appointment slot (default 60)
descriptionTEXTOptional short description for the service
activeINTEGER1 = available for booking, 0 = hidden/disabled
blocked_times — Unavailability rules
idINTEGER PKAuto-incrementing primary key
blocked_dateTEXT NOT NULLThe date to block (YYYY-MM-DD)
blocked_timeTEXTSpecific time to block; NULL if all_day = 1
reasonTEXTInternal admin note (e.g. "Holiday", "Staff out")
all_dayINTEGER1 = entire day blocked, 0 = specific time slot only
07

Admin Modules

The admin panel has three core sections, each a standalone PHP page sharing a common sidebar navigation and config layer.

📆

Appointments Dashboard (index.php)

The home screen. Shows stat cards for Total, Pending, Confirmed, and Completed counts. Lists all appointments in a table with name, email, phone, service, date/time, status badge, truncated notes, and an inline status dropdown. Submitting the dropdown fires a POST that updates the DB and redirects. If the new status is "confirmed," an HTML email is sent to the client.

🛠️

Service Manager (services.php)

A three-column add form at the top (name, duration, description) with an Add Service button. Below, a table lists every service with Active/Inactive badge, an Enable/Disable toggle button, and a Delete button with confirmation prompt. Services are ordered alphabetically.

🚫

Blocked Times (blocked.php)

A four-column form (date, time, reason, all-day checkbox + Block button). Below, a table lists all blocked entries with the date, time (or dash if all-day), reason, type label, and a Remove button. Blocks are ordered most-recent date first.

08

Security Model

AppointmentPro uses several layers of protection appropriate for a small-business admin addon.

⚠️
Change the default password. The default admin password in login.php is appt_admin_2024. Update this before going live. A future update will replace it with a bcrypt-hashed credential stored in config.
LayerImplementation
Session Auth$_SESSION['appt_admin'] flag; all admin pages call appt_require_admin() at the top
CSRF TokensEvery POST form embeds a csrf_token; verified with appt_verify_csrf() before any mutation
Output SanitizationAll database values passed through sanitize() before rendering to prevent XSS
Prepared StatementsINSERT operations use prepare() + bindValue() to prevent SQL injection
Type CastingIDs cast to (int) before any DELETE or UPDATE query using string interpolation
Status WhitelistStatus updates validated against an in_array() whitelist before executing
09

Appointment Statuses

Each appointment moves through a simple lifecycle. Admin can set any status at any time via the dashboard dropdown.

⏳ Pending ✅ Confirmed ✔ Completed ✕ Cancelled
StatusMeaningTriggers
PendingDefault state — booking received, awaiting reviewNo email sent
ConfirmedAdmin has accepted the bookingSends confirmation email to client
CompletedAppointment has occurred successfullyNo email sent
CancelledBooking cancelled by admin or clientNo automatic email (can be added)
10

Installation

AppointmentPro is designed to install in minutes. No Composer. No npm. No build tools.

01

Upload Files

Upload the addons/appointments/ directory to your PHP web host. The admin panel lives at /addons/appointments/admin/.

02

Initialize the Database

Run appointments.sql once to create the three tables. With SQLite, this happens automatically when the ApptDB class connects for the first time — the schema is applied on first load if not yet present.

03

Set Your Admin Password

Open admin/login.php and update the $admin_pass variable to a strong password of your choice before going live.

04

Configure Email (Optional)

In includes/config.php, configure the sendEmail() function with your preferred PHP mailer or SMTP credentials for confirmation emails to work.

05

Log In & Start Taking Bookings

Visit /admin/login.php, enter your password, and you're in. Add your services, and start receiving appointments submitted through the front-end booking form.

📋
Requirements: PHP 7.4+ with the SQLite3 extension enabled (standard on most shared hosts). No other dependencies required.
11

Email Notifications

When an appointment is moved to Confirmed status, the system fetches the appointment record and sends a styled HTML email to the client.

✉️
The confirmation email includes the client's name, the service booked, the confirmed date, and the confirmed time — formatted in a clean HTML table. Subject line is "Appointment Confirmed — [date]".
Email FieldValue
ToClient's email from the appointment record
SubjectAppointment Confirmed — [appt_date]
BodyHTML with greeting, confirmed status notice, and a table of service / date / time
TriggerOnly fires when status changes to "confirmed" via admin dashboard
FunctionsendEmail($to, $subject, $html_body) defined in config.php