=== Appointment Booking (Free) ===
Contributors: technophobialtd
Tags: booking, appointments, scheduler, calendar, appointment-booking
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Free appointment booking plugin for managing appointments through WordPress admin. Create, view, edit, and cancel appointments with resource management.

== Description ==

Appointment Booking (Free) is a WordPress plugin that provides a complete appointment management system for your website. Manage appointments, resources (staff, rooms, equipment), and booking schedules directly from your WordPress admin dashboard.

= Key Features =

* **Resource Management**: Create and manage multiple resources (staff members, rooms, equipment, etc.)
* **Appointment Creation**: Admin-only appointment booking interface
* **Appointment Ledger**: View and manage all appointments in a centralized list
* **Status Management**: Track appointments with booked/cancelled statuses
* **Customer Information**: Store customer name, email, and notes for each appointment
* **Date Filtering**: Filter appointments by date range and resource
* **Security Hardened**: Full capability checks, nonce verification, and input sanitization
* **Prefix-Safe Database**: No hard-coded table prefixes - works with any WordPress installation
* **Upgrade-Safe**: Idempotent database migrations ensure clean upgrades

= Use Cases =

* Medical offices managing patient appointments
* Service businesses scheduling client bookings
* Educational institutions managing room reservations
* Salons and spas coordinating staff schedules
* Any business requiring appointment scheduling

= Future Premium Features =

This free version provides core admin appointment management. Premium upgrade (same plugin, in-place update) will add:
* Frontend booking forms
* Payment integration
* Email notifications
* SMS reminders
* Advanced availability rules
* And more...

== Installation ==

= Automatic Installation =
1. Log in to your WordPress admin dashboard
2. Navigate to Plugins > Add New
3. Search for "Appointment Booking"
4. Click "Install Now" and then "Activate"

= Manual Installation =
1. Download the plugin zip file
2. Extract the zip file
3. Upload the `appointment-booking` folder to `/wp-content/plugins/` directory
4. Activate the plugin through the 'Plugins' menu in WordPress
5. Navigate to "Appointments" in the admin menu to start managing bookings

= After Activation =
1. Go to "Resources" to add your first resource (staff member, room, etc.)
2. Go to "Appointments" to create your first booking
3. All features are accessible from the WordPress admin sidebar

== Frequently Asked Questions ==

= Does this plugin create database tables? =

Yes, the plugin creates three custom tables with the prefix `apt_`:
* `apt_settings` - Plugin configuration
* `apt_resources` - Resources (staff, rooms, equipment)
* `apt_appointments` - Appointment records

These tables are created automatically on plugin activation and use your WordPress database prefix, so they work with any installation.

= Can customers book appointments from the frontend? =

Not in the free version. The free version provides admin-only appointment management. Frontend booking forms will be available in the premium upgrade.

= What happens to my data if I deactivate the plugin? =

Your data is preserved. Deactivating the plugin does not remove any database tables or appointment records. Data is only removed if you explicitly uninstall the plugin.

= Can I manage multiple resources? =

Yes! The free version supports unlimited resources. You can create resources for different staff members, rooms, equipment, or any other bookable item.

= What WordPress version do I need? =

Appointment Booking requires WordPress 6.0 or higher and PHP 8.0 or higher for optimal performance and security.

= Is the plugin secure? =

Yes. All admin actions include:
* Capability checks (`manage_options`)
* Nonce verification for CSRF protection
* Input sanitization and output escaping
* No hard-coded database prefixes

= Can I upgrade to Premium later? =

Yes! The premium version is delivered as an in-place upgrade of the same plugin (same slug). Your appointments, resources, and all data are preserved during the upgrade.

= Does this work with multisite? =

The plugin is designed with multisite compatibility in mind using proper database prefix handling. Each site in a multisite network will have its own set of appointment tables.

== Screenshots ==

1. Resources management - Add and manage bookable resources
2. Appointments list - View all appointments with filtering
3. Create appointment - Admin form for booking new appointments
4. Edit appointment - Update appointment details
5. Appointment details - View complete appointment information

== Changelog ==

= 0.1.0 - 2026-01-15 =

**Milestone A0: Foundation**
* Initial plugin structure with WordPress.org-ready baseline
* Proper plugin headers and text domain
* Safe folder naming (appointment-booking/)
* Baseline readme.txt and uninstall.php

**Milestone A1: Database Versioning**
* Implemented idempotent migration system
* Added apt_db_version option for upgrade safety
* Prefix-safe database helper functions
* Migration runner on admin_init

**Milestone A2: Core Schema**
* Created apt_resources table for managing bookable resources
* Created apt_appointments table for appointment records
* Status enums: active/inactive for resources, booked/cancelled for appointments
* Proper indexes for performance

**Milestone A3: Resource Management**
* Admin resources CRUD interface
* Add, edit, and deactivate resources
* Resource list with status indicators
* Capability checks and nonce verification

**Milestone A4: Appointments List & View**
* Admin appointments list table with pagination
* Filter by resource, status, and date range
* Sortable columns
* Detailed appointment view page

**Milestone A5: Create Appointments**
* Admin appointment creation form
* Validation for required fields and date logic
* Customer information capture (name, email, notes)
* Resource selection with active resource filtering

**Milestone A6: Edit & Cancel**
* Edit appointment functionality
* Cancel appointment action (preserves record)
* Status management
* Back-navigation preservation

**Milestone A7: Security Hardening**
* Complete nonce verification on all write actions
* Capability checks (manage_options) on all admin pages
* Input sanitization and output escaping throughout
* CSRF protection
* Safe error handling

**Milestone A8: Packaging & Release**
* WP.org-ready packaging
* Complete readme.txt with all sections
* Comprehensive .distignore for clean releases
* PHP syntax validation
* Audit for debug code and hard-coded prefixes
* Release artifact preparation

== Upgrade Notice ==

= 0.1.0 =
Initial release. Install to start managing appointments from your WordPress admin.

== Support ==

For support, feature requests, and bug reports, please visit:
* GitHub: https://github.com/TechnophobiaLtd/Free-Appointment-Booking
* Documentation: Coming soon

== Privacy Policy ==

This plugin stores appointment data including customer names and email addresses in your WordPress database. This data is only accessible to WordPress administrators with the `manage_options` capability. The plugin does not send data to external services.
