Nothing before these changes was ever public, so the fixes kept for
older data go: the /leadership redirect (MOVED in routes/pages.js),
index.html's move of "ngu-" browser keys to "site-", the boot-time
sorting of images from before folders (media.js), and emoji path
icons (a path with no named icon shows a dot; migration 055 turns
the baseline's seeded emoji into their names).
Pages → Organization page (migration 055): a singleton with the
Mission, Vision & Values blocks, the Leadership blocks (a People
block per team, in order) with a heading and blurb, and Volunteering
(title, blurb, links). content_blocks gains the two owner kinds;
GET /organization-page serves it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three sections: Mission, Vision & Values from the national
organization record's own description and content blocks;
Leadership as that record's teams with their people; Details &
Contact with NGU's address, nonprofit status, email and the
record's contact links. /leadership answers with a 301 to
/organization (MOVED in routes/pages.js), and a page title or intro
saved for it in Site settings moves with it (migration 054).
OrganizationDetail's team list and contact buttons are now shared
components (OrgTeams, OrgContact), and NGU's address and email live
once in src/data/organizationDetails.ts for the footer, the page and
ComingSoon.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A "People" content block: a team's members as people tiles, people
picked one by one as items (each with a title), or both.
content_blocks gains team_id (migration 054 rebuilds it for the
type CHECK); a picked person rides on the item's person_id.
- An organization host can name a team (any organization's) to show
in its place: event_hosts.team_id, carried by v_event_hosts. The
event page reads "Hosted by" the team, linked to its page.
- Admin fields can show on `when: { path, filled: true }`.
- The showcase post has a people block; the past showcase event is
hosted by the region shown as its team.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The suggested grid as the theme defaults, light and dark, with
PALETTE, the accents (olive becomes amber), the backdrop shades
and every literal from the old grid mapped over. Every text pair
passes the admin's 4.5:1 check; the hero's filled button is amber.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Cards sit on a raised surface (white, or a touch of tint in dark
mode) with a shadow: featured cards, the connect block, people
tiles. tint-soft is a faint teal again, not green.
- Buttons: a small plain radius everywhere; no superellipse.
- Video stills use YouTube's 16:9 frame (the 4:3 one cropped as a
fallback), have small rounded corners, and show a round, centered
play button on hover or focus (always on touch screens).
- People tiles: rows balanced between 2 and 10 across, never ending
on a lone tile where it can be helped.
- Map tiles and region tags are solid, dimmed by color, not opacity.
- Admin: white (surface) background, header and footer as wide as
the content.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The theme defaults (light and dark) come from the 16-color grid,
kept as PALETTE in src/lib/color.ts; every text pair passes the
admin's 4.5:1 check. Nothing is rounded any more except buttons,
which share one btn utility (Poppins Bold, a superellipse corner
where the browser has corner-shape) and true dots.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
color, center, canceled, labeled, recognize and the rest, in UI
text, help text, comments, docs and names (ColorInput, QrCenter).
Migration 053 renames the two Site settings color CHECKs, whose
names are the messages the admin shows. Kept: events.status's
stored value 'cancelled' (shown as canceled), aria-labelledby,
schema.org's EventCancelled, and old migrations as they ran.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The organization kind is 'group', its side table is groups, pages
live at /groups/<id> and the Community page's section is #groups.
Migration 052 converts existing databases: the kind and the tables
whose CHECKs name chapters are rebuilt, the front page count and
request category follow, and the site's own /chapters/ and
#chapters links in records are rewritten. Request files now go in
Requests/Groups on the shared drive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Save to library and Save to Drive on a finished download, not only on
clips. The download stays on the server to cut clips from either way;
a clip's library save still clears its working file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A From requests tab in every image picker lists photos from the
Request form (they live in Drive), the request being edited from
first. Picking one copies it into the media library, in the field's
folder, once per file, and the field gets that copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Save to Drive, beside Save to library, puts a finished clip in a folder
under Media (Videos or Audio chosen first to match it) as a Files
entry, shared by link, so pages can link to it (migration 051). The
clip streams from disk through a resumable upload, so a long one
isn't read into memory. A clip can be in both the library and Drive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Forms → Content requests and a new Tools → Media → Requests tab (by
type folder, each linked to its request) mark a file Drive no longer
has under Requests as Missing from Drive. Remove (admins and up)
trashes a file and takes it off its request. Drive is asked at most
every 30 seconds, and folder lookups now cache every level walked.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One grid whatever the count, so a lone card takes a column rather than
the width. Also the Blog Posts request folder's name, as it is in Drive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Request files go in Requests/<type> (Chapters, Events...). Media →
Files shows a tab per folder under Media, up to three deep, and can
make, rename (files follow) and delete empty folders, move a file with
its Folder dropdown, and upload into the folder showing; Choose a file
has the same tabs. A folder made, or a file moved, in Drive by hand is
followed on the next look (migration 050 records each file's folder).
Deletes now move to Drive's trash: a shared drive's Content manager,
the service account's role, can't delete outright, so request and file
deletes would have failed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
logos/ for logo and icon fields, thumbnails/ for previews the site
saves (link previews, Drive first pages), images/ for everything else;
each small copy beside its image. Images from before folders are
sorted once at boot by their uses, and every record naming them is
rewritten in one transaction after the files move.
The Media page and image pickers get a tab per folder; a picker opens
on its field's folder and uploads there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Request form asks each type for its main details (a chapter's
city, meeting time, website and email; an event's dates, venue and
registration link...), stored as one JSON column (migration 049). The
server only checks the shape; the fields are src/data/requestTypes.ts.
Forms → Content requests shows them, and for a new record opens the
New editor filled in (URL ID from the name, links and a description
paragraph added); for an update, picks the record (closest name
first) and opens it with each requested value beside the current one
to use or skip. Nothing is saved until Save.
Also centres the image and file pickers, which Tailwind's reset had
pinned to the top left.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Blog posts section, the same cards as the Community blog, for the
published and listed posts they're an author of.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The folder isn't only for blog posts. A Blog folder made before this
can be renamed to Media in Drive; its files keep working.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Opening Tools → Media → Files (or a Choose a file picker) now looks in
the shared drive's Blog folder, at most every 30 seconds, and adds
anything put there in Drive itself: shared as anyone with the link,
previewed, Google Docs, Sheets and Slides included, folders and
shortcuts left out. A file Drive won't share is named in a note and
tried again every ten minutes.
A reply that isn't the API's (nginx's own error page) now says what it
was: a 413 names nginx's upload limit, a 502 the service, a 504 the
timeout, instead of "Server did not return JSON".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tools → Media → Files uploads PDF, Office (.docx, .xlsx, .pptx), MP3,
M4A and zip files, up to 50 MB, to the shared drive's Blog folder and
shares each as anyone with the link can view (migration 048). A file's
name and contents must agree.
Content block links get "Choose a file" (paragraph, button and image
links, list and link items, link cards). A link card also takes the
file's name and Drive's picture of its first page, fetched after
upload and saved into the image library; cards to Drive say "Google
Drive". Deleting a file says first what still links to it.
Setup and the nginx block: docs/google-drive-and-mail.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Site settings → Access names a group for each of admin, editor and
viewer (migration 047). Someone in one who signs in with Google gets a
Google-only account with their highest group's role, and the role
follows the groups: at every sign-in, hourly while signed in, and on
Panel → Google groups → Re-sync now. Out of every group, the account
is disabled and signed out until they're back in one.
Group accounts' roles are locked in the Panel; a superadmin's Disable
sticks. Superadmins and admin-cli accounts are never changed. If
Google can't be asked, sign-ins are refused but the hourly check
leaves accounts alone. Panel → Check their groups tests an email.
Lookups use the service account through the Directory API as
GOOGLE_DIRECTORY_AS. Setup: docs/google-sign-in.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Panel → Site settings → Notices → Send a test notice emails the
addresses in the box now and shows where it came from, or Google's
reason for refusing, so the Gmail setup can be checked without the
journal. Superadmins only (POST /api/admin/panel/test-notice).
The docs now say the sender must be a Workspace user: a group can't
be acted as through delegation, though it can receive notices.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GOOGLE_SHARED_DRIVE (the shared drive's bare id) replaces
GOOGLE_DRIVE_FOLDER. driveUpload takes a folder path, found by name in
the shared drive or made the first time, so each use gets its own
folder: "Requests" for the Request form now, others later. The docs
say plainly that the setting is the id only, not the address.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One form at /request for blog posts, events, and new or updated
chapters, regions (updates only), partners, teams, awards and people.
?type= opens it on one; buttons on the Community sections, blog posts,
Retreats and the front page calendar do. Files (.docx, PDF, JPEG, PNG)
go to a Google Drive folder through a service account.
Requests are feedback rows of type 'content' (migration 046), in a
third Forms queue: files download from Drive, a .docx can become a
draft blog post, and deleting a request deletes its files. New content
and data requests email the addresses in Site settings through Gmail.
Setup: docs/google-drive-and-mail.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
044 had already run with only the table type, so a database that ran
it would never see the edited CHECK, and boot would refuse the cards
type. 044 is back as it was; 045 rebuilds content_blocks to allow
cards.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A "cards" content block: each item is a card with a picture, title and
description that links somewhere, like a link shared in a chat. Fetch
preview fills the card from the link. Migration 044 (not deployed yet)
now allows both table and cards.
Also fixes hidden-field clearing when two fields share a path, and adds
table and card blocks to the showcase post.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Table content blocks (migration 044): a grid of text, a row per
line, cells split by |, the first row the header; cells take the
same formatting as a paragraph; wide tables scroll on a phone
- Blog posts -> Import from Word: the server reads the .docx (zip and
XML read without a library, sizes capped) and creates an unpublished
post through the CRUD engine: title, date, headings, paragraphs,
lists, tables, bold, italic and links; the editor opens with a note
of what came over and what didn't (images)
- docs/importing.md, and an nginx block for the upload
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The timeline's ngu-tl classes and keyframes are site-tl; nguLogo is
siteLogo; the event card's ngu grid area is org; window.__NGU_SITE__
is window.__SITE__; QR downloads are qr-<page>.png
- Browser keys (theme, closed banner and privacy notice, chunk reload)
start site-; the page's first script moves any old ngu- values over
once, so nobody loses their theme or sees a closed notice again
- Session and Google sign-in cookies are site_session and site_oauth
(__Host- over https); everyone signs in again once
Record ids, server paths, the service and the database file keep
their names.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blog posts -> Show contents (migration 043, off by default): with two
or more headings, the post's headings sit in a sticky column beside
it with the one being read lit (an IntersectionObserver, not a scroll
listener), and fold out at the top on phones. Content-block headings
now carry anchor ids, so a link can point at one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Forms now has two queues, Website feedback and Data requests, each
its own card on the admin home and a tab on the page, with what's new
in each. The API takes ?kind=feedback|privacy and counts per queue.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The colour defaults have one source, server/src/themeDefaults.js,
read by the server and the admin; the build stops if src/index.css
disagrees with it
- server/src/admin-schema.js split into admin-schema/, one file per
entity plus columns.js (the registry checked identical)
- loadOwned() in shape.js replaces the same three loads on four
detail routes (every public route checked identical); one NO_STORE
- One OrgLogo component for the org lists and the chapter map; an
organization's own page now shows the same initials as the lists
- One localISO() for the viewer's calendar day, in place of three
- Boot refuses a descriptor dropdown value the table's CHECK doesn't
allow, instead of it failing on save
- Deleted the unused Other.tsx and white-background logo;
chapters.ts is useCommunity.ts; isSuper() in the Panel; stale
comments and docs corrected
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Every page but Home, and the whole admin, loads on first visit: the
main bundle drops from 579 kB to 314 kB (173 to 98 kB gzipped); a
tab on an old build reloads once when a page chunk has gone
- Home asks for events and the timeline alongside its own data, and
the server preloads /api/front-page and the first hero photo
- Hero headline rises in as one piece (it held back the page's
largest paint), sized to stay within two lines; min-h in dvh; first
slide fetched at high priority
- Every raster upload gets a 640px copy (at upload, and at boot for
older files); logos, avatars and card pictures load it and fall
back to the full file
- Login password checks run off the event loop; only admin requests
are logged per request; ffmpeg runs at nice 19 on Linux
- Page HTML is no-cache, so a deploy can't strand a cached page on
missing assets; source maps are no longer linked
- Migration 042: index person_awards by award
- docs/performance.md, and gzip and HTTP/2 for nginx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Panel: changing a role or disabling an account always failed
(db.transaction doesn't exist on node:sqlite); it uses tx() now
- Feeds and link previews are scanned with indexOf, not whole-document
regexes, so a hostile feed or page can't freeze the server; entity
decoding can't throw; escaped-HTML descriptions make clean excerpts
- Feed reads share one fetch per feed and serve the stale copy while
a refresh runs
- Deliberate HTTP errors (the CSRF 403) keep their status instead of
becoming logged 500s; a JSON null body is handled
- url columns read the scheme the way the URL parser does, so
control characters can't hide javascript:
- Google sign-in state cookie is __Host- and its return page is
checked again; more reserved ranges blocked for previews and feeds,
and a 15 s cap on each whole fetch
- Log lines from visitor text are made single-line and short; list
limits can't go negative; entity names can't hit object prototypes
- A clip title can't point the clip tool at another file
- Uploads over 60 MP are refused before decoding; the Keep original
help says a photo's location stays in it
- admin-cli add defaults to the editor role
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The session cookie is __Host-ngu_session when Secure (production),
so a sibling subdomain can't set or overwrite it; plain ngu_session
over local http. Every admin signs in again once after deploying.
- Five wrong passwords for one email lock that email for 15 minutes,
from any address; a correct password clears it. On top of the
per-IP limit.
- CLAUDE.md: noImplicitAny stays off on purpose.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- One CACHE and json() in shape.js for the seven public route files
- A url column type: link fields (13 of them) refuse javascript:, data:
and any other scheme on save, not only when drawn
- The chapter map's logo uses the shared Logo component
- Schedule tabs take Home and End as well as the arrows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Panel -> Site settings -> Colours: any colour token, with a light and a
dark value (migration 041). The server writes the overrides into each
page's head in the same cascade layers as index.css, so a light-only
change leaves dark mode alone. Values must be #rrggbb (a table CHECK),
and saving refuses a palette that puts any text under 4.5:1 in either
mode, through a new descriptor hook, check(db, id), run inside the
save's transaction.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- One mediaUrl in media.ts instead of 12 identical aliases and a
kind map; orgPath builds on hrefs.ts's orgHref
- One Logo component (hides itself or shows a fallback when the file
is missing) for event cards, org lists and chapter marks
- useHistory is a thin wrapper over useRecord
- adminSchema.ts split into adminSchema/, one file per entity plus
shared.ts; the registry is unchanged (checked by loading both)
- JS smooth scrolls respect reduced motion (lib/motion.ts)
- Content-Security-Policy in Report-Only, with /api/csp-report logging
what it would block
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Colour tokens in index.css named by role (ink, body, muted, link,
brand, action, surface, tint, danger), used everywhere instead of hex
- Dark mode: follows the system, a header toggle (site and admin)
overrides it and is remembered; set before first paint in index.html
- Data colours go through src/lib/color.ts: withAlpha for tints,
accentText (lighter on dark) for text in an accent, readableOn for
text on one, so an admin's pale colour still reads
- Migration 040 drops events.gradient: a card is its photo or plain,
with its colour as the border; other decorative gradients are solid
- The countdown and a hero event without a photo mix their colour
toward ink behind white text
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Privacy Policy (with cookies and storage) and Terms of Service, from
what the code actually stores and loads; shared LegalText layout
- Data requests: a 'privacy' feedback type sent from the Privacy page's
form, email required, triaged in Admin -> Feedback
- Migration 039: Panel -> Site settings -> Privacy contact email (over
site.json's privacyEmail), shown on the Privacy page
- The hero livestream, the hero featured video and schedule maps load
only when pressed, so no third party sets anything before a click
- A small dismissible privacy notice instead of a consent banner
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nginx serves /assets, /uploads and the fallback index.html itself, so
the API's HSTS header never reached them. nginx now sends it on
everything and the API stops, so proxied pages don't get it twice.
docs/security-headers.md says who sends which header and what nginx
must pass (Host, X-Forwarded-For) for the CSRF check and rate limits.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Text contrast: teal text and button fills use #0f7183 (5.7:1), section
accents darkened to pass on white, solid CTA buttons instead of the
gradient, footer and subnav text raised to white/65, event and region
colours kept on borders and swatches with ink text
- Hidden carousel slides and collapsed past events are inert
- Admin list rows carry a real link for keyboard use
- Mobile menu is a modal dialog: focus, Escape, inert background, above
the header
- Skip to content link, one focus-visible ring, reduced-motion rule,
focus rings on the calendar inputs
- Region headings hold their button instead of sitting inside it
- font-700 style classes (not Tailwind v4 utilities) replaced with named
weights, and the 700/800 font files loaded
- Migration 038: alt text for blog covers and schedule graphics; event
logos next to their title are decorative
- Drop the Church Center script from index.html; Giving loads it itself
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Replace every em-dash in src and server/src with a colon, comma or hyphen
- Give every relative import its file extension (.jsx imports of .tsx fixed)
- Delete old-historyMock.ts, unused exports, unused CSS utilities, the
unused @ alias and the fallback option nothing passed
- One copy each of initials, capitalize, byName and the server's marks()
- Move the organization, chapter and event hooks from src/data to src/lib
- Schema sync always throws on a mismatch (strict was never turned off)
- Replace the placeholder README
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Rate limits and IP hashes use the X-Forwarded-For entry nginx adds,
not the client-supplied first one
- Link preview and feed fetches block IPv4-mapped and other embedded
IPv6 forms of private addresses (net.BlockList)
- CSRF check on /api writes; security headers and HSTS on every response
- Viewers no longer receive a person's private details (readRole)
- Sessions end 90 days after sign-in however active
- yt-dlp ignores config files and takes the link after --
- Meta tag insert no longer expands $ patterns from record text
- Links with an unsafe scheme draw as text
- Migration 037: leadership lists name published home orgs only
- Ignore *.db-wal, *.db-shm and *.txt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- People tiles resolve a bare photo filename to /uploads, via personPhoto
- api.ts keeps the Accept header when a request sets its own headers
- Feedback hashes IPs with auth.js's salt and client IP helper
- Drop the better-sqlite3 fallback (not installed); require Node 22.13+
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Save to library could only answer "Something went wrong". Each step
(making the uploads folder, copying the clip in, reading its size,
adding its media row) now names itself and the cause when it fails,
and a half-finished save removes the copied file so the uploads
folder never holds a file without its row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"Couldn't read the cookies file" covered both a file the service
can't read and a clips folder it can't write its copy into. Each now
has its own message naming the setting (YTDLP_COOKIES or CLIPS_DIR)
and the cause: missing, or not allowed for the service's user.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When YouTube answers the server with "sign in to confirm you're not a
bot", yt-dlp needs a signed-in account's cookies. YTDLP_COOKIES points
at an exported cookies.txt, copied per download so the original is
never rewritten; YTDLP_COOKIES_FROM_BROWSER passes yt-dlp's
--cookies-from-browser for a browser on the server. Setup, and the
advice to use a separate account, is in docs/video-clips.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tools → Video clips (migration 036, admins and up). Paste a YouTube
or Facebook link and the server downloads it with yt-dlp; then cut
clips: start and end set while watching, a shape (as filmed, 16:9,
square or 9:16 at the sizes the platforms ask for, cropped around a
chosen point shown over the video), and MP4 video or MP3 audio.
Jobs queue and run one at a time with progress. Only YouTube and
Facebook links are accepted, and both tools run with argument lists,
never a shell. A clip's file is deleted once it has been downloaded
in full, unless it's saved to the media library first, which now
holds video and audio (image fields still pick images only).
Everything is swept a day after it's made. Setup is in
docs/video-clips.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Panel → Site settings (migration 035, superadmins only) edits the
site's name, description, preview image, favicon and home-screen
icon, each static page's title and intro, and whether search engines
may list the site. Every value overrides site.json; a blank one falls
back to it. The indexing switch is per database, so the dev server
can be off while production is on from one build.
The server merges the two (siteFor in pageMeta.js) for page metadata,
the sitemap and a new /robots.txt route, and writes the merged
wording into each page as window.__NGU_SITE__, which site.ts reads so
headings match with no extra request. Entities can now require a
higher role to save (writeRole), checked on both sides. Panel is a
menu group with Accounts and server, and Site settings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The library only knew files uploaded through the admin. Listing it
now registers any image in the uploads folder that has no media row,
under its own name and unprocessed, at most every 30 seconds.
Non-images, dotfiles and temporary names are skipped. The delete
check also counts records that name a file by its bare filename, and
a hand-copied name is escaped in its URL.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>