Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cc72aaaad | ||
|
|
6db2f439b4 | ||
|
|
28603f2301 | ||
|
|
ee799dec98 | ||
|
|
0312767d75 | ||
|
|
46e8c15602 | ||
|
|
f1d6234800 | ||
|
|
a286f8abce | ||
|
|
d985a4c853 |
@@ -25,3 +25,4 @@ npm-debug.log*
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
temp/
|
||||
|
||||
@@ -2,6 +2,18 @@
|
||||
|
||||
Each package and app has its own section and its own tags (`contracts@1.0.0`, `accounts@1.0.0`, …).
|
||||
|
||||
## events@2.3.1 - 2026-11-18
|
||||
|
||||
- Next.js 16.4.6 (security advisories for 16.2.0–16.4.4; Events wasn't exposed). Also brings
|
||||
`apps/events/package.json` up to the release (it was left at 2.2.0). Details in
|
||||
`apps/events/CHANGELOG.md`.
|
||||
|
||||
## agent@1.0.1 - 2026-11-18
|
||||
|
||||
- A `status` job on the central server is answered by the agent itself (its stats, frps and
|
||||
the agent version). It used to run `crosscode status`, which central servers don't have, and
|
||||
failed with `spawn /usr/local/bin/crosscode ENOENT`.
|
||||
|
||||
## events@2.3.0, contracts@1.3.0, agent@1.0.0 - 2026-11-17
|
||||
|
||||
Phase 1c (authenticator-app sign-in) and phase 1d (docs/AGENT-1.0-PLAN.md): installs, updates and
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@crosscode/agent",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"private": true,
|
||||
"description": "The server agent: runs the crosscode script for signed jobs from Cross Code Hub, reports stats (docs/AGENT-1.0-PLAN.md)",
|
||||
"license": "UNLICENSED",
|
||||
|
||||
@@ -159,6 +159,15 @@ export class Agent {
|
||||
}
|
||||
case "export":
|
||||
return await this.runExport(job, limit);
|
||||
case "status":
|
||||
// The central server has no crosscode script (install.sh --central): its status is the
|
||||
// agent's own stats, with frps.
|
||||
if (this.deps.config.mode === "central") {
|
||||
const stats = await (this.deps.stats ?? (() => collectStats("central")))();
|
||||
const warning = stats.central && !stats.central.frpsRunning ? "frps isn't running." : undefined;
|
||||
return { status: "succeeded", steps: [], result: { stats } as unknown as Record<string, unknown>, message: warning, log: [], startedAt, finishedAt: new Date().toISOString() };
|
||||
}
|
||||
return await this.run(crosscodeArgs(job)!, job, limit);
|
||||
default: {
|
||||
const args = crosscodeArgs(job);
|
||||
if (!args) throw new Error(`No command for ${job.type}`);
|
||||
|
||||
@@ -12,7 +12,7 @@ import { paths } from "./paths";
|
||||
* the tools that are there; anything missing is null rather than an error.
|
||||
*/
|
||||
|
||||
export const AGENT_VERSION = "1.0.0";
|
||||
export const AGENT_VERSION = "1.0.1";
|
||||
|
||||
function run(cmd: string, args: string[], timeoutMs = 10_000): Promise<string | null> {
|
||||
return new Promise((resolve) => {
|
||||
|
||||
@@ -104,6 +104,24 @@ describe("the agent loop", () => {
|
||||
expect(fs.readdirSync(path.join(state, "exports"))).toEqual([]);
|
||||
});
|
||||
|
||||
it("status on the central server: its own stats, without crosscode (which isn't installed there)", async () => {
|
||||
const h = fakeHub([job({ type: "status", args: {} })]);
|
||||
const run = jest.fn<ReturnType<Run>, Parameters<Run>>(async () => ok());
|
||||
const stats = { schema: "crosscode.agent-stats/1", central: { proxyBindAddr: "127.0.0.1", allowPorts: null, frpsRunning: true } } as unknown as agent.AgentStats;
|
||||
const a = new Agent({ config: { ...config, mode: "central" }, keys: { ed25519Pem: serverKeys.ed25519.privateKeyPem, x25519Pem: serverKeys.x25519.privateKeyPem }, hub: h.hub, seen: new SeenJobs(path.join(state, `seen-${Math.random()}.json`)), run, stats: async () => stats, now: () => NOW });
|
||||
await a.pollOnce();
|
||||
expect(run).not.toHaveBeenCalled();
|
||||
const r = reports(h.posts)[0]!;
|
||||
expect(r).toMatchObject({ type: "status", status: "succeeded", result: { stats } });
|
||||
expect(agent.agentReportSchema.safeParse(r).success).toBe(true);
|
||||
});
|
||||
|
||||
it("status on a church server runs crosscode status", async () => {
|
||||
const { a, run } = make([job({ type: "status", args: {} })]);
|
||||
await a.pollOnce();
|
||||
expect(run.mock.calls[0]![0]).toEqual(["status", "--no-fetch"]);
|
||||
});
|
||||
|
||||
it("a job that throws is reported as failed", async () => {
|
||||
const { a, posts } = make([job()], jest.fn<ReturnType<Run>, Parameters<Run>>(async () => { throw new Error("boom"); }));
|
||||
await a.pollOnce();
|
||||
|
||||
@@ -5,6 +5,14 @@ All notable changes to this project are documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project follows [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## [2.3.1] - 2026-11-18
|
||||
|
||||
### Security
|
||||
|
||||
- **Next.js 16.4.3 → 16.4.6** (and eslint-config-next), for two advisories about cached data leaking
|
||||
across root params in `use cache` / `unstable_cache` (affects 16.2.0–16.4.4). Events uses neither,
|
||||
so it wasn't exposed; `next build` now refuses affected versions, which stopped the 2.3.0 build.
|
||||
|
||||
## [2.3.0] - 2026-11-17
|
||||
|
||||
Authenticator-app sign-in and recovery codes (ROADMAP-v3 phase 1c), and what installs and
|
||||
|
||||
@@ -12,6 +12,11 @@ Write for church admins, not developers: no environment variables, endpoints or
|
||||
developer log is CHANGELOG.md. A tagged version without a section here shows "No details given".
|
||||
-->
|
||||
|
||||
## 2.3.1
|
||||
|
||||
- **Maintenance update.** An update to the framework the site is built on, with its latest security
|
||||
fixes. Nothing changes in how you use Cross Events.
|
||||
|
||||
## 2.3.0
|
||||
|
||||
- **Sign in with an authenticator app.** Two-factor sign-in can now use an app on your phone
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@crosscode/events-backend",
|
||||
"version": "2.3.0",
|
||||
"version": "2.3.1",
|
||||
"description": "Event Management System Backend",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
# Handover — where things stand and how to carry on
|
||||
|
||||
Last updated: 2026-11-05, after **2.1.1** (deployed). **This file covers Cross Events only**
|
||||
Last updated: 2026-11-18, after **2.3.1** (Next.js 16.4.6 for security advisories, on top of 2.3.0;
|
||||
released, not deployed yet; servers still run 2.1.1 until they're adopted, see the root
|
||||
[ROLLOUT-1.0.md](../../../docs/ROLLOUT-1.0.md)).
|
||||
**This file covers Cross Events only**
|
||||
(what's been done, where the code lives, known gaps). **The plan for every product and where each
|
||||
phase stands are in the monorepo's root `docs/`** →
|
||||
[ROADMAP-v3.md](../../../docs/ROADMAP-v3.md),
|
||||
[HANDOVER.md](../../../docs/HANDOVER.md) (all products) and
|
||||
[EVENTS-2.2-PLAN.md](../../../docs/EVENTS-2.2-PLAN.md) (the next Events release:
|
||||
the move into the monorepo). The Hub protocol is there too ([hub-protocol.md](../../../docs/hub-protocol.md)). How Cross
|
||||
[EVENTS-2.4-PLAN.md](../../../docs/EVENTS-2.4-PLAN.md) (the next Events release: protocol v2,
|
||||
Linked products, the event feed and `packages/seo`; the move into the monorepo was
|
||||
[EVENTS-2.2-PLAN.md](../../../docs/EVENTS-2.2-PLAN.md)). The Hub protocol is there too ([hub-protocol.md](../../../docs/hub-protocol.md)). How Cross
|
||||
Events got to 2.x is in [ROADMAP-v2.md](./ROADMAP-v2.md); the round before that in
|
||||
[FEATURES-ROUND-1.md](./FEATURES-ROUND-1.md).
|
||||
|
||||
@@ -95,13 +99,14 @@ encrypted settings unreadable or break existing installs.
|
||||
## Next up
|
||||
|
||||
1. **Roadmap v3**, across every product: see `crosscode-platform/docs/HANDOVER.md` ("Where each
|
||||
phase stands", "Next up"). For Cross Events that means **2.2.0** (the move into the monorepo as
|
||||
`apps/events`, with the `crosscode` script; `crosscode-platform/docs/EVENTS-2.2-PLAN.md`), then
|
||||
**2.3.0** (authenticator app 2FA, `TwoFactorMethod` in `prisma/schema.prisma`) and **2.4.0**
|
||||
(protocol v2, Linked products, the event feed).
|
||||
- **Deploying until 2.2.0:** `bash scripts/deploy.sh --check`, then
|
||||
`bash scripts/deploy.sh v<version>` on each server (installs ask through Request update as
|
||||
usual). From 2.2.0 on: `crosscode deploy <church> events`.
|
||||
phase stands", "Next up"). **2.2.0** (the move into the monorepo) and **2.3.0** (authenticator
|
||||
app 2FA and recovery codes, plus what installs from the Hub need) are released (2026-11-17;
|
||||
**2.3.1** with Next.js 16.4.6 on 2026-11-18). Next for Cross Events is **rolling them out**
|
||||
(each install adopted from the Hub, on 2.3.1), then **2.4.0** (protocol v2, Linked products,
|
||||
the event feed), planned in [EVENTS-2.4-PLAN.md](../../../docs/EVENTS-2.4-PLAN.md).
|
||||
- **Deploying:** installs still on 2.1.1 move with `adopt` (Hub → Servers → Installs → Link
|
||||
existing → Move onto the monorepo, or `crosscode adopt` by hand), never `deploy`. After that,
|
||||
updates are planned on the Hub (Updates), or `crosscode deploy <church> events` by hand.
|
||||
- **AI for a church:** set the licence's monthly AI cap above R0 on the Hub (Hub 1.6.0+); with
|
||||
no cap the buttons don't show.
|
||||
- Testing AI locally: run the Hub (`../events-hub`, port 5200), set Settings → AI there, give a
|
||||
@@ -119,6 +124,27 @@ encrypted settings unreadable or break existing installs.
|
||||
|
||||
Languages (Afrikaans, §10) and Wallet passes (§7) are removed from scope (2026-10-28).
|
||||
|
||||
## Where two-factor lives (2.3.0)
|
||||
|
||||
- `backend/src/utils/twoFactor.js`: every method (email, WhatsApp, `authenticator`), challenges,
|
||||
recovery codes (10 per set, stored as HMACs, single use). `backend/src/utils/totp.js`: RFC 6238
|
||||
with a last-step check (`User.totpLastStep`), so a code can't be used twice.
|
||||
- **`totpSecret` never goes to the browser:** `LOGIN_USER_SELECT` doesn't include it (that selection
|
||||
is sent back on sign-in), so `createChallenge` reads it from the database itself.
|
||||
- Frontend: the profile page draws the QR code in the browser (a dynamic `import("qrcode")`);
|
||||
`LoginForm.tsx` has "Use a recovery code". Tests: `tests/twoFactorAuthenticator.test.js`.
|
||||
|
||||
## Where the Hub-install pieces live (2.3.0)
|
||||
|
||||
- `env.template.json` (copied to `scripts/products/events.env.template.json` at the monorepo root;
|
||||
keep them the same): every `.env` variable with its layer (`server`, `defaults`, `install`,
|
||||
`generated`). The Hub has its own copy (`events-hub/backend/src/utils/envTemplates/events.json`).
|
||||
A new variable goes in all three.
|
||||
- `backend/scripts/export-church.ts` (`src/services/churchExport.ts`): the church's data as
|
||||
`crosscode.church-export/1`, for `crosscode export` and uninstalls. No internal ids.
|
||||
- `backend/src/hub/client.js` `connectFromEnv()`: a site the Hub installed registers by itself on
|
||||
first start from `HUB_LICENCE_KEY`.
|
||||
|
||||
## Working on this repo
|
||||
|
||||
- **Release routine:** branch `feat/<name>` → commit → bump with
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@crosscode/events-frontend",
|
||||
"version": "2.3.0",
|
||||
"version": "2.3.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
@@ -36,7 +36,7 @@
|
||||
"date-fns": "^4.1.0",
|
||||
"idb": "^8.0.4",
|
||||
"lucide-react": "^0.536.0",
|
||||
"next": "^16.4.3",
|
||||
"next": "^16.4.6",
|
||||
"qrcode": "^1.5.4",
|
||||
"react": "^19.3.1",
|
||||
"react-day-picker": "^9.8.1",
|
||||
@@ -55,7 +55,7 @@
|
||||
"@types/react-dom": "^19.3.0",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"eslint": "^10.13.0",
|
||||
"eslint-config-next": "^16.4.3",
|
||||
"eslint-config-next": "^16.4.6",
|
||||
"openapi-typescript": "^7.13.0",
|
||||
"postcss": "^8.5.6",
|
||||
"tailwindcss": "3.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@crosscode/events",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.1",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"dev:backend": "cd backend && npm run dev",
|
||||
|
||||
+16
-4
@@ -8,9 +8,9 @@ This replaces the old rule "the Hub never deploys" (decisions 10 and 23). The pa
|
||||
stays: **no site depends on the Hub to keep running**, and everything still goes through the
|
||||
`crosscode` script (EVENTS-2.2-PLAN §4), which keeps working by hand over SSH.
|
||||
|
||||
**Built 2026-11-18** (crosscode-platform branch `feat/agent-1.0`, events-hub branch
|
||||
`feat/servers-agent`; not merged or released). Waiting for the VM tests (§13). Where the build
|
||||
differs from this plan, see [Changes while building](#changes-while-building).
|
||||
**Built, VM tested and released 2026-11-17** (`agent@1.0.0`, `contracts@1.3.0`, Hub `v2.1.0`; with
|
||||
`events@2.3.0`). Not rolled out yet: the steps are in [ROLLOUT-1.0.md](./ROLLOUT-1.0.md). Where the
|
||||
build differs from this plan, see [Changes while building](#changes-while-building).
|
||||
|
||||
## Contents
|
||||
|
||||
@@ -459,7 +459,7 @@ Central check: both ports are open in frps and only on 127.0.0.1.
|
||||
|
||||
## Changes while building
|
||||
|
||||
Made on 2026-11-18, while building; none changes what Joshua or a church sees.
|
||||
Made on 2026-11-17, while building and in the VM test; none changes what Joshua or a church sees.
|
||||
|
||||
1. **Config encryption** is X25519 + HKDF-SHA256 + AES-256-GCM (`x25519-hkdf-sha256-aes-256-gcm`)
|
||||
instead of `x25519-xsalsa20-poly1305`: Node's built-in crypto has no XSalsa20, and this needs no
|
||||
@@ -480,6 +480,18 @@ Made on 2026-11-18, while building; none changes what Joshua or a church sees.
|
||||
`local_port` and `remote_port`.
|
||||
7. **`crosscode install`** refuses a database or role that already exists, so it can never take
|
||||
over (or, on a failed install, drop) another site's database.
|
||||
8. **PM2 runs under its own systemd unit** (`pm2-<user>`) for every site user, set up by the
|
||||
`crosscode` script before any PM2 command. Found in the VM test: a PM2 daemon started from the
|
||||
agent's job belonged to the agent's service, so stopping or updating the agent stopped the
|
||||
sites. The agent's stats never start a PM2 daemon.
|
||||
9. **frpc is restarted once**, the first time its admin lines are added (a running frpc only reads
|
||||
them when it starts); later changes reload it. Every tunnel on that server drops for a few
|
||||
seconds that first time.
|
||||
10. **The VM test** (§13) also fixed: `adopt` applies a release's new migrations; a failed
|
||||
migration is marked rolled back so later deploys aren't blocked; the agent install builds with
|
||||
the root's tools; tags are fetched with `--force`; the Hub saves the servers settings, lets a
|
||||
failed or removed install's short name be used again, and links a Hub-installed site to its
|
||||
registration so banners reach it. The full list is in [HANDOVER.md](./HANDOVER.md).
|
||||
|
||||
## Decisions
|
||||
|
||||
|
||||
@@ -252,6 +252,10 @@ database or its name.
|
||||
|
||||
## 6. Testing
|
||||
|
||||
**Done 2026-11-17** on a WSL Ubuntu 24.04 VM (steps 1–7 below; step 8 in the agent test). All
|
||||
pass after two fixes: `adopt` refused a release with new migrations (it now applies them in the
|
||||
switch-over), and a failed migration blocked later deploys (now marked rolled back).
|
||||
|
||||
- **Events, unchanged behaviour:** backend Jest, `tsc --noEmit`, frontend build and the
|
||||
Playwright e2e run, all from the monorepo. They should give the same counts as the 2.1.1
|
||||
baseline.
|
||||
|
||||
@@ -0,0 +1,392 @@
|
||||
# Cross Events 2.4.0 — protocol v2, Linked products, the event feed and `packages/seo`
|
||||
|
||||
Phase **2** of [ROADMAP-v3.md](./ROADMAP-v3.md) (§4, §5 "Sibling discovery", §9, §11; decisions
|
||||
5, 20). Written 2026-11-18. **Not started.**
|
||||
|
||||
**What 2.4.0 is:** Cross Events becomes a full member of a church stack. It reports to the Hub as
|
||||
`product: "events"` (protocol v2), shows the church's other products under **Settings → Linked
|
||||
products** with a **Connect** button, **publishes** its public events as a `crosscode.event-feed/1`
|
||||
feed, **shows** events from linked products, and builds its SEO data with the new shared
|
||||
`packages/seo`. Nothing changes for a church that has only Cross Events, apart from a new
|
||||
settings page that says "No other products yet".
|
||||
|
||||
The Website and App don't exist yet, so the "show events from" side is built and tested against
|
||||
sample feeds (§8). It's ready for the Website (phase 4) without another Events release.
|
||||
|
||||
**Done when:**
|
||||
|
||||
- `events@2.4.0`, `contracts@1.4.0` and Hub `v2.2.0` are tagged and pushed.
|
||||
- An Events install updated to 2.4.0 moves itself to protocol v2 with no admin action, and the
|
||||
Hub shows it as v2 with a public key.
|
||||
- The feed passes the contract (`parseEventFeed` with nothing rejected) for every event in the
|
||||
e2e seed, and a sample Website feed shows up in Events with a canonical link to its origin.
|
||||
- crosscode-site says "Works with the Church Website and App (coming)" on the Cross Events page
|
||||
(ROADMAP §9, "Updating crosscode-site").
|
||||
|
||||
## Contents
|
||||
|
||||
1. [Before starting](#before-starting)
|
||||
2. [Protocol v2](#1-protocol-v2)
|
||||
3. [Linked products and Connect](#2-linked-products-and-connect)
|
||||
4. [Publishing: the feed](#3-publishing-the-feed)
|
||||
5. [Showing events from linked products](#4-showing-events-from-linked-products)
|
||||
6. [`packages/seo`](#5-packagesseo)
|
||||
7. [Settings, audit log and help](#6-settings-audit-log-and-help)
|
||||
8. [What changes in each repo](#7-what-changes-in-each-repo)
|
||||
9. [Testing](#8-testing)
|
||||
10. [Releasing and rolling it out](#9-releasing-and-rolling-it-out)
|
||||
11. [Decisions](#decisions)
|
||||
12. [Still open](#still-open)
|
||||
|
||||
---
|
||||
|
||||
## Before starting
|
||||
|
||||
- **The rollout (ROLLOUT-1.0.md) is at least past step 1**, so production runs Hub 2.1.x. 2.4.0
|
||||
needs Hub 2.2.0 (§1) and is released after it, but neither depends on the church servers
|
||||
being adopted.
|
||||
- `apps/events` builds and tests clean on `main` (`npm run check`), as the baseline.
|
||||
- Events uses `@crosscode/contracts` as a workspace dependency for the first time (backend and
|
||||
frontend). The backend is CommonJS with some TypeScript; the package ships both builds, so
|
||||
`require('@crosscode/contracts')` works as it is.
|
||||
|
||||
## 1. Protocol v2
|
||||
|
||||
Today `src/hub/client.js` speaks protocol 1 (`PROTOCOL_VERSION = 1`). v2 is in
|
||||
`@crosscode/contracts` (`hub.*`) and the Hub has accepted it since 2.0.0
|
||||
([hub-protocol.md §6](./hub-protocol.md#6-protocol-version-2-hub-20)).
|
||||
|
||||
**The problem:** hub-protocol.md says an install moves to v2 by *registering again* with its
|
||||
licence key and a public key. Events never stored the licence key (it's only sent once, from
|
||||
`/setup` or "Connect to Hub"), so every church admin would have to find and retype it. The v2
|
||||
heartbeat also has no way to send a public key.
|
||||
|
||||
**The fix (Hub 2.2.0, contracts 1.4.0):** the v2 heartbeat gets an optional `publicKey` (PEM).
|
||||
The heartbeat is already signed with the install secret, so the Hub knows it's that install. The
|
||||
Hub saves the key when the install has none, and refuses a *different* key
|
||||
(`409 PUBLIC_KEY_MISMATCH`) unless Joshua clears it on the install's page (for a restored server
|
||||
that lost its key). An optional field keeps the protocol at version 2 and the contract at `/1`
|
||||
(ROADMAP §2, "Versioning").
|
||||
|
||||
What Events does:
|
||||
|
||||
| Step | Detail |
|
||||
|------|--------|
|
||||
| Key pair | On first start of 2.4.0, generate an Ed25519 key pair (`generateEd25519` from `@crosscode/contracts/signing`). Private key encrypted in `AppSetting` `hub_private_key` (same `encrypt` as the install secret), public key in `hub_public_key`. Both added to `HUB_KEYS`, so the generic settings endpoints never show them. Never regenerated unless missing |
|
||||
| Heartbeat | `protocolVersion: 2`, `product: "events"`, `publicKey` until the Hub has acknowledged it (`hub_public_key_ack`), Events stats as in v1. Body checked with `hub.heartbeatRequestSchema` before sending (a bug shows in tests, not as a 400 in production) |
|
||||
| Register | `/setup` and "Connect to Hub" register with v2 straight away (`product`, `install.publicKey`) |
|
||||
| Reply | Reads `linkedProducts` (§2) and the licence's `customerId` / `product`; everything else as v1 |
|
||||
| Falling back | If the Hub answers `400 UNSUPPORTED_PROTOCOL` (a Hub older than 2.0), send v1 and keep trying v2 once a day. Not expected in production; it keeps a restored old Hub from cutting installs off |
|
||||
|
||||
`hub-protocol.md` §6 "Moving an install to v2" is rewritten to describe this (both copies).
|
||||
|
||||
## 2. Linked products and Connect
|
||||
|
||||
**Settings → Linked products** (site admins only) lists the church's other installs from the
|
||||
last heartbeat's `linkedProducts` (cached in `AppSetting` `hub_linked_products`, so a Hub outage
|
||||
changes nothing; ROADMAP §5). For each: product name, address, and its state: **Not connected**
|
||||
· **Connected** (since when, by whom) · **Connected, last sync failed** (when, why).
|
||||
|
||||
With Events only, the page says the church has no other Cross Code products yet, with a link to
|
||||
crosscode.co.za.
|
||||
|
||||
### Connect
|
||||
|
||||
The Hub tells each install which siblings exist and their public keys. **Connect** turns that
|
||||
into a working link: a shared secret for signed calls between the two, and the feed settings.
|
||||
New contract: **`crosscode.link/1`** in `packages/contracts/src/link.ts`.
|
||||
|
||||
```
|
||||
A (Events) B (e.g. Website)
|
||||
admin clicks Connect
|
||||
makes a 32-byte secret S
|
||||
POST {B.url}/api/links/v1/connect ───────────────► 1. A is in B's own cached linkedProducts
|
||||
{ (same Hub customer), by installId
|
||||
schema: "crosscode.link/1", 2. the Ed25519 signature checks out against
|
||||
type: "link.connect", the publicKey the Hub listed for A
|
||||
from: { product, installId, url }, 3. `to.installId` is B; issuedAt within
|
||||
to: { installId }, 5 minutes; nonce not seen before
|
||||
secret: S, 4. stores S (encrypted), marks A connected
|
||||
issuedAt, nonce, ◄── 200 { schema, type: "link.connected",
|
||||
signature: <Ed25519 over the canonical JSON> from: {…B}, publicKey check, signature }
|
||||
}
|
||||
checks B's signed reply with B's Hub-listed key
|
||||
stores S (encrypted), marks B connected
|
||||
```
|
||||
|
||||
- **Trust comes from the Hub's list on both sides.** B accepts A only if A appears in *B's*
|
||||
`linkedProducts` with that exact key, so only installs of the same church can link, and only
|
||||
ones the Hub knows. The Hub is still not on the path at the time of the call (rule 2): both
|
||||
sides use their cached lists.
|
||||
- **No approval step on B.** Both installs belong to the same church; whoever is admin on either
|
||||
side can connect. B's Linked products page shows "Connected by Cross Events on 18 Nov" and
|
||||
either side can **Disconnect** (a signed `link.disconnect`; both drop the secret).
|
||||
- **Connecting again** replaces the secret (e.g. after a restored backup lost it).
|
||||
- After Connect, every call between the two (the `event.changed` webhook now, Accounts'
|
||||
back-channel later) uses `LINK_HEADERS` HMAC with S, as `@crosscode/contracts/signing` already
|
||||
defines.
|
||||
- Errors are `crosscode.link/1` `{ message, code }`: `NOT_LINKED` (A isn't in B's list: "Wait for
|
||||
the next Hub heartbeat, up to 15 minutes, or check the Hub"), `BAD_SIGNATURE`, `STALE_REQUEST`,
|
||||
`REPLAYED`, `WRONG_INSTALL`.
|
||||
- Key format: the Hub lists keys as PEM, while the agent helpers in `signing.ts` take raw
|
||||
base64url. contracts 1.4.0 adds `ed25519PublicFromPem` / `signLink` / `verifyLink` so no
|
||||
product converts by hand.
|
||||
- Events also **answers** Connect, since a Website will usually be the one clicking it.
|
||||
`POST /api/links/v1/connect` and `/disconnect` are public routes, rate-limited per IP, outside
|
||||
`/api/v2` (they're a cross-product contract, like the feed).
|
||||
|
||||
Stored per link in a new table, not in `AppSetting`:
|
||||
|
||||
```prisma
|
||||
model ProductLink {
|
||||
installId String @id // the sibling's Hub install id
|
||||
product String // website | app | accounts
|
||||
url String
|
||||
publicKey String // as listed by the Hub when connected
|
||||
secret String // encrypted
|
||||
connectedAt DateTime
|
||||
connectedBy String? // a user id when connected here, null when the sibling did it
|
||||
showEvents Boolean @default(false) // "Show events from" (§4)
|
||||
lastSyncAt DateTime?
|
||||
lastSyncError String?
|
||||
lastGoodAt DateTime?
|
||||
}
|
||||
```
|
||||
|
||||
If a sibling disappears from `linkedProducts` (uninstalled, or the licence moved), the link stays
|
||||
but shows **No longer listed by the Hub**. Its events keep showing until an admin removes the
|
||||
link, so a Hub mistake can't empty the church's event list.
|
||||
|
||||
## 3. Publishing: the feed
|
||||
|
||||
`GET /api/feed/v1/events?updatedSince=<ISO>` → `crosscode.event-feed/1` (ROADMAP §4,
|
||||
"Transport"). Public, no sign-in: it only carries what the public event pages already show. It
|
||||
answers only when **Publish my events** is on (default **on**; otherwise `404 FEED_OFF`).
|
||||
|
||||
### Which events
|
||||
|
||||
The same rule as the public pages, `publicEventWhere()` in `src/utils/series.js`: `isActive`, not
|
||||
`isHidden`, `goLiveAt` passed. Plus:
|
||||
|
||||
- Events that ended more than **30 days** ago are left out of a full fetch (no `updatedSince`).
|
||||
An event that ends doesn't go into `deleted`: siblings keep their copy and drop it from
|
||||
"upcoming" themselves.
|
||||
- An event's campus goes out as `campus: { slug, name }`, `null` for all campuses.
|
||||
- **Never** in the feed: kids check-in and volunteer options, contact name/phone/email (the
|
||||
church's contact for an event can be a person), the attendee form, prices of staff-only options.
|
||||
|
||||
### `updatedAt` and `deleted` that are actually right
|
||||
|
||||
An event's public face changes without its row changing: it goes live when `goLiveAt` passes,
|
||||
registration closes at the deadline, and it fills up as tickets sell. `Event.updatedAt` misses
|
||||
all three, and Events never deletes an event (`deleteEvent` deactivates it). So the feed is kept
|
||||
in a table of what was last published:
|
||||
|
||||
```prisma
|
||||
model FeedEntry {
|
||||
eventId String @id
|
||||
hash String // sha256 of the canonical crosscode.event/1 payload
|
||||
payload Json
|
||||
changedAt DateTime // the event's `updatedAt` in the feed
|
||||
removedAt DateTime? // set when it stops being public: goes into `deleted`
|
||||
}
|
||||
```
|
||||
|
||||
- A **`feed-refresh`** job (pg-boss, every 5 minutes, and queued straight after an event, option,
|
||||
session or registration change through the existing Prisma extension in `config/db.js`) builds
|
||||
each candidate event's `crosscode.event/1`, compares the hash and bumps `changedAt` only when
|
||||
something a sibling would see has changed. An event that stopped being public gets `removedAt`.
|
||||
- The feed answers from this table: `events` = rows with `changedAt > updatedSince` and no
|
||||
`removedAt`; `deleted` = rows with `removedAt > updatedSince`. With no `updatedSince`, every row
|
||||
without `removedAt`. Rows removed more than 90 days ago are cleaned up.
|
||||
- When the job changes anything, it sends **`event.changed`** (`eventChangedSchema`, at most 100
|
||||
ids) to every connected link, signed with that link's secret, using the retries and SSRF rules
|
||||
of `utils/webhooks.js` (1 min, 5 min, 30 min, 2 h, then give up; the 15-minute poll catches up).
|
||||
|
||||
### Building `crosscode.event/1` from an Event
|
||||
|
||||
A new `src/feed/toCrosscodeEvent.ts`, checked against `eventSchema` in tests for every e2e seed
|
||||
event:
|
||||
|
||||
| Field | From |
|
||||
|-------|------|
|
||||
| `id` | `Event.id` (already a UUID) |
|
||||
| `origin` | `{ product: "events", installId: hub_install_id, url: <APP_URL>/events/<id> }` |
|
||||
| `status` | `published` (Events has no "cancelled" state today: cancelling is deactivating, so it goes into `deleted`) |
|
||||
| `summary` | `null` (no such field yet) |
|
||||
| `description` | The plain-text description with markdown characters escaped, so it reads the same when rendered as markdown |
|
||||
| `imageUrl` | `picture`, made absolute |
|
||||
| `timezone` | The site timezone (`TIMEZONE`) |
|
||||
| `startsAt` / `endsAt` / `allDay` / `sessions` | `utils/sessions.js` (already keeps start/end in step with the sessions); `allDay: false` |
|
||||
| `location` | `{ name: location, address: null, onlineUrl: null }`, or `null` |
|
||||
| `series` | `{ id, name }` |
|
||||
| `tags` | `[]` (no tags in Events yet) |
|
||||
| `registration` | `mode`: `origin` when `requiresRegistration`, else `contact`; `url` the event page; `status` from the same rules as the event page (`not_open` before go-live, `closed` after the deadline or late-join cut-off, `full` when every limited main option is sold out, `waitlist` when full with a waitlist); `priceFrom` = the lowest current public price (early-bird and variants as in `eventSchema.ts` today), `null` when free |
|
||||
|
||||
## 4. Showing events from linked products
|
||||
|
||||
Per connected link: **Show events from this product** (off by default; ROADMAP §4 "Show events
|
||||
from"). When on:
|
||||
|
||||
- **Sync:** a `feed-sync` job per link every **15 minutes**, and straight away on a valid
|
||||
`event.changed` (`POST /api/feed/v1/changed`, verified with `LINK_HEADERS` and that link's
|
||||
secret). It fetches `?updatedSince=<lastGoodAt minus 5 minutes>`, 15 s timeout, parses with
|
||||
`parseEventFeed` (rejected events are logged, never block the rest), and upserts into
|
||||
`ImportedEvent`. One failing link never holds up another (separate jobs).
|
||||
- **The last good copy stays.** A failed sync only sets `lastSyncError`; admins see "Last synced
|
||||
2 hours ago" on Linked products and on the dashboard's event list.
|
||||
- **Read-only**, keyed by `origin.product` + `id` (`eventKey`), and **never re-published**: the
|
||||
feed only ever reads `Event`, so no loops (ROADMAP §4 rules).
|
||||
- Turning **Show events from** off, or removing the link, deletes that link's imported events.
|
||||
|
||||
```prisma
|
||||
model ImportedEvent {
|
||||
key String @id // eventKey(): "<product>:<id>"
|
||||
linkId String // ProductLink.installId
|
||||
payload Json // the crosscode.event/1 as received
|
||||
startsAt DateTime // copied out for sorting and "upcoming"
|
||||
endsAt DateTime
|
||||
campusSlug String?
|
||||
updatedAt DateTime
|
||||
@@index([linkId])
|
||||
@@index([startsAt])
|
||||
}
|
||||
```
|
||||
|
||||
**Where they show:** on the public **Events** list, the home page's upcoming events and campus
|
||||
pages (by `campus.slug`, when it matches one of Events' campuses; otherwise under all campuses),
|
||||
mixed in by date, with a small "From the church website" label. Not in the dashboard's event
|
||||
tools, reports, check-in or anything that registers people.
|
||||
|
||||
**Their page:** `/events/linked/<product>/<id>`: title, dates, sessions, place, image, the
|
||||
description rendered as markdown with HTML off (`react-markdown`, new dependency), and one button
|
||||
by `registration.mode`: **More details** / **Register** linking to the origin (`origin` /
|
||||
`external`), or the contact instructions (`contact`). The page has
|
||||
`<link rel="canonical">` to `origin.url` (ROADMAP §11, "Imported events"), is left out of
|
||||
`sitemap.xml`, and has no `Event` JSON-LD (the origin's page carries it, so search engines see
|
||||
one event).
|
||||
|
||||
## 5. `packages/seo`
|
||||
|
||||
A new workspace, `@crosscode/seo` (ROADMAP §11): the schema.org builders and meta helpers every
|
||||
product will use, built on `@crosscode/contracts`. Pure functions, no framework, ESM + CJS like
|
||||
contracts, its own Jest tests.
|
||||
|
||||
| Export | What |
|
||||
|--------|------|
|
||||
| `eventJsonLd(event: CrosscodeEvent, opts)` | `Event` JSON-LD from `crosscode.event/1`: `eventStatus` (`EventCancelled` for `cancelled`), attendance mode (`OnlineEventAttendanceMode` / `Mixed…` from `location.onlineUrl`), `Place` or `VirtualLocation`, `offers` from `registration` (`SoldOut` for `full`, `validFrom` from `opensAt`), sessions as `subEvent` |
|
||||
| `churchJsonLd(church: Church)` | `Church` (a schema.org `Organization` subtype): name, logo, address, geo, phone, service times as `openingHoursSpecification`-style `Event` entries, `sameAs` social links. Used for the Website's home page later; Events uses it as the event `organizer` |
|
||||
| `canonicalUrl(base, path)` | Drops tracking parameters (`src`, `utm_*`, `fbclid`, `gclid`) and the trailing slash rule in one place |
|
||||
| `pageMeta({ title, description, … })` | Title length and description trimming rules (60 / 155 characters), used for the Website's warnings later |
|
||||
|
||||
**Events moves onto it:** `frontend/src/lib/eventSchema.ts` is replaced. The public event detail
|
||||
answer gains `crosscodeEvent` (the same builder as the feed, §3), and the page calls
|
||||
`eventJsonLd` with it. **Nothing gets worse for Google:** today's JSON-LD gives a price *range*
|
||||
(`AggregateOffer` low–high); `crosscode.event/1` only has `priceFrom`. `eventJsonLd` takes an
|
||||
optional `priceRange` for the origin's own page, so Events keeps sending the high price. A
|
||||
snapshot test compares the old and new JSON-LD for each seed event; the only allowed
|
||||
differences are additions (`subEvent`, `organizer` as a `Church`).
|
||||
|
||||
The `organizer` comes from a `crosscode.church/1` that Events builds from its own site settings
|
||||
(name, logo, colours, contact email). Sharing that profile with siblings is not part of 2.4.0
|
||||
(see [Still open](#still-open)).
|
||||
|
||||
## 6. Settings, audit log and help
|
||||
|
||||
- **Settings → Linked products** (new page): the list, Connect / Disconnect, **Show events
|
||||
from**, last sync. **Settings → Site → Publish my events** (on by default) with one line on
|
||||
what it shares ("Your public events, as they appear on your events page. Never anyone's
|
||||
details.").
|
||||
- **Audit log** (`utils/adminAudit.js`): `product_link_connected`, `product_link_disconnected`,
|
||||
`feed_publish_toggled`, `feed_show_toggled`. Connections made by the sibling are logged with
|
||||
no user.
|
||||
- **Help:** a "Linked products" help article, and the setting descriptions. **What's new** for
|
||||
2.4.0: "Ready for the Church Website and App: your events can show on them, and theirs here.
|
||||
Nothing changes until you have them."
|
||||
- **Readiness checks** (`utils/readiness.js`): warn when a link's last sync failed for more than
|
||||
a day.
|
||||
|
||||
## 7. What changes in each repo
|
||||
|
||||
| Repo | Change | Version |
|
||||
|------|--------|---------|
|
||||
| `crosscode-platform` `packages/contracts` | `crosscode.link/1` (`link.ts`: connect, connected, disconnect, errors), optional `publicKey` on the v2 heartbeat, `ed25519PublicFromPem` / `signLink` / `verifyLink`, JSON Schema and samples for each | `contracts@1.4.0` |
|
||||
| `crosscode-platform` `packages/seo` | New (§5) | Not tagged on its own: a workspace, versioned with its first user like `ui` |
|
||||
| `crosscode-platform` `apps/events` | §1–§6. Migrations: `ProductLink`, `FeedEntry`, `ImportedEvent`. New deps: `@crosscode/contracts`, `@crosscode/seo` (workspace), `react-markdown` | `events@2.4.0` |
|
||||
| `crosscode-platform` `docs/` | `hub-protocol.md` §6 (heartbeat `publicKey`, moving to v2), ROADMAP §9 phase 2 marked done, HANDOVER | — |
|
||||
| `events-hub` | v2 heartbeat accepts and saves `publicKey` (`409 PUBLIC_KEY_MISMATCH` for a different one), **Clear public key** button on the install page (2FA again, audited), vendored `contracts-1.4.0.tgz`, its copy of `hub-protocol.md` | Hub `v2.2.0` |
|
||||
| `crosscode-site` | "Works with the Church Website and App" on the Cross Events page, marked coming (`src/data/cross-events.mjs`) | `v1.4.0` |
|
||||
|
||||
New `.env` variables: **none planned.** If one turns up, it goes in all three templates
|
||||
(HANDOVER, "Things to remember").
|
||||
|
||||
## 8. Testing
|
||||
|
||||
**Unit and integration (Jest, in `npm run check`):**
|
||||
|
||||
- contracts: `crosscode.link/1` samples parse; `signLink` / `verifyLink` refuse a changed body,
|
||||
another key, a stale `issuedAt` and a replayed nonce.
|
||||
- seo: `eventJsonLd` / `churchJsonLd` for every contract sample; the old-vs-new snapshot (§5).
|
||||
- Events, Hub client: the v2 heartbeat body passes `hub.heartbeatRequestSchema`; the key pair is
|
||||
made once; `publicKey` stops being sent after the ack; falling back to v1 on
|
||||
`UNSUPPORTED_PROTOCOL`.
|
||||
- Events, feed: every e2e seed event passes `eventSchema`; hidden, inactive, not-yet-live and
|
||||
kids/volunteer data never appear; `updatedSince` returns exactly what changed, including
|
||||
go-live, deadline and selling out with no `Event` row change; deactivating puts it in
|
||||
`deleted`; feed off → `404 FEED_OFF`.
|
||||
- Events, Connect: accepted from a listed sibling; refused when not listed, with a key other
|
||||
than the listed one, stale, replayed or for another install; disconnect from either side.
|
||||
- Events, sync: a sample Website feed with one invalid event (the rest import, the bad one is
|
||||
logged); the source down (last copy kept, error shown); `event.changed` with a bad signature
|
||||
refused; imported events never in our own feed.
|
||||
- Hub (`events-hub`): v2 heartbeat with a key saves it; the same key is fine; a different one is
|
||||
`409`; Clear lets a new one in.
|
||||
|
||||
**e2e (Playwright, `apps/events/e2e`):** a small fake "Website" (a fixture server in the e2e
|
||||
setup serving `samples/event-feed.json` and answering Connect) to click through Linked products
|
||||
→ Connect → Show events from → the imported event on `/events` → its page with the canonical link
|
||||
and the origin's button; `sitemap.xml` doesn't list it. The §11 checks (title, description,
|
||||
canonical, `og:image`, one `<h1>`, JSON-LD parses) on the event page and the imported event page.
|
||||
|
||||
**On the VM** (as in AGENT-1.0-PLAN §13), before tagging: two installs of Events can't be linked
|
||||
(one per product per customer), so the VM run uses the fake Website from e2e as a second site
|
||||
behind frp, against Hub 2.2.0. Check: an existing 2.3.x install updated through the agent moves
|
||||
itself to v2 and appears with a key on the Hub; Connect works across the two servers; turning
|
||||
the fake Website off keeps its events showing with "last synced".
|
||||
|
||||
## 9. Releasing and rolling it out
|
||||
|
||||
Order, each with its CHANGELOG entry and `npm run check` first:
|
||||
|
||||
1. `contracts@1.4.0` (platform), then the packed `.tgz` into `events-hub/backend/vendor/`.
|
||||
2. Hub `v2.2.0`, deployed (`events-hub/deployment.md`).
|
||||
3. `events@2.4.0` (its `WHATS-NEW.md` heading needs no `requires`: against a Hub before 2.2.0 it
|
||||
still works, only Linked products stays empty).
|
||||
4. crosscode-site `v1.4.0`, deployed.
|
||||
5. Each church updated through the Hub (a scheduled update, ROLLOUT-1.0 §5).
|
||||
|
||||
## Decisions
|
||||
|
||||
Proposed in this plan, to confirm before building:
|
||||
|
||||
1. **Moving to v2 needs no admin action:** the v2 heartbeat carries the install's public key
|
||||
(optional field), instead of re-registering with the licence key (§1). Needs Hub 2.2.0.
|
||||
2. **Connect needs no approval on the other side**, and trust comes from each side's own cached
|
||||
Hub list (§2).
|
||||
3. **Publish my events is on by default** (it only shares what the public pages already show);
|
||||
**Show events from** is off by default per link.
|
||||
4. **The feed is built from a `FeedEntry` table**, not straight from `Event`, so go-live,
|
||||
deadlines and selling out are reported as changes (§3).
|
||||
5. **Imported events get their own page** in Events with a canonical link to the origin, rather
|
||||
than linking straight out from the list (§4).
|
||||
6. Ended events stay out of `deleted`; a full fetch covers events that ended up to 30 days ago.
|
||||
|
||||
## Still open
|
||||
|
||||
- **Who owns the church profile (`crosscode.church/1`)** once there's more than one product?
|
||||
Events builds one from its own settings for its JSON-LD in 2.4.0, but doesn't serve it to
|
||||
siblings. The Website (phase 4) is the natural owner; decide before phase 4.
|
||||
- **Event `summary` and `tags`** go out empty because Events has no such fields. Add them in a
|
||||
later 2.x if the Website's event cards need them.
|
||||
- **A "cancelled" state in Events** (shown as cancelled rather than disappearing) would map to
|
||||
`status: "cancelled"`. Not in 2.4.0.
|
||||
+59
-27
@@ -1,21 +1,21 @@
|
||||
# Handover — Cross Code, all products
|
||||
|
||||
Last updated: 2026-11-12. **The plan is [ROADMAP-v3.md](./ROADMAP-v3.md)** (decided 2026-11-03,
|
||||
Last updated: 2026-11-18. **The plan is [ROADMAP-v3.md](./ROADMAP-v3.md)** (decided 2026-11-03,
|
||||
decisions table near the end). This file says where each phase stands and what comes next.
|
||||
Product-specific notes (where the code lives, known gaps) stay with each product: Cross Events'
|
||||
are in `hope-events/docs/HANDOVER.md` (`apps/events/docs/HANDOVER.md` from Events 2.2.0), and
|
||||
the Hub's are in `events-hub/docs/`.
|
||||
are in [`apps/events/docs/HANDOVER.md`](../apps/events/docs/HANDOVER.md), and the Hub's are in
|
||||
`events-hub/docs/` and `events-hub/deployment.md`.
|
||||
|
||||
The docs for every product are here in `docs/`: the roadmap, the Hub protocol
|
||||
([hub-protocol.md](./hub-protocol.md), with a copy in `events-hub`), this handover and the plans
|
||||
for each phase. They moved here from `hope-events/docs/` on 2026-11-05.
|
||||
([hub-protocol.md](./hub-protocol.md), with a copy in `events-hub`), this handover, the plans
|
||||
for each phase and the rollout checklist ([ROLLOUT-1.0.md](./ROLLOUT-1.0.md)).
|
||||
|
||||
## Repos
|
||||
|
||||
| Repo | What |
|
||||
|------|------|
|
||||
| `joshua/crosscode-platform` (this one) | Contracts, the apps (Accounts, Website, App, and Events from 2.2.0), shared packages, the `crosscode` script (from Events 2.2.0), the server agent (`apps/agent`, phase 1d), and these docs |
|
||||
| `joshua/hope-events` | Cross Events up to 2.1.x. Archived after the 2.2.0 move |
|
||||
| `joshua/crosscode-platform` (this one) | Contracts, the apps (Events from 2.2.0; Accounts, Website and App to come), shared packages, the `crosscode` script (`scripts/`), the server agent (`apps/agent`), and these docs |
|
||||
| `joshua/hope-events` | Cross Events up to 2.1.x. Frozen; archived once every install is adopted (EVENTS-2.2-PLAN §7) |
|
||||
| `joshua/events-hub` | Cross Code Hub. Its own server, its own `scripts/deploy.sh` |
|
||||
| `joshua/crosscode-site` | crosscode.co.za. Updated at the end of every phase that changes what it says (ROADMAP §9) |
|
||||
|
||||
@@ -23,26 +23,48 @@ for each phase. They moved here from `hope-events/docs/` on 2026-11-05.
|
||||
|
||||
| Phase | What | State |
|
||||
|-------|------|-------|
|
||||
| 0 | contracts 1.0.0 / 1.1.0 | **Released** 2026-11-04 (`contracts@1.0.0`, `contracts@1.1.0`). Not published to a registry (decision 22): the Hub gets a packed release committed to its repo |
|
||||
| 1 | Hub 2.0.0 | **Released** 2026-11-05 (`events-hub` `v2.0.0`; `docs/HUB-2.0-PLAN.md` there). **Not deployed yet:** `events-hub/deployment.md` → "Upgrading to 2.0" (run `check-hub2` first). crosscode-site's address prices are merged, **not deployed yet** |
|
||||
| 1b | Cross Events 2.2.0: moves here as `apps/events`, `crosscode` script | **In progress.** Planned in [EVENTS-2.2-PLAN.md](./EVENTS-2.2-PLAN.md). **Steps 1–3 done 2026-11-12** (merged into `main`): history merged in under `apps/events` (from `hope-events` `e6c9670`), workspaces and one root lockfile with versions pinned to 2.1.1, same test results as 2.1.1 (711 backend tests, typecheck, both builds). **The `crosscode` script and `adopt` (§4–5) are written** (branch `feat/crosscode-script`, 2026-11-12; shellcheck and 47 bats tests pass, not yet run on a server). **Tagged `events@2.2.0` on 2026-11-17, before the VM testing (Joshua's call), with two additions: AI use in tokens and the backend under `/api` (Hub `v2.0.1` and crosscode-site `v1.2.0` released with them).** **Still to do:** VM testing (§6) of the tagged release, adopting each install, archiving `hope-events` (§7). Until then servers keep deploying from `hope-events` `v2.1.1`, and **Events work happens here** (`hope-events` is frozen; a hotfix there as 2.1.2 is cherry-picked into `apps/events`) |
|
||||
| 1c | Cross Events 2.3.0: authenticator app 2FA (TOTP + recovery codes) | TOTP not started (`TwoFactorMethod` enum in Events' `prisma/schema.prisma`). |
|
||||
| 1d | Agent 1.0.0 + Hub 2.1.0 (+ contracts 1.3.0): server agent, installs / scheduled updates / uninstalls from the Hub, server stats | **Built 2026-11-18, not released.** crosscode-platform branch `feat/agent-1.0` (contracts 1.3.0, the crosscode script with `--json`, env templates, frpc, restart / export / uninstall / purge, Events env template + export + `HUB_LICENCE_KEY`, `apps/agent`), events-hub branch `feat/servers-agent` (Hub 2.1.0). All unit and script tests pass. **Still to do:** the VM tests (AGENT-1.0-PLAN §13, together with EVENTS-2.2-PLAN §6), then release and roll out (§14). |
|
||||
| 2 | Cross Events 2.4.0: protocol v2, Linked products, event feed, `packages/seo` | Not started. Events keeps speaking protocol 1 until then |
|
||||
| 0 | contracts 1.0.0 / 1.1.0 | **Released** 2026-11-04. Not published to a registry (decision 22): the Hub gets a packed release committed to its repo (`backend/vendor/`) |
|
||||
| 1 | Hub 2.0.x | **Released** (`v2.0.0` 2026-11-05, `v2.0.1` AI tokens and `v2.0.2` refunds / voiding refunded invoices, 2026-11-17). **Not deployed yet:** `events-hub/deployment.md` → "Upgrading to 2.0" (run `check-hub2` first). Deploy straight to the latest 2.1.x (below) |
|
||||
| 1b | Cross Events 2.2.0: moved here as `apps/events`, the `crosscode` script | **Released** 2026-11-17 (`events@2.2.0`, with AI use in tokens and the backend under `/api`). **VM tested 2026-11-17** (EVENTS-2.2-PLAN §6, all passing after fixes). **Not rolled out:** servers still run `hope-events` `v2.1.1` until each install is adopted |
|
||||
| 1c | Cross Events 2.3.x: authenticator app 2FA (TOTP + recovery codes) | **Released** 2026-11-17 (`events@2.3.0`). **`events@2.3.1`** 2026-11-18: Next.js 16.4.6 (security advisories for 16.2.0–16.4.4), so roll out 2.3.1, not 2.3.0. crosscode-site `v1.3.0` lists it (merged and tagged, **not deployed**) |
|
||||
| 1d | Agent 1.0.x + Hub 2.1.x (+ contracts 1.3.0) | **Released** 2026-11-17 (`agent@1.0.0`, `contracts@1.3.0`, Hub `v2.1.0`). **VM tested** end to end (AGENT-1.0-PLAN §13: joins, installs behind frp, scheduled / batch / missed updates, uninstall with export and purge, forged and replayed jobs). 2026-11-18: **`agent@1.0.1`** (the agent answers status on the central server itself) and Hub **`v2.1.1`** (adopt passes the church's address; Link takes the short name as a name). **Not rolled out**: use agent 1.0.1 and Hub 2.1.1 |
|
||||
| 2 | Cross Events 2.4.0: protocol v2, Linked products, event feed, `packages/seo` (+ contracts 1.4.0, Hub 2.2.0) | **Planned** 2026-11-18: [EVENTS-2.4-PLAN.md](./EVENTS-2.4-PLAN.md), with six decisions to confirm before building. Events keeps speaking protocol 1 until then |
|
||||
| 3–7 | Accounts 1.0.0 → Website 1.0.0 → Events 3.0.0 → App 1.0.0 → App 1.x | Not started |
|
||||
|
||||
## Next up
|
||||
|
||||
1. **Deploy Hub 2.0.0** and **crosscode-site** (the address prices). This finishes phase 1 and is
|
||||
needed before 2.2.0, because Hub 1.7 can't see `events@…` tags.
|
||||
2. **Cross Events 2.2.0**: [EVENTS-2.2-PLAN.md](./EVENTS-2.2-PLAN.md). Decided 2026-11-05:
|
||||
`adopt` builds next to the running install and switches over, and `adopt --undo` is built
|
||||
(ROADMAP decisions 25–26).
|
||||
3. **Agent 1.0.0 + Hub 2.1.0** (phase 1d): [AGENT-1.0-PLAN.md](./AGENT-1.0-PLAN.md). Before the
|
||||
first install through it: check `proxy_bind_addr = 127.0.0.1` in `frps.ini` on the central
|
||||
server (worth doing now: without it, tunnel ports such as `:5000` may be reachable straight from
|
||||
the internet), and set each server's database settings and `TRUST_PROXY` in the Hub.
|
||||
4. **Cross Events 2.3.0** (authenticator app 2FA), then 2.4.0, as in ROADMAP §9.
|
||||
1. **Roll out**, in the order in [ROLLOUT-1.0.md](./ROLLOUT-1.0.md) (with the latest patch
|
||||
releases: Hub 2.1.1, agent 1.0.1, Events 2.3.1): Hub 2.1 (make and back up
|
||||
the job-signing key first) → the central server's agent (check `proxy_bind_addr = 127.0.0.1`)
|
||||
→ each church server's agent → **adopt** the demo site, then each church (Link existing → Move
|
||||
onto the monorepo) → a throwaway New install to prove FASTPANEL, DNS and Let's Encrypt.
|
||||
2. **Deploy crosscode-site `v1.3.0`** (secure sign-in in the features and the brochure).
|
||||
3. **Archive `hope-events`** once every install reports 2.2.0 or later (EVENTS-2.2-PLAN §7).
|
||||
4. **Cross Events 2.4.0** (phase 2): confirm the decisions in
|
||||
[EVENTS-2.4-PLAN.md](./EVENTS-2.4-PLAN.md), then build it in its order (contracts 1.4.0 →
|
||||
Hub 2.2.0 → Events 2.4.0 → crosscode-site 1.4.0). It can be built during the rollout; releasing
|
||||
it needs Hub 2.2.0 deployed.
|
||||
|
||||
## The VM test (2026-11-17)
|
||||
|
||||
Everything above was run on a WSL Ubuntu 24.04 VM before release: a church server, a "central"
|
||||
network namespace running frps with `proxy_bind_addr`, the Hub (`feat/servers-agent`) and local
|
||||
git mirrors standing in for c-git. It found nine bugs, all fixed with tests before tagging. None
|
||||
lost data, because each failed safely:
|
||||
|
||||
1. `adopt` refused a release with new migrations (it now applies them in the switch-over).
|
||||
2. A failed migration blocked every later deploy (Prisma P3009; now marked rolled back).
|
||||
3. The agent install skipped the root's build tools (`npm ci --include-workspace-root`).
|
||||
4. A failed install's short name couldn't be used again.
|
||||
5. The Hub didn't save the servers settings (install defaults, port range, central IP).
|
||||
6. frpc only reads its admin lines when it starts (restarted once the first time).
|
||||
7. **A site's PM2 belonged to the agent's service**, so stopping or updating the agent took down
|
||||
every site it had installed. PM2 now always runs under `pm2-<user>`.
|
||||
8. Update and closing banners never reached Hub-installed sites (registration now links them).
|
||||
9. A moved tag blocked a church's deploys (tags are fetched with `--force`).
|
||||
|
||||
Not covered by the VM: FASTPANEL, real DNS, Let's Encrypt. Hence the throwaway install in the
|
||||
rollout.
|
||||
|
||||
## Things to remember across phases
|
||||
|
||||
@@ -51,10 +73,20 @@ for each phase. They moved here from `hope-events/docs/` on 2026-11-05.
|
||||
`backend/src/utils/billing/tiers.js`) in the same phase, so the site and the Hub never disagree.
|
||||
- **A phase isn't done until crosscode-site matches it** (ROADMAP §9, "Updating crosscode-site").
|
||||
- Servers stay **PM2 + nginx** (no Docker), with one database per product per church, under
|
||||
`/var/www/sites/<church>/<product>`.
|
||||
`/var/www/sites/<church>/<product>`. Each site user's PM2 runs as a systemd unit,
|
||||
`pm2-<user>`; the `crosscode` script makes sure of it before any PM2 command.
|
||||
- **The agent pins the Hub's job key** when it joins. Back up `events-hub/backend/keys/` (licence
|
||||
and job keys); replacing the job key means every server joins again.
|
||||
- **A new `.env` variable** goes in three env templates: `apps/<product>/env.template.json`,
|
||||
`scripts/products/<product>.env.template.json` and the Hub's `envTemplates/<product>.json`.
|
||||
- **A new Events install never takes over an existing database**: moving an existing site is
|
||||
`adopt`, not a New install pointed at the old database.
|
||||
- **Prisma in the monorepo:** each app other than Events sets its own generator `output`, so
|
||||
hoisted clients don't overwrite each other (EVENTS-2.2-PLAN §2).
|
||||
- **AI for a church:** set the licence's monthly AI cap above R0 on the Hub; with no cap the
|
||||
buttons don't show (rules in Events' handover, "AI rules").
|
||||
- **Releasing:** branch → merge → tag (`<product>@<version>`) → push, with a CHANGELOG entry, and
|
||||
`npm run check` first. Pushes to c-git often fail authentication the first time; retry once.
|
||||
buttons don't show (rules in Events' handover, "AI rules"). Churches see tokens; only the Hub
|
||||
shows rand (markup 15% by default).
|
||||
- **Releasing:** branch → merge → tag (`<product>@<version>` here, `v<version>` in events-hub and
|
||||
crosscode-site) → push, with a CHANGELOG entry, and `npm run check` first. Pushes to c-git often
|
||||
fail authentication the first time; retry once. A push can also hang waiting on a login prompt
|
||||
after it has already gone through: check with `git ls-remote` before pushing again.
|
||||
|
||||
+4
-4
@@ -613,10 +613,10 @@ Planned in [AGENT-1.0-PLAN.md](./AGENT-1.0-PLAN.md). In short:
|
||||
|-------|---------|------|----------------|
|
||||
| 0 | contracts 1.0.0 | `crosscode.event/1`, `crosscode.church/1`, `crosscode.identity/1`, Hub protocol v2: schemas, generated JSON Schema, docs, sample payloads, the monorepo set up. **Released 2026-11-04** | Everything else depends on them |
|
||||
| 1 | **Hub 2.0.0** | Cross Code Hub: products, licence per product, per-customer billing with bundles, protocol v2 (v1 still accepted), sibling discovery, AI usage per product, **releases per product with requirements** (§5), contracts as a committed file (§2). **Released 2026-11-05** (crosscode-site address prices merged) | Must exist before a second product is sold, and before Events releases come from the monorepo |
|
||||
| 1b | **Cross Events 2.2.0** | **Moves into the monorepo** as `apps/events`, with its git history (merged in, not copied); its packages become workspaces; the **`crosscode` script** (`deploy`, `status`, `install`, `adopt`; §8) replaces `scripts/deploy.sh` and `scripts/install.sh`; every install moved with `crosscode adopt`; `hope-events` archived. Planned with no feature changes; two small ones were added on 2026-11-17 (decided by Joshua): **AI use shown in tokens**, never rand, outside the Hub (needs Hub 2.0.1), and **everything the backend serves under `/api`**, so a site and its API share one address and one proxy rule. **Tagged 2026-11-17, before the VM testing** | Before more products, so every product is released and deployed the same way from the start |
|
||||
| 1c | **Cross Events 2.3.0** | **Authenticator app 2FA** (TOTP) next to email and WhatsApp, with recovery codes; admins can see which method each staff account uses. | Independent and useful now; the Accounts migration later carries it over |
|
||||
| 1d | **Agent 1.0.0 + Hub 2.1.0** (contracts 1.3.0) | **Server agent** on every server (polls only, signed jobs, runs the `crosscode` script); Hub: Servers page with stats and alerts, server configuration, frp port list, New install with a choice of server, scheduled / emergency / batch updates with notice to the church, uninstall with an encrypted JSON export, emailed reports. [AGENT-1.0-PLAN.md](./AGENT-1.0-PLAN.md) | Right after 1b (it runs the `crosscode` script), so every new church from then on is installed from the Hub. Can run alongside 1c |
|
||||
| 2 | **Cross Events 2.4.0** | Reports `product: "events"` (protocol v2), **Linked products**, the event feed (publish + show events from siblings), `packages/seo` (§11) with canonical links for imported events | Small; ready for when the Website exists |
|
||||
| 1b | **Cross Events 2.2.0** | **Moves into the monorepo** as `apps/events`, with its git history (merged in, not copied); its packages become workspaces; the **`crosscode` script** (`deploy`, `status`, `install`, `adopt`; §8) replaces `scripts/deploy.sh` and `scripts/install.sh`; every install moved with `crosscode adopt`; `hope-events` archived. Planned with no feature changes; two small ones were added on 2026-11-17 (decided by Joshua): **AI use shown in tokens**, never rand, outside the Hub (needs Hub 2.0.1), and **everything the backend serves under `/api`**, so a site and its API share one address and one proxy rule. **Tagged 2026-11-17, before the VM testing; VM tested the same day** | Before more products, so every product is released and deployed the same way from the start |
|
||||
| 1c | **Cross Events 2.3.0** | **Authenticator app 2FA** (TOTP) next to email and WhatsApp, with recovery codes; admins can see which method each staff account uses. **Released 2026-11-17** (`events@2.3.0`) | Independent and useful now; the Accounts migration later carries it over |
|
||||
| 1d | **Agent 1.0.0 + Hub 2.1.0** (contracts 1.3.0) | **Server agent** on every server (polls only, signed jobs, runs the `crosscode` script); Hub: Servers page with stats and alerts, server configuration, frp port list, New install with a choice of server, scheduled / emergency / batch updates with notice to the church, uninstall with an encrypted JSON export, emailed reports. [AGENT-1.0-PLAN.md](./AGENT-1.0-PLAN.md). **Released 2026-11-17** after the VM test; rollout in [ROLLOUT-1.0.md](./ROLLOUT-1.0.md) | Right after 1b (it runs the `crosscode` script), so every new church from then on is installed from the Hub. Can run alongside 1c |
|
||||
| 2 | **Cross Events 2.4.0** | Reports `product: "events"` (protocol v2), **Linked products**, the event feed (publish + show events from siblings), `packages/seo` (§11) with canonical links for imported events. **Planned 2026-11-18:** [EVENTS-2.4-PLAN.md](./EVENTS-2.4-PLAN.md) (also needs contracts 1.4.0 and Hub 2.2.0, for a public key in the v2 heartbeat) | Small; ready for when the Website exists |
|
||||
| 3 | **Accounts 1.0.0** | OIDC provider, sign-in, 2FA (email, WhatsApp, authenticator app), password reset, consent and notice, export / delete fan-out, admin, install script | The Website is built on it from day one |
|
||||
| 4 | **Church Website 1.0.0** | Public site with the **four templates** (§6), admin, simple events + feed, SEO (§11), Hope Family Church as the first church, then a second test church on a different template to prove it repeats | More churches need a website than an app; it also covers the "website only" case |
|
||||
| 5 | **Cross Events 3.0.0** | Sign-in moves to Accounts; user migration keeping password hashes; migration guide | Breaking change, so a major version, after Accounts is proven on the Website |
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
# Rollout: Hub 2.1, the agent and Events 2.3 on the real servers
|
||||
|
||||
The order to move the live servers onto the agent, so that installs, updates and uninstalls are run
|
||||
from the Hub. Each step can be stopped after without leaving anything half done. Tested end to end
|
||||
on a VM (WSL: a church server, a central server with frps, the Hub) on 2026-11-17; the real servers
|
||||
add FASTPANEL, real DNS and Let's Encrypt, which the VM didn't have, so step 6 starts with a
|
||||
throwaway church.
|
||||
|
||||
Releases: `events@2.3.0`, `contracts@1.3.0`, `agent@1.0.0` (crosscode-platform), Hub `v2.1.0`,
|
||||
crosscode-site `v1.3.0`.
|
||||
|
||||
## Before you start
|
||||
|
||||
- [ ] A backup of the Hub's database and `backend/keys/` (the licence key).
|
||||
- [ ] A backup of each church's database (`pg_dump`) and `uploads/`. `adopt` and `deploy` take
|
||||
their own backups too, but keep one that's yours.
|
||||
- [ ] Know your frp port range (`allow_ports` in `frps.ini`) and which ports your hand-written
|
||||
tunnels use.
|
||||
|
||||
## 1. The Hub (2.1.0)
|
||||
|
||||
Follow `events-hub/deployment.md` → "Upgrading to 2.1":
|
||||
|
||||
- [ ] `npm run generate-keys -- --job` in `backend/`; back up `keys/hub-job-key.pem` with the
|
||||
licence key. **Agents pin this key when they join**: losing or replacing it means every server
|
||||
joins again.
|
||||
- [ ] `.env`: `HUB_JOB_SIGNING_KEY_FILE=./keys/hub-job-key.pem` and
|
||||
`HUB_PUBLIC_URL=https://hub.crosscode.co.za`.
|
||||
- [ ] `bash scripts/deploy.sh v2.1.0`.
|
||||
- [ ] Servers → Ports & defaults: the port range, the central server's IP, the install defaults.
|
||||
Mark every port a hand-written tunnel uses as taken.
|
||||
|
||||
## 2. The central server (frps)
|
||||
|
||||
- [ ] `frps.ini` has `proxy_bind_addr = 127.0.0.1` (tunnelled ports are then only reachable by
|
||||
nginx on that server). Restart frps and check every FASTPANEL site still answers.
|
||||
- [ ] Hub → Servers → Add server → **Central**; run the command it shows as root. It's read-only:
|
||||
it checks a new install's ports in frps and watches frps.
|
||||
- [ ] Within a minute the server shows on Servers with its stats.
|
||||
|
||||
## 3. Each church server
|
||||
|
||||
- [ ] Hub → Servers → Add server → **Church**; run the command as root. It installs Node tools,
|
||||
the agent (`/opt/crosscode/agent`) and the crosscode script (`/opt/crosscode/tools`, from
|
||||
main), and starts `crosscode-agent`. The agent listens on nothing.
|
||||
- [ ] On the server's page: its configuration. `TRUST_PROXY=loopback` behind frp; the database:
|
||||
`DB_HOST`/`DB_PORT`/`DB_ADMIN_URL` for a separate PostgreSQL, or nothing for the local one.
|
||||
- [ ] `systemctl status crosscode-agent` is active; the server's stats show on the Hub.
|
||||
- [ ] The first time the agent changes `frpc.ini` it adds the admin lines and **restarts frpc once**
|
||||
(every tunnel on that server drops for a few seconds). Do the first install on a quiet
|
||||
evening. Later changes only reload frpc.
|
||||
|
||||
## 4. Existing sites (the demo site and the churches): adopt, don't reinstall
|
||||
|
||||
Moving a site you already run onto the monorepo is `adopt`. It keeps the same database, uploads,
|
||||
`.env`, ports and nginx site; it only swaps the code and PM2 underneath, with a backup and an undo.
|
||||
|
||||
A New install can't take over an existing database: it refuses a database or role that already
|
||||
exists, so that it can never overwrite a church's data. "Install new and point it at the old
|
||||
database" would therefore stop at that check.
|
||||
|
||||
For each site:
|
||||
|
||||
- [ ] Servers → Installs → **Link existing**: the server, its folder name and its two ports.
|
||||
- [ ] **Move onto the monorepo** (an `adopt` job): planned at least 4 hours ahead; the church gets
|
||||
the email and banner. Start with the demo site.
|
||||
- [ ] After it: the site answers, `crosscode status` on the server shows it on `events@2.3.0`, its
|
||||
PM2 runs as `pm2-<user>` under systemd.
|
||||
- [ ] If something's wrong: the job's page has the log. `crosscode adopt <church> --undo` on the
|
||||
server puts the old install back (for 14 days).
|
||||
|
||||
## 5. Updates from then on
|
||||
|
||||
- [ ] Updates → pick installs and a version → a time at least 4 hours ahead (or an emergency
|
||||
update: 15 minutes, a reason and your 2FA code). A batch runs one church at a time and stops at
|
||||
the first failure; a failed update rolls back by itself.
|
||||
- [ ] An agent that's offline when a job is due doesn't run it late: the job is **missed** and
|
||||
you plan it again (the church gets a new notice).
|
||||
|
||||
## 6. New churches
|
||||
|
||||
- [ ] First, a throwaway church on a real server (a test domain): New install → the report email
|
||||
with the FASTPANEL steps → add the nginx site with its two ports → **Proxy done** → live.
|
||||
Uninstall it after (it exports first; check the download link works).
|
||||
- [ ] Then real churches the same way.
|
||||
|
||||
## 7. Decommissioning the old setup
|
||||
|
||||
Only after every site is adopted and has run on 2.3.0 for a while:
|
||||
|
||||
- [ ] Each adopted site keeps its old folder 14 days for `adopt --undo`. After that, `crosscode
|
||||
status` warns about it and shows the `rm -rf` to remove it; once removed, undo isn't possible.
|
||||
- [ ] The archived `hope-events` repo stays read-only (its `v…` tags are the history).
|
||||
- [ ] Old PM2 processes or cron jobs from the hand-run deploys: check `pm2 ls` for each site user
|
||||
shows only `<church>-events-backend` and `<church>-events-frontend`.
|
||||
|
||||
## If something goes wrong
|
||||
|
||||
| Symptom | Look at |
|
||||
|---|---|
|
||||
| A server doesn't show on the Hub | `journalctl -u crosscode-agent`; the server can reach `HUB_PUBLIC_URL` |
|
||||
| A job is refused by the agent | The job key changed (the server must join again) or the server's clock is off |
|
||||
| A new install's tunnels don't open | `journalctl -u frpc`; Hub → Jobs → the central `check-ports` job |
|
||||
| A site is down after an agent restart | `systemctl status pm2-<user>` (sites run under their own unit, not the agent's) |
|
||||
| An update failed | Hub → Jobs → its log; it rolled back. A failed migration is marked rolled back, so the next update isn't blocked |
|
||||
Generated
+51
-51
@@ -40,7 +40,7 @@
|
||||
},
|
||||
"apps/agent": {
|
||||
"name": "@crosscode/agent",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"@crosscode/contracts": "*",
|
||||
@@ -59,7 +59,7 @@
|
||||
},
|
||||
"apps/events/backend": {
|
||||
"name": "@crosscode/events-backend",
|
||||
"version": "2.3.0",
|
||||
"version": "2.3.1",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@cj-tech-master/excelts": "^10.2.0",
|
||||
@@ -106,7 +106,7 @@
|
||||
},
|
||||
"apps/events/frontend": {
|
||||
"name": "@crosscode/events-frontend",
|
||||
"version": "2.3.0",
|
||||
"version": "2.3.1",
|
||||
"dependencies": {
|
||||
"@dnd-kit/core": "^6.3.1",
|
||||
"@hookform/resolvers": "^5.2.1",
|
||||
@@ -134,7 +134,7 @@
|
||||
"date-fns": "^4.1.0",
|
||||
"idb": "^8.0.4",
|
||||
"lucide-react": "^0.536.0",
|
||||
"next": "^16.4.3",
|
||||
"next": "^16.4.6",
|
||||
"qrcode": "^1.5.4",
|
||||
"react": "^19.3.1",
|
||||
"react-day-picker": "^9.8.1",
|
||||
@@ -153,7 +153,7 @@
|
||||
"@types/react-dom": "^19.3.0",
|
||||
"autoprefixer": "^10.4.21",
|
||||
"eslint": "^10.13.0",
|
||||
"eslint-config-next": "^16.4.3",
|
||||
"eslint-config-next": "^16.4.6",
|
||||
"openapi-typescript": "^7.13.0",
|
||||
"postcss": "^8.5.6",
|
||||
"tailwindcss": "3.4",
|
||||
@@ -2977,15 +2977,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/env": {
|
||||
"version": "16.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-16.4.3.tgz",
|
||||
"integrity": "sha512-a7tz1QCcWWkwC/rPJcPMJk/UNRu9CFhDd3OHYE5hddbJrs8BqRTalxI6GlKCWEGzRLHN+S/B7a4PAHCtm25aBQ==",
|
||||
"version": "16.4.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/env/-/env-16.4.6.tgz",
|
||||
"integrity": "sha512-SunBjJ6t+oBtecS3dTjdVuMhUogP5wD/vrGL5EVuQYM1iS4O5ilL51HkiJ3sPjMzRHiCChvr4dbaSJbR7F3lxA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@next/eslint-plugin-next": {
|
||||
"version": "16.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-16.4.3.tgz",
|
||||
"integrity": "sha512-oxuC06wt/71h6ACYCV9GbKOfnf5a7VlRe/p80YHTut15TNgDEmynDnaq8t/xhy5rlvk7dhItIPs6H3rvIM4kyw==",
|
||||
"version": "16.4.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-16.4.6.tgz",
|
||||
"integrity": "sha512-HdqERVOafOD8JaUSAkwf9aSu/1rsHlkN8C5GcXYBH3C/z1MxBhZFxB5rz/xqMMRiIj7r9tIv8OCLQ9JWUxCvWA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -3026,9 +3026,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-arm64": {
|
||||
"version": "16.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.4.3.tgz",
|
||||
"integrity": "sha512-4yq5EXBt+VDtAZwTyfijaFp5D2C5oz3Ikw5a2kiX2K9nw72vrZX2q5UuAlkPtUMO1tQz6JTKpaKWjS7OOefTDQ==",
|
||||
"version": "16.4.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.4.6.tgz",
|
||||
"integrity": "sha512-kJ4VVZkley17xKaJx72QN2IBqjrj7zenCQZaUF0l9ShS/1Mt2kW4+Z5KGG6vgr3L/J562xTOizVyM1iA/u5nlg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -3042,9 +3042,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-darwin-x64": {
|
||||
"version": "16.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.4.3.tgz",
|
||||
"integrity": "sha512-1Rvkn/LUhnEF8WxnRkOrqGhbwXui1bkWFxONKIbN+r7C+9KHDSZ+iUoj4CzymVMWUyZIyx9szcb9+kbKhD500A==",
|
||||
"version": "16.4.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-16.4.6.tgz",
|
||||
"integrity": "sha512-eIPGZIqC+8JKaeZmvnCANJQF4xWkkHqSnAAajtFxgwDMAOnCgxNvP52SeWZ41PyVwoe+Le/NQuZSaQ8j7YshSA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -3058,9 +3058,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-gnu": {
|
||||
"version": "16.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.4.3.tgz",
|
||||
"integrity": "sha512-dCKpXErGg3abUM6t5JTJV/ottVBTStJB5lRJTbgdUdQaQ+jNHiK56Hsc0YAEg/rinSh42hYG3HWiYmEMdilnxg==",
|
||||
"version": "16.4.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.4.6.tgz",
|
||||
"integrity": "sha512-9nI6O8vvczH2D9ZNdMGqb/3NuT15T9ksOZnAmx9/gjF2cOi74+xxyf1Hk96uIMfm14c9y6wHeBq6SH8g6udvcA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -3077,9 +3077,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-arm64-musl": {
|
||||
"version": "16.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.4.3.tgz",
|
||||
"integrity": "sha512-WwYbhWkhYBvBtib1K4W0kL8MW2snBD2A5b3SN4vPpqalZbZs5+bQ1yzAdepVoOqrFfEW3dmREy4Zs1MrWcrFbw==",
|
||||
"version": "16.4.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.4.6.tgz",
|
||||
"integrity": "sha512-7/qPhTxDp2ScluOJOhLuhWmlA17o1yZ0SIgpISBCpBxXgtnK4+KGywBpFkfLPiU1rnSM1faFGzYkH6i7JdTrqA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -3096,9 +3096,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-gnu": {
|
||||
"version": "16.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.4.3.tgz",
|
||||
"integrity": "sha512-QymWvfUwDEC5/lpJOsxX5VAbyoR2D13+2Jsjz4be7gT4LPqEgdpkeLIR/HFfCLgKzoMhpJbp6I/JnogyNZHcaA==",
|
||||
"version": "16.4.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-16.4.6.tgz",
|
||||
"integrity": "sha512-oOpbNa8XOW1qCGd9VvzC4fbkkRxEls7/WI6tz+YHC0xRA7KpV1U7DrAnCPjzVyOk/karzWEepCOcTIDmwK8FwQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -3115,9 +3115,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-linux-x64-musl": {
|
||||
"version": "16.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.4.3.tgz",
|
||||
"integrity": "sha512-Vmjd9D7DpA4Vv3cUlr82QWgJD/BQZmns801vtC5VWHg6jCIA4a5vMKpQnfrM2pyCrp2eV0ENdUg4PlN3bAc2Yw==",
|
||||
"version": "16.4.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.4.6.tgz",
|
||||
"integrity": "sha512-aM8CZ+OR2EwXaAYw7KGkW2GDmNDsLBIRe1MMRZCJPTdw/xhTD0IMUVO4sf3KqrzuRouGzwwLZn34+gFeVXiUQA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -3134,9 +3134,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-arm64-msvc": {
|
||||
"version": "16.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.4.3.tgz",
|
||||
"integrity": "sha512-lG1pPdPLk7gTyGb00n5JIMLdBJgjb+UEhSdZvFbhUMg0DyC6z4B7RnpSKF9VCd4imkLObVbXOFA0kFCpw7yFow==",
|
||||
"version": "16.4.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.4.6.tgz",
|
||||
"integrity": "sha512-U0p7/tEtqvHX2crhd841CDwKtp5CFkKXVjOhmfccR3Pvp64sj8KBwRqsvltqLOwVBbj0NtkxwXSDpEHYGbxeXQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -3150,9 +3150,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@next/swc-win32-x64-msvc": {
|
||||
"version": "16.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.4.3.tgz",
|
||||
"integrity": "sha512-NmQC9RkJdnPXRaMxtkCzobB3teVjqF33oSOnwDfi+XYGWWYpt+xlGK3mtktSKLbdjwaWbJu2OkkMiRFGUUncKg==",
|
||||
"version": "16.4.6",
|
||||
"resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.4.6.tgz",
|
||||
"integrity": "sha512-3ZG15/5WIdlTQsIEvc9sPTTSL5XFrlLklIKmfF4fwsDnoAhu6NcBDXsk3mbGxNyo6aVLEGex+fHCv2MahY7a9g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -10886,13 +10886,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-config-next": {
|
||||
"version": "16.4.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-16.4.3.tgz",
|
||||
"integrity": "sha512-j9IqBma6abp800frdUURaizYMgXOK+jNGyq6CsYcM9AxpSJs5D/TgMNGeAmRUilZvA7g9V1Tr71gNg9/SVTuMQ==",
|
||||
"version": "16.4.6",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-16.4.6.tgz",
|
||||
"integrity": "sha512-IBGGrVf9E6pL0NGL0hmeicVGeSyv1VEzIWq6IecDqkw+YFByhEtDJS9u1r6s6a1VxK6rssh69KyNFQUgfaacqw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@next/eslint-plugin-next": "16.4.3",
|
||||
"@next/eslint-plugin-next": "16.4.6",
|
||||
"eslint-import-resolver-node": "^0.3.6",
|
||||
"eslint-import-resolver-typescript": "^3.5.2",
|
||||
"eslint-plugin-import": "^2.32.0",
|
||||
@@ -14857,12 +14857,12 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/next": {
|
||||
"version": "16.4.3",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-16.4.3.tgz",
|
||||
"integrity": "sha512-OqxKTGi9u80FydydsMNYNjnuje9Au+kvHlt2GZ//ftdpDHm1dxKqAaENoOOTX5wKzn+9vaKUNIfZeyZUuLhCnA==",
|
||||
"version": "16.4.6",
|
||||
"resolved": "https://registry.npmjs.org/next/-/next-16.4.6.tgz",
|
||||
"integrity": "sha512-QZJiYhaZLJMo2KpkQGQIwvmd79WVsAWeYIU554a8d7zArS3si/IRy3lBNV/rtYhE70oLwdLYhPAXLPx8HwcwtA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@next/env": "16.4.3",
|
||||
"@next/env": "16.4.6",
|
||||
"@swc/helpers": "0.5.23",
|
||||
"baseline-browser-mapping": "^2.9.19",
|
||||
"caniuse-lite": "^1.0.30001579",
|
||||
@@ -14876,14 +14876,14 @@
|
||||
"node": ">=20.9.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@next/swc-darwin-arm64": "16.4.3",
|
||||
"@next/swc-darwin-x64": "16.4.3",
|
||||
"@next/swc-linux-arm64-gnu": "16.4.3",
|
||||
"@next/swc-linux-arm64-musl": "16.4.3",
|
||||
"@next/swc-linux-x64-gnu": "16.4.3",
|
||||
"@next/swc-linux-x64-musl": "16.4.3",
|
||||
"@next/swc-win32-arm64-msvc": "16.4.3",
|
||||
"@next/swc-win32-x64-msvc": "16.4.3",
|
||||
"@next/swc-darwin-arm64": "16.4.6",
|
||||
"@next/swc-darwin-x64": "16.4.6",
|
||||
"@next/swc-linux-arm64-gnu": "16.4.6",
|
||||
"@next/swc-linux-arm64-musl": "16.4.6",
|
||||
"@next/swc-linux-x64-gnu": "16.4.6",
|
||||
"@next/swc-linux-x64-musl": "16.4.6",
|
||||
"@next/swc-win32-arm64-msvc": "16.4.6",
|
||||
"@next/swc-win32-x64-msvc": "16.4.6",
|
||||
"sharp": "^0.35.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
+2
-2
@@ -69,8 +69,8 @@
|
||||
"@radix-ui/react-toast": "1.2.23",
|
||||
"@radix-ui/react-tooltip": "1.2.16",
|
||||
"autoprefixer": "10.5.4",
|
||||
"eslint-config-next": "16.4.3",
|
||||
"next": "16.4.3",
|
||||
"eslint-config-next": "16.4.6",
|
||||
"next": "16.4.6",
|
||||
"postcss": "8.5.26",
|
||||
"react-hook-form": "7.86.0",
|
||||
"tailwind-merge": "3.6.0",
|
||||
|
||||
Reference in New Issue
Block a user