1. Directory & File Sitemap
The codebase is designed using clean PHP modular includes. Here is a breakdown of the directories and pages:
| Category / File | Description | Status |
|---|---|---|
| / (home) | Homepage displaying Hero, Prakriti Quiz entry cards, Treatments glossary, and Blog roll. | Active |
| therapies | Directory listing Ayurvedic therapies (Abhyanga, Shirodhara, Janu Basti) filterable by Vata/Pitta/Kapha focus. | Active |
| therapy/slug | Individual therapy details showing clinical step-by-step procedures, benefits, and an appointment booking inquiry form. | Active |
| dosha-quiz | Interactive 10-question Prakriti Diagnostic Assessment quiz calculating Vata/Pitta/Kapha proportions. | Active |
| remedies | Traditional Home Remedies Glossary search list for minor ailments (Acidity, Insomnia, Bloating). | Active |
| about-us | Clinician about profile (BAMS background), clinical philosophies, and generic contact inquiry form. | Active |
| admin/login.php | Secure login page for clinicians, setting session vars. Isolated header/footer. | Active |
| admin/index.php | Admin dashboard listing all articles with stats, view counters, and delete operations. | Active |
| config/db.php | PDO database initialization file. Automatically halts on error with helpful setup instructions. | Active |
2. Database Entity-Relationship Model
The MySQL database structure consists of 7 relational tables defined in schema.sql. They handles users, categories, articles, comments, therapies, leads, and custom site configurations:
1. users
Manages credentials and author profile info.id (PK) | username | password_hash | email | display_name | role | bio | avatar_url
2. categories
Classifies articles into fields (Dinacharya, Ahara, etc).id (PK) | name | slug | description
3. posts
Contains content, author & category FKs, status, view count.id (PK) | title | slug | content | summary | cover_image | category_id (FK) | author_id (FK) | status | views_count
4. therapies
Contains procedures, benefits, focused dosha, and duration.id (PK) | name | slug | description | benefits | process | duration | dosha_focus | cover_image
5. leads
Compiled submissions database storing bookings and contacts.id (PK) | type | name | email | details | created_at
6. site_settings
Key-value configurations table storing navigation menus and colors.setting_key (PK) | setting_value
3. Leads & Forms Processing (Contact & Newsletter)
The website features a centralized lead compilation system via leads-submit.php, logging submissions to the leads table. Here is how inputs are collected and reviewed:
- Newsletter Forms: Users input their email. The system logs it as type
'newsletter'with details `Signed up for newsletter subscription.`. Viewable in admin. - Contact Forms: Located on `about-us`. Captures name, email, subject, and symptom list, logging it as type
'contact'. - Therapy Bookings: Embedded on individual treatment pages. Logs name, email, preferred date, and clinical concerns as type
'therapy_booking'. - Admin Leads Panel: Authors can view submissions in
admin/leads.php, sort them using interactive filter tabs, delete old logs, and contact users directly by clicking their email links.
Leads Security
Sanitized through sanitize() functions to prevent cross-site scripting (XSS) before database insertion.
4. Admin Isolation & Decoupled Headers/Footers
To keep the clinician's workspace distraction-free, the public-facing pages and admin management console are completely separated:
Public Pages Layout
Utilizesincludes/header.php and includes/footer.php.
- Loads public navbar navigation menu dynamically (editable in Settings).
- Shows public login buttons ("Admin Access").
- Displays the bottom public footer, standard disclaimers, and social links.
Admin Console Layout
Utilizesincludes/admin-header.php and includes/admin-footer.php.
- Clean top console header without external links.
- A dedicated left-side sidebar (
admin-sidebar.php) providing quick links to dashboards, categories, write-sheets, and settings. - No external widgets, newsletters, or client templates visible.
- Session verification checks integrated, redirecting unauthorized traffic to login.
5. Aesthetic Customization & Design Tokens
The portal utilizes customized styling in css/style.css targeting a premium wellness identity with Poppins typography: