# Features — caredirect

Evidence date: 2026-10-19. Source: `git@bitbucket.org:overdrive/caredirect.git` at `5721fda` (`master`).

Activation of themes and plugins is stored in the database, which is not in git. "Present" means the code is in the repository. "In use" is **Unknown** unless the code always runs.

## Current features

### WordPress 4.8.2 CMS

- Standard admin, posts, pages, media, comments, menus, users, cron, XML-RPC.
- Location: repository root, `wp-admin/`, `wp-includes/`.
- Status: present. Live host/version: **Unknown / Requires Confirmation**.

### CareDirect theme 1.0

Custom Underscores-based theme for the marketplace front end.

- Theme Name: CareDirect; URI `https://www.caredirect.co.za/`; Author DBL Graphics; Text Domain `cc`.
- Page templates in theme: caregiver profile (`tpl-caregiverprofile.php`), checkout (`tpl-checkout.php`), thank you (`tpl-thankyou.php`), full-width page.
- Custom roles registration (`inc/custom-roles.php`).
- Booking helpers and cities REST route in `functions.php`.
- PayGate PayWeb3 client (`paygate.payweb3.php`).
- Location: `wp-content/themes/caredirect/`.
- Status: present. Whether it is the active theme is **Unknown**.

### CareDirect plugin (CareDirect w/ Facebook Connect)

Primary product plugin. Header version 1.0.1; `CC_VERSION` 1.0.3; `CC_PREFIX` `cc_`; Facebook login flag `CC_FB_LOGIN` = 1; calendar disabled `CC_CALENDAR_DISABLED` = True.

Page templates registered via `PageTemplater.php`:

| Template file | Admin label |
|---|---|
| `become-a-caregiver.php` | Become a Caregiver |
| `become-a-careseeker.php` | Become a CareSeeker |
| `login.php` | Login |
| `training-academy.php` | Training Academy |
| `forgot-password.php` | Password Reset |
| `profile.php` | Profile |
| `help-center.php` | Help Center |
| `find-a-caregiver.php` | Search |

Domain modules (classes under `plugins/caredirect/classes/`):

| Class | Feature |
|---|---|
| `CC_Roles` | Care categories and job roles; user role status; approve/reject |
| `Locations` | ZA cities/suburbs; location relationships |
| `Availability` | `user_availability` table CRUD (calendar gated off) |
| `Ratings` | Average rating from plugin ratings table |
| `CareGiver` / `CareGiver_Query` | Caregiver models / WP_User_Query helpers |
| `CareGiverLog` | Approval/rejection audit |
| `Referrals` | Referral keys |
| `OTP` | HOTP-style OTP for sensitive profile changes |
| `CareComms` | Email/SMS templates and send |
| `CC_Static_Lists` | Static list install data |

REST controllers under `plugins/caredirect/api/`: locations, caregivers, roles, training, references (References controller empty).

Status: present. Activation state: **Unknown**.

### CareGiver / CareSeeker accounts

- WP roles `caregiver` and `careseeker` with `read`.
- Signup, activation keys, login, password reset, Facebook Connect.
- Location: theme `custom-roles.php` + plugin auth AJAX + Facebook SDK wrapper.
- Status: present.

### CareGiver onboarding and approval

- Tabs: personal details, experience, banking, approval.
- Meta flags: `registration_step`, `caregiver_activated`, `approval_sent`.
- Admin notification on application submit.
- Location: `plugins/caredirect/profile/` and handlers in `caredirect.php`.
- Status: present.

### Caregiver search

- Filters: keyword, care category, region, city, date, time, languages.
- Region → cities AJAX/REST.
- Work region/city meta used in SQL filters (2020 region-search commits).
- Location: `templates/find-a-caregiver.php`; AJAX `search_caregivers`.
- Status: present. Last fixed 2020-01-09.

### Availability (meta-based)

- Caregiver-enabled dates (`dates_enabled`) and per-date time windows (`dates_repeat_data`).
- Work location suburbs via `location_relationships`.
- Calendar UI path disabled by constant.
- Status: present (meta path). Calendar table path: present but disabled.

### Booking and PayGate checkout

- Pending booking insert; 12-hour cleanup of pending bookings (theme).
- PayWeb3 initiate → process → thank-you query and approve.
- Checkout UI labels include criminal verification and ID verification line items (commercial meaning **Unknown**).
- Location: theme booking/checkout/thank-you templates.
- Status: present.

### Ratings and reviews

- Plugin average-rating API.
- Theme review AJAX and display against a separately named ratings table.
- Status: present; dual schema **Requires Confirmation**.

### Notifications

- Email + SMS for verification, password reset, banking/contact OTP, caregiver application.
- Location: `class.Comms.php` + `templates/emails/` + `templates/sms/`.
- Status: present.

### Facebook Connect

- OAuth login/register; admin settings option `careconnect_fb_connect`; `social_users` table.
- Status: present when `CC_FB_LOGIN` is 1. Production app config: **Unknown**.

### Referrals / Training Academy / Help Center

- Templates and referral table present.
- Status: present as scaffolding. Published content and usage: **Unknown**.

### Media on S3

- Human Made S3 Uploads 2.0.0-beta2 under `plugins/.S3-Uploads/`.
- Config constants for bucket `caredirect`, region `eu-central-1`.
- Status: present. Dot-prefix may prevent normal plugin discovery — **Requires Confirmation**.

### Vendor plugins (present in tree)

| Directory | Product |
|---|---|
| `akismet` | Akismet Anti-Spam |
| `bootstrap-shortcodes` | Bootstrap Shortcodes |
| `contact-form-7` | Contact Form 7 |
| `contact-form-cfdb7` | CF7 submissions to DB |
| `debug-plugin-activation-errors` | Debug helper |
| `meta-box` | Meta Box |
| `monkeyman-rewrite-analyzer` | Rewrite analyzer |
| `post-types-order` | Post Types Order |
| `revslider` | Slider Revolution |
| `svg-support` | SVG Support |
| `taxonomy-terms-order` | Taxonomy term order |
| `wordpress-importer` | Importer |
| `wordpress-seo` | Yoast SEO |
| `wp-all-import-pro` | WP All Import Pro |
| `wp-file-manager` | WP File Manager |
| `wp-mail-smtp` | WP Mail SMTP |
| `wp-smushit` | WP Smush |

Active set: **Unknown**.

## Completed features (historical, from Git)

Evidence of finished work on `master` (not a product roadmap):

- PayGate amount corrections (early commits).
- Search area filter and area dropdown/AJAX (2019).
- Removal of mandatory search date/time selection (2019-11).
- Work region save and region search criteria (2020-01).
- Bitbucket pipeline introduced / tested (2019-12).

## In development

None observed. No feature branches; tip is idle since 2020-01-09. Provenance: **Inferred** from Git.

## Planned

None documented in the repository. **Unknown / Requires Confirmation**.

## Recently changed (relative to tip)

At tip `5721fda`, the last change is the search area WHERE filter fix. No later commits exist on the remote inspected.

## Deprecated / removed / archived

| Item | Evidence |
|---|---|
| `.caredirect-old` | Dot-prefixed full plugin copy — treat as archive |
| `careconnect` plugin dir | Incomplete remnant (no main bootstrap found) |
| Theme `functions-old.php`, `site-old.js`, extra style CSS variants | Leftover files; not proven active |
| WordPress roles contributor/author/editor | Explicitly removed by theme on `init` |
| FullCalendar / availability calendar | Constant `CC_CALENDAR_DISABLED` = True |

## Feature ↔ evidence map (summary)

| Feature | Primary paths |
|---|---|
| Signup/login | `plugins/caredirect/templates/*`, `caredirect.php` AJAX |
| Roles | `themes/.../inc/custom-roles.php`, `class.CC_Roles.php` |
| Search | `templates/find-a-caregiver.php`, `search_caregivers` |
| Booking/pay | `tpl-checkout.php`, `tpl-thankyou.php`, `paygate.payweb3.php` |
| SMS/email | `class.Comms.php`, `Clx/` |
| Facebook | `facebook/` |
| REST | `plugins/caredirect/api/` |
