Website overview
emaw-website is the public Every Man A Warrior website: marketing pages, the book store, conference registration, giving, the resource library and optional user accounts. It replaces the legacy everymanawarrior.com site at launch.
| Package name | emapw-website (sic) |
| Stack | React 19, Vite 8, TypeScript 6, react-router-dom 7, Tailwind 4, react-i18next, Stripe (@stripe/react-stripe-js checkout), Sanity client |
| Hosting | Cloudflare Pages project emaw-website |
| Dev URL | https://develop-website.everymanawarrior.cc (Cloudflare Access) |
| Backend | VITE_EMAW_API_BASE_URL → https://dev.emaw-app.com / https://app.emaw-app.com |
| Own docs | CLAUDE.md (architecture and conventions), docs/ (sandbox runbooks, R2, go-live) |
| Tests | none configured; ESLint + Prettier |
Layout
src/
routes/index.tsx the pageRoutes array, mounted under / and /es
pages/ one file per route (+ account/, legal/)
components/
layout/ Navbar, Footer, Layout, LanguageSwitcher, LocaleProvider
store/ events/ donations/ account/ checkout/ marketing/ forms/
lib/
i18n/ i18next setup, URL-path detector, LocalizedLink, locales/{en,es}/<ns>.json
sanity/ client, queries, env
content/ static JSON content that used to be in Sanity (staff, books, store products)
store.ts events.ts donations.ts resources.ts auth.ts contact.ts app.ts backend API clients
cart/ CartProvider (localStorage)
account/ AuthProvider, useAuth, useAfterSignIn, google.ts
stripe.ts address.ts media/r2.ts
hooks/ useSanityQuery, useDraftMode, useAsync
types/ content.ts (hand-written), sanity.types.ts (generated in the Studio repo)
constants/ docs/ public/ repo-root, not inside src/
Path alias @/* → src/*.
What it does, in one table
| Area | Pages | Backend | Notes |
|---|---|---|---|
| Marketing | Home, About, Pure Warrior, Books, Getting Started Right, News, Contact | rest/contact/, rest/resources/ | Most copy is static JSON + i18n; News and Contact copy from Sanity |
| Store | Store, Product, Cart, Checkout, Success/Cancel | rest/store/* | Stripe Elements, server-side shipping |
| Events | Conferences, Conference detail | rest/events/* | Registration then Stripe payment; past recaps from Sanity |
| Giving | Donate | rest/donations/* | Staff gifts hand off to TWR; fund gifts in-house via Stripe |
| Resources | Resources, Resource detail, Getting Started Right videos | rest/resources/* | Media from R2 via backend URLs |
| Accounts | Sign in / up, forgot password, Account (history), Open app | rest/api/token/*, rest/auth/*, rest/account/* | Shared with the mobile and web apps; hand-off to the web app |
| Legal | Terms, Privacy | English only |
Routes and pages in detail: Features. Routing, i18n and Sanity: Architecture.
Deployment at a glance
Push to develop → GitHub Action → wrangler pages deploy → develop-website.everymanawarrior.cc. Production is a manual deploy today. See Deployment.