mri

Mindful Resilience — website

Marketing + enrollment site for Mindful Resilience, a non-profit offering Compassion-Based Resilience Training (CBRT). Built in plain PHP (no framework) using the same front-controller + clean-URL routing pattern as the sibling nonform project on this host.

Target domain: mindfulresilienceinitiative.org · Local dev URL: https://localhost/mri/


How it’s wired

htdocs/
├─ config_mri.php          ← all secrets + editable constants (OUTSIDE the web folder)
└─ mri/
   ├─ .htaccess            ← HTTPS + clean-URL rewrite to index.php
   ├─ index.php            ← front controller (route table lives here)
   ├─ cohort.json          ← editable "next cohort" data (written by the admin screen)
   ├─ home.php             ← storytelling homepage (hero, stats, tiers, testimonials…)
   ├─ individuals.php / business.php / communities.php   ← the 3 audience paths
   ├─ reserve.php          ← Reserve-your-seat flow (primary CTA, individuals only)
   ├─ privacy.php          ← policies + privacy notice
   ├─ admin.php            ← login + cohort editor
   ├─ includes/
   │  ├─ main.php          ← bootstrap: loads config, starts hardened session
   │  ├─ functions.php     ← routes(), url(), send_mail(), SEO schema, header/footer
   │  ├─ cohort.php        ← read/write the cohort.json store
   │  ├─ contact-section.php   ← reusable contact block
   │  ├─ contact-handler.php   ← AJAX: contact form → email
   │  ├─ reserve-handler.php   ← AJAX: reservation → emails (+ optional Stripe)
   │  └─ admin-handler.php     ← AJAX: admin login / save cohort
   ├─ css/  (design-system.css = tokens, index.css = components)
   ├─ js/   (main.js = loader, nav, reveals, count-up, Calendly modal, AJAX)
   ├─ images/ (og-cover.svg)
   └─ lib/  (phpmailer, stripe, google, tcpdf — already vendored)

Editing content (the client)

Everything that changes often is a constant in htdocs/config_mri.php: organisation name, contribution tiers, Zelle details, Calendly link, mail settings, and the admin login.

The rotating cohort (title, start date, schedule, seats, open/closed) is edited without touching code at /admin:

Payments

Email

Transactional email uses PHPMailer over SMTP (settings in config_mri.php). For testing these point at tom@reppedfitness.com. Before launch, switch the SMTP account, notification_email, mail_from, and scholarship_email to the client’s Gmail.

15-minute call

The secondary CTA opens a Calendly modal (lazy-loaded). Set the booking link via calendly_url in the config.

SEO

Theming

The whole palette is CSS custom properties in css/design-system.css (calm pine/sage/cream + clay accent, with the soft multi-stop footer gradient). Re-theme the entire site by editing the tokens at the top of that file.

Deploying to the live domain

  1. Move config_mri.php to the server root (one level above the site folder) and set base_url to https://mindfulresilienceinitiative.org/.
  2. In .htaccess, change RewriteBase /mri/ to RewriteBase /.
  3. Update mail, Calendly, Zelle and Stripe constants to production values.
  4. Change the admin password hash.