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>
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>
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>
- 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 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>
- Dark mode: the countdown card, timeline section, Giving text, error
text, the Leadership button, skeletons and the admin's dark text all
follow the tokens; logos get a light plate in dark mode
- One BRAND accent (the button token, so the admin palette reaches
every page) and one ACCENTS family in color.ts, replacing 20 local
teal constants and the purple, ochre and rust section colours;
neon green and gold become mint and brand green
- Shadows are tinted with the site's ink; glow shadows are gone
- One giving label, Give, in the nav, footer and Giving page
- Phosphor icons replace the hand-drawn SVGs and the glyph icons;
Pathfinder paths pick a named icon (emoji still shown) and lose the
watermark
- Home keeps two eyebrows; StatsBand's title is a real heading;
section headings step down under the page title
- Nav links switch to the menu below lg, so they never wrap; jump
links land clear of the header; press feedback on buttons
- Empty sections say what's coming and who to ask; loading is a
skeleton; form placeholders and borders are readable; one
corner-radius rule; theme-color for both modes
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>
- 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>
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>
Page requests now go through the API (routes/pages.js), which fills
the built index.html in for that path before the app loads: title,
description, preview image, canonical URL, and structured data
(Organization, Event, BlogPosting). Shared links preview the page
itself. Unlisted records are noindex; missing ones return 404.
/sitemap.xml lists every public, listed page.
site.json is the one place for the site's name, address, default
description and preview image, and each static page's title and
intro, which the pages now read too. Indexing is switched on:
robots.txt allows all but /admin and /api and names the sitemap. The
browser tab title follows the page.
nginx setup, with a fallback to the plain page if the API is down,
is in docs/seo.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A schedule block's entries (migration 034) each have a day, time,
title, detail, location, person and link, and fold out for a longer
description, the person's photo and page, a graphic and a Google map
of a place or address. Entries sit in one tab per day, in the order
entered; the tab for today's weekday opens first, and a one-day
schedule draws no tabs.
In the editor, the entry fields show only under a schedule block:
repeater `when` can now look at the parent row (scope "parent"), and
a field's label can depend on the row. The block preview names an
entry's person. The showcase retreat and post each have a schedule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Front page → Feature gains "Featured event" (migration 033): the
event's card beside the headline, with its photo or colour, dates or
schedule, place, tagline, action buttons and a link to its page,
under a "Featured event" badge, over either backdrop.
Front page → Featured event pins one. Blank uses the countdown's
event, and a pinned event that's over or unpublished falls back to
it, so the hero and the countdown never disagree.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The header now has one menu per group: its name opens the first
item, and hovering or tabbing into it drops down the rest. The strip
under the header lists the open group's items, which is also the way
around on a touch screen. The admin home shows the same groups as
card blocks, from the same list in adminNav.ts.
Data holds the record types, Pages the front page, timeline, blog
posts and the Community blog section, Tools the media library and QR
codes. Docs and comments name the new menu paths.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocks (migration 032): video (click to play, sharing the featured
cards' player), button and callout types; quotes get an attribution
and images alt text separate from the caption. Paragraphs, callouts,
quotes and list items take **bold**, *italic*, [text](url), line
breaks and blank-line paragraphs, parsed into elements (never HTML)
with only safe link schemes. A list item's detail no longer uses an
em-dash.
Editor: each block type shows only its fields, with a named type and
a description, and every open block previews itself with the site's
renderer. Any repeater row can now be duplicated or have a new row
inserted below it; nested collections take `when`, and help text can
depend on the row.
src/seed-showcase.js writes a local test post using every block type
and option. It refuses the production database.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Admin → Blog → Posts (migration 031): our own posts with a
content-block body, cover image, excerpt, date, tags, and authors
shown as person tiles, either People records or a guest name and
photo. A post is a draft until published; Listed works as it does
elsewhere. Posts are on the QR page too.
Admin → Blog → Community section: the first section of the
Community page, with its heading and blurb from the admin, in two
halves, each pinned first and then newest up to its slots. Our posts
come from blog_posts; community posts are pinned link or video cards
(reusing featured cards and Fetch preview), then the newest items
from a list of RSS or Atom feeds. Feeds are read through the link
preview's guarded fetch and cached for 30 minutes, and a failing feed
keeps its last good items.
content_blocks and featured_cards are rebuilt to accept the new owner
kinds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Front page → Featured cards (migration 030) holds cards of three
kinds: a record on the site, whose title, picture and link fill in
from the record; a link, with a Fetch preview button that reads the
page's title, description and preview image into the media library;
and a video, drawn as a thumbnail that loads the player when pressed.
A 'featured' section draws them.
The cards are shared: featured_cards is owned polymorphically and
FeaturedCards.tsx draws them, ready for the Community blog. Deleting
a record removes its cards; an unpublished record's card is hidden.
The preview fetch only goes to public http(s) addresses on standard
ports, pinned to the vetted IP, with each redirect checked again.
Along the way: repeater fields can show by another field's value (a
hidden one is cleared), a CHECK named as a sentence is shown as the
error, and the timeline's record list is now record_refs for both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Uploads (migration 028, server/src/media.js, routes/media.js): editors
and up upload JPEG, PNG, GIF, WebP or SVG. Photos are resized to 2400px
and saved as WebP by default, or kept as uploaded on request. Files
live in UPLOADS_DIR, served by nginx in production and by the API in
dev. Admins and up delete, after seeing what still uses the file.
Every image field in the editor is now an image widget: preview, the
path as text, Upload and Choose from library. A new Media page lists
the library. Org lists and event cards now resolve logos through
media.ts, so uploaded paths work there.
Events get a card_image (migration 029): a photo behind the card under
a light veil so the text stays readable. The card's size is unchanged.
Setup for production is in docs/media-uploads.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
is_listed (migration 027) sits beside is_published on organizations,
events, people, teams and awards. Unticked, the record's own page
still works, but the site's lists leave it out: the list routes, a
region's chapters, an organization's events, teams and awards, the
QR page's directory, and the front page's counts and countdown.
Places where someone attached it by hand (rosters, hosts, billed
people, recipients, timeline, a pinned countdown) still show it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Links pick their platform from a preset dropdown (PLATFORMS in
src/lib/platforms.ts), and every link button draws that platform's
icon beside its label. The footer and event cards now share the same
PlatformIcon component instead of their own copies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Admin > Front page > Countdown gains two optional dropdowns, "Only
this scope" and "Only this type", each defaulting to any. They narrow
which event counts as "the next one": National + Retreat counts down
to the next national retreat and skips a sooner regional class. A
pinned event still wins over both. When nothing matches, the
countdown band doesn't render, as before.
Migration 026 adds front_page.countdown_scope_id, a foreign key to
event_scopes (ON DELETE SET NULL, so removing a scope returns it to
"any"), and countdown_event_type, checked against the same values as
events.event_type. Adding an event type now widens both CHECKs; the
note in eventTypes.ts and the guide say so.
Also clears the older em-dashes from home.js and eventTypes.ts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Your wording pass on adminSchema.ts and fields.tsx: "Default: ..."
blank options, "eg." examples, "URL ID" for slugs, and relabelled
front page sections, stat sources and hero fields.
On top of it:
- Content block row titles end with an ellipsis when the paragraph
is cut. preview() in src/lib/text.ts does it for anything that
shortens text: it collapses whitespace, cuts on a word and adds
"..." only when it actually shortened.
- No em-dashes in the editor, front end or server: placeholders
("Internal note: ..."), the Organizations blurb, the URL ID help,
empty table cells (now "-"), the Award dropdown ("Torch Award
(NGU)" in OPTION_QUERIES), a boot error message, and every comment
in the admin files. Also cleared from the files added this branch
(QR page, directory route, embeds, hero, migration 024), and the
QR page's team labels read "Board (NGU)".
- A few comments where removing the dash had run two sentences
together get a comma, colon or parentheses back.
- docs/updating-data-in-code.md matches the new labels and gains a
"Writing text in the editor" section with these conventions;
CLAUDE.md lists them under Rules and gotchas.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/updating-data-in-code.md covers content that lives in code
rather than SQLite and how to change it:
- The two kinds of admin dropdown: filled from records
(optionsFrom, change the record) and fixed lists (options, in
adminSchema.ts), and that a bare-string option shows its stored
value while a [value, label] pair shows the label.
- Relabelling a dropdown is adminSchema.ts alone; adding, removing
or renaming a stored value is a migration, both descriptor halves
and whatever the public site renders it with.
- A table of every dropdown in the editor, where its values and
labels live, and what on the public site depends on them.
- The front page's three kinds of "section name" (the heading the
admin sets, the dropdown label, the subnav link) and stat sources.
- Every other piece of code-owned content: nav, page section
manifests, banner, history decades, map grid, feedback types,
public label maps, roles, SITE_ORIGIN.
CLAUDE.md points at it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>