# Church App 1.0.0 — House of Prayer and the church in your pocket Phase **6** of [ROADMAP-v3.md](./ROADMAP-v3.md) (§7, §9, §10, §11; decisions 4, 5, 8, 12, 13, 14, 16, 20). Written 2026-11-30. **Decisions confirmed by Joshua on 2026-11-30** (see [Decisions](#decisions); he changed devotionals, sign-in length, 2FA, roles and the shared email and WhatsApp). **Mockup:** [Church App 1.0 mockup](https://claude.ai/artifact/4MUbYPv6WuP8kfY5gRUnnd) (a Design canvas on claude.ai; private to Joshua unless shared from its Share menu). Seven phone screens and the admin, in the demo church's colours and the Warm font pairing; Play moves between them: | Screen | Shows | |---|---| | Home | Greeting, the campaign, your next slot, today's prayer clock with the next gap, today's devotional, a pinned announcement | | House of Prayer | The 24-hour clock (§3): tap an hour for its details, Cover it / Join, the open hours as buttons | | Book a slot | Just once / every week / every day, length, reminder and channel, the 8-hour rule | | Me: my prayer | Renew for another year, a slot locked within 8 hours, Skip / Change / Stop, "I prayed" | | Ask for prayer | Prayer team only (default) or members after approval, emergency numbers | | Devotional | The verse's text and translation, Read in YouVersion, sent by WhatsApp at 06:00 | | Events | An event from Cross Events with Register on the Events site, the App's own simple events | | Admin dashboard | The Website admin's layout: stat cards, the week's prayer wall, the approval queue, recent activity | **What the App is:** a church-branded **web app** (PWA) at `app.`, added to the home screen, with no app-store release. Anyone can browse its public content; personal actions (booking a prayer slot, a prayer request, notification settings) need sign-in through the church's Accounts. Its headline is the **House of Prayer**: a 24/7 prayer wall the church fills together. 1.0 also has **announcements**, **devotionals** and **events** (simple events plus the feed). Its look comes from the church profile (colours, logo, fonts, corners) and it shares the footer and links with the Website and Cross Events, so the three feel like one church. **Where things stand:** every earlier phase is released and rolled out, including the Church Website at Hope Family Church and a second church (confirmed by Joshua 2026-11-30). **Who uses 1.0:** the demo church (cross-demo2, Acacia Hill) first, then Hope Family Church. Then it goes on sale (crosscode-site, ROADMAP §9). **Done when:** - `app@1.0.0`, `contracts@1.20.0`, `accounts@1.9.0`, `events@3.8.0` and Hub `v2.26.0` are tagged; the Hub installs the App from New install (after Accounts) and lists its releases. - The Hub holds 3 months of Cross Code devotionals (written or imported from CSV), and an App set to "From Cross Code" shows and sends them. - A member can add the App to their home screen (Android and iPhone), sign in once, book a one-off or recurring prayer slot, get its reminder by email or WhatsApp, and change or cancel it within the rules. - The coverage view updates live when someone else books, and never shows a name to anyone but the prayer team. - A prayer request stays private unless its submitter chose otherwise, and nothing shared reaches members before a coordinator approves it. - Public pages pass the §11 SEO checks; every prayer page is `noindex`; axe has no violations; Lighthouse (mobile): SEO 100, accessibility 95+, performance 90+. - The App reports its active-member band to the Hub, and the Hub bills the App tier from it. - crosscode-site sells it (ROADMAP §9, "Updating crosscode-site"). ## Contents 1. [The shape](#1-the-shape) 2. [Foundation: PWA, branding, sign-in](#2-foundation-pwa-branding-sign-in) 3. [House of Prayer](#3-house-of-prayer) 4. [Prayer requests](#4-prayer-requests) 5. [Announcements](#5-announcements) 6. [Devotionals](#6-devotionals) 7. [Events](#7-events) 8. [Notifications: email and WhatsApp](#8-notifications-email-and-whatsapp) 9. [Content: shared, Website-owned and App-only](#9-content-shared-website-owned-and-app-only) 10. [Admin, roles and active members](#10-admin-roles-and-active-members) 11. [Privacy and POPIA](#11-privacy-and-popia) 12. [Hub, licence and servers](#12-hub-licence-and-servers) 13. [What changes in each repo](#13-what-changes-in-each-repo) 14. [Testing](#14-testing) 15. [Releasing and rolling it out](#15-releasing-and-rolling-it-out) 16. [Decisions](#decisions) 17. [Not in 1.0](#not-in-10) 18. [Still open](#still-open) ## 1. The shape `apps/app`, the same stack as the Website (roadmap decision 8): an **Express + Prisma + pg-boss backend** (TypeScript) and a **Next.js frontend**, one PostgreSQL database, on one address with `/api` to the backend (`location ^~ /api/` in FastPanel, HANDOVER "FastPanel sites"). ``` visitor ─► app.acaciahill.co.za ─► Next.js: public content (announcements, devotionals, events, coverage only), server-rendered, cached member ──► sign in through Accounts (@crosscode/auth-client) ─► book slots, requests, settings phone ───► manifest.webmanifest + service worker: home-screen icon, offline shell, last content backend: public API (/api/v1/…), member API (/api/v1/me/…), admin API (/api/v1/admin/…), live coverage (/api/v1/prayer/stream, server-sent events), event feed (/api/links/v1/*), Hub client (protocol v2, product "app"), jobs (reminders, renewals, feed sync, active members, announcement and devotional sends) Accounts ── crosscode.church/1 (name, short name, icon, colours, style, timezone, links) Events / Website ── crosscode.event/1 (the event feed, both directions) ``` - **Mobile first.** Every member screen is designed at phone width first, with a bottom tab bar (Home, Prayer, Events, Devotional, Me) and the church's colours. On a desktop the same screens sit in a centred column. The admin (`/admin`) is designed for a laptop and works on a phone. - **Shared packages:** `@crosscode/ui` (brand style, fonts, `ChurchFooter`, product links), `@crosscode/seo`, `@crosscode/auth-client`, `@crosscode/contracts`. Ports `app` (web) and `app-api` in the frp port list, as the Website's. - **Timezone:** everything about prayer slots is in the **church's timezone** (`timezone` in the profile). Times are stored in UTC; slot boundaries are computed in the church's zone, so a church outside South Africa with daylight saving still gets whole hours. ## 2. Foundation: PWA, branding, sign-in - **Installable** (P1): a `manifest.webmanifest` built from the profile: `name`, `short_name` (the profile's `shortName`, else the name cut to 12 characters), icons from `branding.iconUrl` (resized to 192 and 512, with a maskable version on the primary colour), `theme_color` = primary, `display: standalone`, `start_url: /?source=homescreen`. A church without an icon gets one made from its initials on its primary colour (the share-image generator from `packages/seo`). - **Add to home screen:** a dismissible card on Home for visitors who haven't installed it. Android and desktop Chrome use the browser's install prompt; on an iPhone the card shows the Share → "Add to Home Screen" steps (iOS has no prompt). Dismissing it hides it for 30 days. - **Offline** (P2): the service worker caches the app shell, the church's details, today's and the last 7 days' devotionals, the latest announcements, upcoming events and the member's own commitments. Offline, those show with "You're offline: showing what was saved"; booking, cancelling and requests need a connection and say so. Nothing personal is cached for someone who is signed out. **No push notifications** (decision 13), so the service worker never asks for notification permission. - **Branding:** colours, logo, font pairing and corners from the profile, through `@crosscode/ui`'s `brandAttributes` and the palette builder (contrast checked, as the Website). Header: the logo (or icon and short name) and the account menu. Footer on public pages: `ChurchFooter`, with links to the church's Website and Events. - **Sign-in through Accounts**, returning to the exact screen (ROADMAP §3): "Book this slot" when signed out goes to Accounts and comes back to the same slot with the sheet open. - **Staying signed in** (decision 7): a sign-in lasts **8 days**. Opening the App within those 8 days renews it for another 8, up to **90 days** from the sign-in; after that, or after 8 days away, the member signs in again. (A rolling refresh token with an absolute limit; signing out anywhere, or a password change in Accounts, ends it.) - **2FA for every role above Member** (decision 7): Owner, Church admin, Content admin, Devotional writer, Prayer coordinator and Pastoral care must have 2FA (`acr_values=mfa`) to open the admin or anything their role adds. Someone given such a role without 2FA is asked to set it up in Accounts first. Members don't need it. - **Modules** (each can be switched off, ROADMAP §7): House of Prayer, Prayer requests, Announcements, Devotionals, Events. Home and the tab bar only show what's on. The list goes in the heartbeat (`modules`, already in `appStatsSchema`). ## 3. House of Prayer ### The prayer wall One **prayer wall** for the whole church, prayed from anywhere (P4). The day is cut into slots of the church's slot length (**60 minutes** by default; 15 or 30 can be chosen, decision 12). - **Coverage view: a 24-hour clock** (decision 2). One dial for the chosen day (today first, swipe or pick a date), midnight at the top and noon at the bottom, the night half drawn darker. Each slot is a segment of the ring, shaded by how many people have committed; open slots are drawn as dashed outlines; the member's own slots carry a gold edge; a hand points at the time now. The middle shows the time and "21 of 24 hours covered". Tapping a segment shows that slot under the dial (time, how many, **Cover it** or **Join**). The open slots are also listed below as buttons, so the view works with a keyboard and a screen reader. With 15- or 30-minute slots the ring has 96 or 48 segments. - **Live:** the view subscribes to `/api/v1/prayer/stream` (server-sent events) and updates when anyone books or cancels. If the stream drops, it polls every 30 seconds. The backend sends `X-Accel-Buffering: no` and a comment every 25 seconds, so FastPanel's nginx and frp pass it on without buffering or timing out, with **no change to the FastPanel config**. - **People per slot** (P5): there's no limit on how many people commit to a slot. The church sets a **target** (1 by default); a slot counts as covered when it has at least one person, and the view shows "2 of 3" against the target where the target is more than 1. - **Names:** the public view and members see **counts only, never names** (ROADMAP §7). A member sees "You" on their own slots. Prayer coordinators see names in the admin, and every view of them goes in the access log. ### Commitments | | Default (decision 12) | The church can | |---|---|---| | Slot length | 1 hour | choose 15, 30 or 60 minutes | | Book ahead | up to 12 months | shorten it | | Recurring | daily or weekly, up to 12 months from the day of booking | shorten the maximum | | Cancelling | up to 8 hours before the slot | change the hours (0–48) | - **Booking:** tap a slot → a sheet: **Just this once**, **Every week** (on that weekday) or **Every day**, an end date (12 months at most, the default), several slots in a row (e.g. 02:00 for 2 hours), a reminder (below) and an optional "where I'll pray" note for themselves. - **Changing:** one occurrence ("Skip 14 December") or the whole commitment (time, days, end date). The cancel rule applies to every occurrence inside the window: within 8 hours it can't be skipped or cancelled in the App, and the member sees who to contact (the prayer coordinator's name and how to reach them, from Settings → House of Prayer). - **Renewing:** 14 days before a recurring commitment ends, the member gets an email or WhatsApp (their choice of channel) with **Renew for another year**, one tap with no sign-in needed (a signed, single-use link that expires with the commitment). A second reminder 3 days before. - **Reminders** (P6): per commitment, *none*, *15 minutes before*, *1 hour before* (the default) or *the evening before at 20:00*, sent on the member's chosen channel for prayer reminders. Night-time slots are exactly where reminders matter, so they're sent at night too. - **"I prayed":** after a slot ends, the member can mark it in the App or from a link in the reminder. It's **self-reported**, labelled that way everywhere ("12 hours marked as prayed, self-reported"), shown to the member, and counted (as a number only) for the prayer team and campaigns. Never a ranking. - **Stored as rules, not rows:** a commitment is a rule (start, length, recurrence, end) plus its skips; the occurrences in any window are worked out from the rules, so a year of daily slots isn't 365 rows, and the coverage view is computed per day and cached until a booking changes it. ### Campaigns and testimonies - **Campaigns** (P7): a time-bound focus, e.g. "21 days of prayer" from 5 to 25 January, with a title, description, image, optional target ("Every hour covered") and its own slot target. During it, Home and the Prayer tab lead with the campaign: days left, collective coverage, hours marked as prayed (self-reported). **No rankings, no individual totals** (ROADMAP §7). - **Testimonies:** members can share what God has done ("answered prayer"), optionally linked to a campaign. Every testimony is **moderated before anyone sees it**, shows the first name or "Anonymous" (the member's choice), and can be removed by its author at any time. ## 4. Prayer requests - **Who sees it** (P8), chosen by the submitter, **private by default**: | Choice | Who sees it | |---|---| | **The prayer team only** (default) | Prayer coordinators (and Pastoral care, for escalations) | | **Members of the church** | Signed-in members of the App, after a coordinator approves it | Nothing is ever public to signed-out visitors, and no prayer page is indexable (ROADMAP §11). Groups come in 1.x with connect groups. - **Name or anonymous:** for "Members of the church", the submitter chooses whether their first name shows. The prayer team always sees who sent it (so they can follow up), unless the church turns on fully anonymous requests (P9, off by default). - **Moderation:** shared requests wait in a queue. A coordinator can **approve**, **redact** (edit out names or details, the submitter told what changed), or **remove** (with a reason sent to the submitter). Every action is in the audit log. - **Safeguarding:** any coordinator can **escalate** a request (danger, abuse, self-harm). It goes at once, by email and WhatsApp, to the church's safeguarding contacts (people with the Pastoral care role, Settings → Safeguarding), leaves the shared list, and shows the submitter nothing different. The App shows emergency numbers (set by the church; South African defaults: Lifeline 0861 322 322, SADAG 0800 567 567, Childline 116) on the request form. - **Praying for it:** members tap **I prayed** on shared requests; the submitter sees the count ("14 people prayed"), not who. - **Updates and closing:** the submitter can add an update ("Answered!") or close it. Requests close themselves after **30 days** (the church can choose 7–90) and are deleted 12 months after closing (P10). - **Never used for analytics or AI** (ROADMAP §7): no AI buttons near prayer, no request text in stats or the heartbeat, no request text in emails beyond "You have a new prayer request" with a link. ## 5. Announcements - Title, text (sanitised markdown), image, optional button (a link), campus (or all), **who sees it** (everyone, or signed-in members only), **pin** to the top, a publish time (now or later) and an end date. - **Also send it** (optional, per announcement): by email and/or WhatsApp to members who chose to receive announcements, at the publish time. Sends are queued and rate-limited as Events' scheduled emails. - Public announcements are server-rendered pages with the §11 baseline; members-only ones are `noindex` and not in the sitemap. ## 6. Devotionals Decision 1: **two sources**, chosen in Settings → Devotionals: 1. **From Cross Code.** Devotionals written by Cross Code in the Hub, the same for every church that chooses them. 2. **Our own.** The church's Devotional writers write them in the App's admin. - **A devotional:** date, title, **Bible passage** (reference, translation and the passage's text), the devotional's text, an optional prayer and an author. The day's devotional shows on Home at midnight in the church's timezone. A day without one shows the most recent. - **The verse is shown and linked** (decision 5): the passage's text is shown in full above the devotional, with its translation and copyright line, and **Read in YouVersion** opens it at `bible.com` (the passage in that translation; YouVersion's app opens instead where it's installed). The YouVersion link is built from the reference and the translation's YouVersion id. - **Translations** (decision 10): each devotional, from Cross Code or the church's own, picks one of seven: | Id | Translation | Language | |---|---|---| | `NLT` | New Living Translation | English | | `ESV` | English Standard Version | English | | `NIV` | New International Version | English | | `NKJV` | New King James Version | English | | `KJV` | King James Version | English | | `AFR53` | Afrikaans 1933/1953-vertaling | Afrikaans | | `AFR83` | Afrikaans 1983-vertaling | Afrikaans | The list lives in the contracts with each one's YouVersion id and copyright line, so the Hub, the App and the CSV import agree; an id never changes once released, and more can be added. The Afrikaans pair is the proposal (the 2020-vertaling or the Nuwe Lewende Vertaling could replace one). - **Licensing:** every one but the KJV is under copyright (the Afrikaans ones with the Bible Society of South Africa). Each publisher lets its text be quoted within limits (a number of verses, never a whole book, with its notice), so a devotional quotes **the passage it's about, not whole chapters**, and the App always shows that translation's copyright line under the verse. The Hub and the App warn when a passage is longer than 25 verses. Before Cross Code's devotionals go out to churches, check each publisher's terms for use in an app (or ask for permission); the church is responsible for its own. - **The Hub** (Hub 2.26.0, decision 1): a **Devotionals** page to write and schedule Cross Code's devotionals **up to 3 months ahead**, with a calendar showing which days are filled, and an **Import CSV** button: upload, a preview with every row checked (date, required fields, a reference YouVersion understands, a date already taken), then import the valid rows, replacing or skipping days already filled. Columns: `date, title, passage, translation, passage_text, body, prayer, author`. A template CSV can be downloaded from the page. - **Getting them to the App:** an App on "From Cross Code" fetches the next 3 months from the Hub (`GET /api/v2/devotionals`, with its licence token) once a night and keeps them, so a Hub outage changes nothing (ROADMAP §1, rule 2). Edits in the Hub reach the App by the next night, or at once with **Sync now** in the App's settings. The format is `crosscode.devotional/1` (contracts 1.20.0), so a church's own and Cross Code's devotionals look the same. - **Our own:** the same fields and the same CSV import in the App's admin, scheduled as far ahead as the church likes. - **Sent out** (decision 5): by **email and WhatsApp**, at the time the member chooses (06:00 by default): the title, the verse (reference and text) and a link to the full devotional in the App. Members turn it on and pick the channel; the App offers it the first time they sign in. - Public by default, with `Article` JSON-LD; a devotional can be members-only. - An **archive** (by month) and "Today" always first. ## 7. Events As the Website (WEBSITE-1.0-PLAN §8): **simple events** made in the App (title, date and time, place, description, image, optional link; roadmap decision 4), and **the event feed** (Settings → Linked products: "Publish my events", "Show events from"). Events from Cross Events show with **Register on the Events site**, which opens Cross Events; registering and paying stays there. Imported events carry `` to their origin and aren't in the App's sitemap. ## 8. Notifications: email and WhatsApp Email and WhatsApp only (decision 13). Each member chooses, per kind, **email, WhatsApp, both or off**: | Kind | Default | |---|---| | Prayer slot reminders | the channel chosen when booking (WhatsApp if they have a verified number, else email) | | Renewing a recurring commitment | the same as reminders, and can't be turned off while they have one | | Prayer request updates (approved, someone prayed, a reply) | email | | Announcements the church sends | off until the member turns them on | | Today's devotional | offered at first sign-in; email, WhatsApp or both (§6) | - **Sending** (decision 4): **one set of email and WhatsApp credentials for the whole church**, as Events and Accounts share them today (Events 3.1.0: Settings → Sign-in copies Events' SMTP and WAWP into Accounts through the signed link, `messaging.*` in `crosscode.identity-request/1`). The App never asks for its own: at Connect it takes the church's settings from Accounts over the same signed link (a new `messaging.get`, contracts 1.20.0, the password and token encrypted with the link's secret), and fetches them again when Accounts says they changed. Settings → Email and WhatsApp shows which address and number it sends from, with **Send a test**; changing them is done where they're kept (Events or Accounts). A church without Events sets them once in Accounts. - **STOP replies** (decision 11): a WAWP number sends replies to one webhook address, today Events'. **Accounts keeps the WhatsApp opt-out for every product**, as it already holds the consent: whichever site receives a STOP tells Accounts (a signed `whatsapp.optout` over the link), Accounts sends `user.updated` to every linked product, and none of them sends that person WhatsApp again until they turn it back on. A church without Events points the webhook at Accounts. - **Phone numbers and consent** come from Accounts (the verified number and the news consent); reminders and renewals are things the member asked for, so they don't need the news consent. - Every send is counted for the heartbeat (`messages.email30d`, `whatsapp30d`). ## 9. Content: shared, Website-owned and App-only The Website plan left one question for this plan (WEBSITE-1.0-PLAN, "Still open"): whether leaders, ministries and giving move into `crosscode.church/1`. **Decision 6: nothing moves in App 1.0; only the basic church details are shared.** None of 1.0's modules needs them. When the App gets sermons and giving links (1.x), it **reads them from the Website** through a feed, as events work today (the origin owns a record; ROADMAP §1 rule 4), and a church without a Website enters them in the App. The profile stays the place for facts every product shows (name, logo, colours, service times, contact). | Shared: `crosscode.church/1` (Accounts) | App-only | |---|---| | Name, short name, icon, colours, style, timezone, contact, service times, links (the App's address arrives through Connect, as the Website's) | Prayer wall settings, commitments, campaigns, testimonies, prayer requests, announcements, devotionals, simple events, notification preferences, roles | The App's admin links to Accounts → Church profile for shared facts (no editing them from the App in 1.0). ## 10. Admin, roles and active members **Admin** (`/admin`): a dashboard with a setup checklist (check the church's details and icon, set the prayer wall rules, add prayer coordinators, a first announcement, **share the App**: its link and a printable poster with a QR code), this week's coverage and the gaps, requests waiting; House of Prayer (rules, coverage by day and week, bookings with names, campaigns, testimonies); Prayer requests (queue, escalations); Announcements; Devotionals; Events; Members; Settings (modules, email and WhatsApp, safeguarding contacts and emergency numbers, linked products, background jobs); Audit log; Access log. **Roles** (held in the App; ROADMAP §7, decision 7). A person can have several. Every role but Member needs 2FA (§2): | Role | Can | |---|---| | Owner | Everything, including roles and the licence | | Church admin | Everything but the licence and Owners | | Content admin | Announcements and events | | Devotional writer | Devotionals: write, schedule, import CSV, the source setting (§6) | | Prayer coordinator | The prayer wall (rules, bookings with names, booking on behalf of a member), campaigns, testimonies, prayer request moderation and escalation | | Pastoral care | Escalated prayer requests and the safeguarding contacts (pastoral care itself in 1.x); sees requests sent to the prayer team | | Member | Everyone signed in: book, request, testify, settings. No 2FA needed | **The first Owner** as the Website (its decision 17): whoever signs in with the church's admin email from the Hub (`HUB_ADMIN_EMAIL`), verified in Accounts, while the App has no Owner. **Active members** (ROADMAP §10, billing): an account that **used the App signed in** on any day in the last 90 days. The App records the date (at most one write per member per day) and reports the **band** in the heartbeat (`activeMembers90d`, already in contracts). Admins see the number and the band in Settings → Licence. Visitors browsing signed out never count. ## 11. Privacy and POPIA - **Prayer requests are special personal information** (religious beliefs, often health: POPIA s26). The church may process them as a religious body for its members (s28), with the submitter's choice: the request form says who will see it, and the privacy notice (Accounts') gets an App paragraph. Coordinators' access is in the access log. - **Download my data** (`user.export`): the App's part has the member's commitments, "I prayed" marks, prayer requests and updates, testimonies and notification settings. - **Delete my account** (`user.deleted`): future commitments are removed (the slots open up), past ones stay only as counts in coverage history, requests and testimonies are deleted, and the member's roles go. - **Church export** (uninstall, `crosscode.church-export/1`): an `app` section with the content, commitments, campaigns and (encrypted with the rest, decision 31) prayer requests, plus uploads. - No analytics or third-party scripts; fonts self-hosted; YouTube or Spotify embeds (none in 1.0) would load only on click. ## 12. Hub, licence and servers - **Hub protocol v2, product `app`.** `appStatsSchema` is already in the contracts (active-member band, modules, coverage of the last 7 days, active commitments, announcements, messages). An App licence needs the church's Accounts, installed first. - **Hub 2.26.0:** New install offers the App; release sync for `app@` tags and `apps/app/WHATS-NEW.md`; its env template; the App's tiers already in `tiers.ts` (Mustard Seed to Network) used for billing, with the band from the heartbeat shown on the install and a **renewal check** (the tier is checked once a year at renewal, ROADMAP §10) that flags an install whose band is above its tier; the FastPanel email for `app.`; the App in Jobs' product filter (already) and demo data; and **Devotionals** (§6): write and schedule up to 3 months ahead, the calendar, Import CSV with its preview, and `GET /api/v2/devotionals` for App installs (licence token, App licences only). - **Contracts 1.20.0:** `app` in `DEMO_PRODUCTS`; the `app` section of the church export; the App's modules list (`APP_MODULES`); `crosscode.devotional/1` and the devotionals reply; the CSV columns and row checks (shared by the Hub and the App); `messaging.get` for the App (§8); the translation list with YouVersion ids and copyright lines. Nothing breaking. - **Accounts 1.9.0:** answers `messaging.get` for a linked product, and tells linked products when the messaging settings change; keeps the **WhatsApp opt-out** for every product (`whatsapp.optout` in, `user.updated` out) and can take the WAWP webhook itself (§8). - **Events 3.8.0:** a STOP received by Events is passed to Accounts, and Events reads the opt-out from Accounts' `user.updated` (§8). - **`crosscode`:** `scripts/products/app.sh` with the same hooks as the Website (`app` is already in `PRODUCT_ORDER`), `app.env.template.json` (the env template in three places, HANDOVER "A new .env variable"), `crosscode add app`. - **Agent:** none expected (the job schemas already take `app`). Check `demo` passes `app` on. - **Accounts, otherwise:** Connect already accepts the App as a client (`CLIENT_PRODUCTS`) and the profile already has `links.app`. The Website's and Events' headers and `ChurchFooter` show "App" as soon as the link is there. - **Demo church:** `npm run demo` loads Acacia Hill (fictional people only): a prayer wall with three months of commitments and a few gaps, a campaign, testimonies, devotionals, announcements and events, for screenshots and the Hub's demo sites. ## 13. What changes in each repo | Repo | Change | Version | |------|--------|---------| | `crosscode-platform` `apps/app` | New (§1–§12), with `CHANGELOG.md`, `WHATS-NEW.md`, `env.template.json`, e2e, demo data | `app@1.0.0` | | `crosscode-platform` `packages/contracts` | `app` in `DEMO_PRODUCTS`, `APP_MODULES`, the `app` part of the church export, `crosscode.devotional/1` and its CSV rules, the translations, `messaging.get` | `contracts@1.20.0` | | `crosscode-platform` `apps/accounts` | `messaging.get` for linked products, a hint when the messaging settings change, the WhatsApp opt-out for every product | `accounts@1.9.0` | | `crosscode-platform` `apps/events` | STOP replies passed to Accounts; the opt-out read from Accounts | `events@3.8.0` | | `crosscode-platform` `packages/ui` | The tab bar and bottom sheet, if worth sharing; otherwise nothing | workspace | | `crosscode-platform` `packages/seo` | `Article` builder for devotionals and announcements; the icon generator for the manifest | workspace | | `crosscode-platform` `scripts/` | `products/app.sh`, `app.env.template.json`, bats tests | — | | `events-hub` | App in New install, its releases, env template, billing on the band, renewal check, FastPanel email, Devotionals (write, schedule 3 months ahead, Import CSV, the endpoint for Apps) | Hub `v2.26.0` | | `crosscode-site` | Church App on sale (ROADMAP §9): its page, the active-member tiers, House of Prayer screenshots, the bundle examples (§10), FAQ, `SoftwareApplication` JSON-LD | `v1.10.0` | ## 14. Testing - **Unit (Jest):** slot boundaries in the church's timezone (including a zone with daylight saving), recurrence and the 12-month limits, skips, the cancel window, coverage and gaps, the target per slot, renewals (14 and 3 days before, the single-use link), reminders' times, "I prayed" only after the slot, **no name in any public or member response** (a test over every public route), request visibility and moderation, escalation, roles and 2FA for every role above Member, the 8-day sign-in renewed up to 90 days, active-member counting and the band, the export and delete hooks, the devotional CSV checks (a bad date, a missing field, a reference YouVersion can't open, a day already filled), the YouVersion links, the nightly Cross Code fetch (and the last copy kept when the Hub is down), `messaging.get`. - **Hub:** the Devotionals page, Import CSV with its preview, the 3-month limit, and the endpoint refusing anything but an App licence. - **Playwright** (phone, tablet and desktop): browse signed out; sign in from a slot and land back on it with the sheet open (through 2FA); book once, weekly and daily; skip, change and cancel; the 8-hour rule; two browsers, one books, the other's view updates live (and with the stream blocked, by polling); a shared request waits for approval; escalation; announcement and devotional publishing; offline Home; the manifest and service worker (installable); axe on every screen; the §11 checks on public pages and `noindex` on prayer pages. - **Lighthouse (mobile):** Home, an event and a devotional: SEO 100, accessibility 95+, performance 90+. - **The release checks** (ROADMAP §9) for the App, and a throwaway install from the Hub (New install → App, update it, uninstall it with its export) before Hope Family Church: the Website's VM test was skipped, and this is the one that catches FastPanel, DNS and SSE through frp. ## 15. Releasing and rolling it out 1. `contracts@1.20.0`, then `accounts@1.9.0` (`messaging.get`, the WhatsApp opt-out) and `events@3.8.0` (STOP passed to Accounts), rolled out to every church. 2. Hub `v2.26.0` (vendored contracts 1.20.0) deployed, and the first 3 months of Cross Code devotionals written or imported. 3. `app@1.0.0` tagged after the e2e and Lighthouse runs. 4. **cross-demo2** (Acacia Hill): New install → App, demo data loaded, the throwaway test above. 5. **Hope Family Church:** New install → App; the prayer coordinators set the wall up before it's announced to the church. 6. crosscode-site `v1.10.0`: the App on sale (prices already in the Hub). ## Decisions Made by Joshua on 2026-11-30, after the first draft and the mockup: 1. **Devotionals have two sources:** from Cross Code (written in the Hub, scheduled up to 3 months ahead, with a CSV import) or the church's own (§6). Verses open in **YouVersion**. 2. **The House of Prayer is a 24-hour clock**, not a grid (§3; mockup redrawn). 3. **Ask for prayer as drawn**, and **every shared request is approved first** (§4). 4. **One set of email and WhatsApp credentials per church,** shared by Events, Accounts and the App (§8). Replaces P14. 5. **The devotional shows the verse's text and links to YouVersion,** and is **sent by email and WhatsApp**: the title, the verse and a link to the full devotional in the App (§6). Replaces P11 and P12. 6. **Only the basic church details are shared in 1.0** (P15, §9). 7. **A sign-in lasts 8 days, renewed by each visit, up to 90 days** (§2), and **every role above Member needs 2FA**, with a Devotional writer role next to the Prayer coordinator (§10). Replaces P3 and P17. 8. **Campaigns and testimonies are in 1.0** (P7), **no cap per slot** (P5), **prayer team or members** is enough for requests (P8), **the tab bar as drawn** (P18), **a physical prayer room later** (P4). 9. **The admin looks like the Website's and Events' admins** (white side menu, grey page, the same panels and stat cards), not a new style (§10; mockup redrawn). 10. **Each devotional uses one of NLT, ESV, NIV, NKJV, KJV or two Afrikaans translations** (proposed: 1933/1953 and 1983), quoting only the passage, with its copyright line (§6). 11. **Accounts keeps the WhatsApp opt-out for every product,** so a STOP to the shared number reaches the App, Events and Accounts alike (§8). Adds Events 3.8.0. 12. **Home shows today's prayer clock** in small, as the House of Prayer does (mockup redrawn). The other proposals as first written, confirmed: 1. **P1 Installable PWA** from the profile, with a generated icon when the church has none (§2). 2. **P2 Offline:** the shell and recent content cached; actions need a connection (§2). 3. ~~P3~~ (decision 7). 4. **P4 One prayer wall per church,** prayed from anywhere; a physical prayer room with places is 1.x (§3). 5. **P5 No limit per slot,** a target (1 by default) for "covered" (§3). 6. **P6 Reminders** none / 15 min / 1 hour (default) / the evening before (§3). 7. **P7 Campaigns and testimonies in 1.0** (§3). They could move to 1.1 to ship sooner. 8. **P8 Prayer requests: prayer team only (default) or members,** never public (§4). 9. **P9 Fully anonymous requests** off by default (§4). 10. **P10 Requests close after 30 days** and are deleted 12 months after closing (§4). 11. ~~P11~~, 12. ~~P12~~ (decisions 1 and 5). 13. **P13 Announcements by email or WhatsApp only when the member turns them on** (§8). 14. ~~P14~~ (decision 4). 15. **P15 Nothing moves into the church profile in 1.0;** sermons and giving read from the Website in 1.x (§9). Answers WEBSITE-1.0-PLAN's "Still open". 16. **P16 Shared profile facts edited in Accounts,** not the App, in 1.0 (§9). 17. ~~P17~~ (decision 7). 18. **P18 Tab bar** Home, Prayer, Events, Devotional, Me (§1). 19. **P19 Safeguarding contacts** are the Pastoral care role, with South African emergency numbers by default (§4). 20. **P20 A throwaway install from the Hub** before Hope Family Church (§14). ## Not in 1.0 Reading plans, sermons, connect groups, pastoral care, serving, giving links and the directory (App 1.x, phase 7); push notifications (decision 13); a physical prayer room with places; prayer for a group; an app-store release; moving to the church's own domain (as the Website, decision 45). ## Still open - **Which two Afrikaans translations** (§6): 1933/1953 and 1983 proposed. - **The publishers' terms** for quoting each translation in an app (§6), checked before Cross Code's devotionals go out; ask for permission where the terms don't cover it.