Features and routes
All paths exist under / (English) and /es/ (Spanish). Page files are in src/pages/.
| Path | Page | What it does |
|---|---|---|
/ | HomePage | Hero, ways-in cards, the "fights" with store CTAs, intro video (a resource), testimonies carousel |
/about | AboutPage | Ministry and staff roster (lib/content/staff.ts) with giving links |
/pure-warrior, /pure-warrior/about | PureWarriorPage, PureWarriorAboutPage | Book 4 programme pages |
/books | BooksPage | Book series grid |
/resources, /resources/:slug | ResourcesPage, ResourceDetailPage | Resource library from the backend; audio, video, document or external link |
/getting-started-right | GettingStartedRightPage | Hand-picked training videos by resource slug |
/conferences, /conferences/:slug | ConferencesPage, ConferenceDetailPage | Upcoming events from the backend, past recaps from Sanity; registration + payment |
/store, /store/:slug, /cart, /checkout, /checkout/success, /checkout/cancel | StorePage, ProductDetailPage, CartPage, CheckoutPage, CheckoutSuccessPage, CheckoutCancelPage | The store |
/donate | DonatePage | ?to=staff (roster) or ?to=fund (in-house form, &for=<slug> prefills) |
/account, /account/sign-in, /account/sign-up, /account/forgot-password | account/* | Accounts |
/app | account/OpenAppPage | Hand-off into the web app |
/news, /news/:slug | NewsPage, NewsDetailPage | Sanity news |
/contact | ContactPage | Contact form → rest/contact/; copy from Sanity |
/terms, /privacy | legal/* | English only |
* | NotFoundPage | 404 |
Store
Client src/lib/store.ts; components src/components/store/*; runbook docs/store-sandbox.md.
- Catalogue price and stock come from
GET rest/store/products/; localised titles and copy live in thestorei18n namespace underproducts.<slug>, covers insrc/lib/content/storeProducts.ts. Backend slugs must match. POST rest/store/checkout/returns a Checkout Sessionclient_secretand an order token;/checkoutmounts Stripe Elements. Each completed address callsrunServerUpdate→POST …/<token>/shipping-options/; the backend quotes shipping.- Success lands on
/checkout/success?token=…&type=store, which clears the cart and pollsGET rest/store/orders/<token>/while the webhook catches up.
Events
Client src/lib/events.ts; components src/components/events/*; runbook docs/events-sandbox.md.
- Anything published in the backend appears on
/conferenceswith no CMS step. POST rest/events/<slug>/register/creates apendingregistration that holds seats and returns aclient_secret(null for free events).ConferenceDetailPageswapsEventRegistrationFormforEventCheckout(billingAddressFields+ cardPaymentElement, no shipping). The step is kept insessionStorage.- The card's billing address becomes the registration's address of record; once paid, the backend matches or creates the buyer only in the CRM.
/checkout/success?type=eventsrendersEventConfirmation.
Donations
Client src/lib/donations.ts; components src/components/donations/*; runbooks docs/donations-sandbox.md and docs/donations-go-live.md.
- Staff-member gifts hand off to TWR / Navigators (
donateUrlinlib/content/staff.ts); staff without one open the in-house form prefilled. GET rest/donations/funds/supplies funds and fee parameters for the "cover the fee" preview.POST rest/donations/checkout/creates apendingdonation in payment mode (one-time) or subscription mode (monthly, quarterly, annually).- ACH appears as a "US bank account" tab from the backend's payment method configuration with no frontend change.
/checkout/success?type=donationsrendersDonationConfirmation; for recurring gifts it opens the Stripe billing portal viaPOST rest/donations/<token>/portal/.- The navbar Donate CTA is always the internal
/donate.
Accounts and hand-off
Client src/lib/auth.ts; context src/lib/account/*; pages src/pages/account/*; components src/components/account/*; runbook docs/accounts-sandbox.md; backend contract docs/WEBSITE_ACCOUNTS.md.
- Sign up with an emailed 6-digit code or Google; sign in with password or Google; forgot-password by emailed code (also how a Google-only account gets a password).
/accountshows orders, registrations and donations (rest/account/*, matched by email hash, paged withusePagedList) plus settings (change password, link Google)./apprequests a hand-off code and redirects toVITE_EMAW_APP_URL/auth/handoff#code=…. Signed out, it redirects to sign-in with?next=app(orapp:/path), whichuseAfterSignIn()routes back through/app. Keep?next=on cross-links between auth pages. Everything hides whenVITE_EMAW_APP_URLis unset.
Resources
Client src/lib/resources.ts. GET rest/resources/ (optional ?slugs= for the Getting Started Right list) and GET rest/resources/<slug>/. Staff publish resources from the Admin CRM; media comes from R2 (Cloudflare R2). body is plain text with blank-line paragraphs rendered by bodyParagraphs.