app: the House of Prayer's backend (APP-1.0-PLAN §3)
Commitments stored as rules (start, length, once/daily/weekly, end, skips) in the church's timezone, daylight saving included; the day's coverage as counts only, cached until a booking changes, live over server-sent events (X-Accel-Buffering off, a comment every 25 s). Booking, skipping, changing, cancelling within the 8-hour rule, renewing (a signed single-use link), "I prayed" (self-reported). Campaigns and moderated testimonies; the admin's bookings with names, always access-logged; booking on a member's behalf. Reminders (every minute) and renewal notices (14 and 3 days before) queued in an outbox for the messaging slice. The heartbeat's prayer counts; export and delete for a member's prayer. Migration 20261202000000_house_of_prayer (checked on PostgreSQL 18: applies, no diff). 66 backend tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -69,3 +69,8 @@ export function churchChanged(ctx: Ctx): void {
|
||||
const state = caches.get(ctx);
|
||||
if (state?.cached) state.cached = { ...state.cached, at: 0 };
|
||||
}
|
||||
|
||||
/** The church's timezone: the profile's, else APP_TIMEZONE (§1). Days and prayer slots are in it. */
|
||||
export async function churchTimezone(ctx: Ctx): Promise<string> {
|
||||
return (await churchProfile(ctx))?.timezone ?? ctx.config.timezone;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user