Commit3bd8e2f
feat(platform): add /api/platform-status cross-repo endpoint
feat(platform): add /api/platform-status cross-repo endpoint
First step of the 3-repo platform wiring. Each of crontech, gluecron,
and gatetest will expose an identical-shape /api/platform-status
endpoint so admin consoles can fetch all three from one view and
customers can see a unified "your platform" state card.
Gluecron ships the handler as an exported Hono sub-app. Needs one line
in src/app.tsx to register:
app.route("/api/platform-status", platformStatus);
(documented in docs/PLATFORM_STATUS.md so the reviewer can see the
trivial wire-up before merging).2 files changed+83−03bd8e2f18376b49292d327d11536efcd8a105e0e
2 changed files+83−0
Addeddocs/PLATFORM_STATUS.md+57−0View fileUnifiedSplit
@@ -0,0 +1,57 @@
1# Platform Status — cross-repo contract
2
3The three products (Crontech, Gluecron, GateTest) each expose a small public endpoint:
4
5```
6GET /api/platform-status
7```
8
9Returns JSON:
10
11```json
12{
13 "product": "crontech" | "gluecron" | "gatetest",
14 "version": "1.0.0",
15 "commit": "4c512ce",
16 "healthy": true,
17 "timestamp": "2026-04-20T12:34:56Z",
18 "siblings": {
19 "crontech": "https://crontech.ai/api/platform-status",
20 "gluecron": "https://gluecron.com/api/platform-status",
21 "gatetest": "https://gatetest.io/api/platform-status"
22 }
23}
24```
25
26## Why
27
28Each admin console fetches the other two siblings so the operator can see all three platforms' state from one page. Each customer dashboard fetches its own endpoint (+ any siblings the user has entitlements for) so end users see a unified "your platform" card.
29
30This is the first step of the three-repo platform wiring. It is intentionally small: no auth, no shared packages, no cross-repo SSO. The endpoints only publish non-sensitive product state that is safe to read from any browser session.
31
32## Wire-up status
33
34- **Crontech** (`apps/web/src/routes/api/platform-status.ts`) — auto-picked by SolidStart file router, zero wiring.
35- **Gluecron** (`src/routes/platform-status.ts`) — exported Hono handler. Needs one line in `src/app.tsx`:
36 ```ts
37 import { platformStatus } from "./routes/platform-status";
38 app.route("/api/platform-status", platformStatus);
39 ```
40- **GateTest** (`website/app/api/platform-status/route.ts`) — auto-picked by Next.js App Router, zero wiring.
41
42## Environment variables
43
44Each deploy should set:
45
46- `APP_VERSION` — semver tag (default `"dev"`)
47- `GIT_COMMIT` — short SHA (default `"unknown"`)
48
49## CORS
50
51The endpoint sends `Access-Control-Allow-Origin: *` because product status is public — no secrets, no user data, no PII. Safe to poll from any admin browser session or status page.
52
53## Next steps (follow-up PRs)
54
551. Admin UI widget — add a 3-card grid to each product's existing `/admin` page that fetches all three siblings and renders health + commit + last-seen.
562. Customer onboarding card — show on each product's customer dashboard: "Your status on each product" (bootstrapped from the sibling endpoints, gated by entitlements once SSO lands).
573. Shared identity (SSO) — dedicated follow-up session. Will add an `entitlements` table and require CLAUDE.md PIN per doctrine.
Addedsrc/routes/platform-status.ts+26−0View fileUnifiedSplit
@@ -0,0 +1,26 @@
1import { Hono } from "hono";
2
3const PRODUCT = "gluecron" as const;
4const VERSION = process.env.APP_VERSION ?? "dev";
5const COMMIT = process.env.GIT_COMMIT ?? "unknown";
6
7const SIBLINGS = {
8 crontech: "https://crontech.ai/api/platform-status",
9 gluecron: "https://gluecron.com/api/platform-status",
10 gatetest: "https://gatetest.io/api/platform-status",
11} as const;
12
13export const platformStatus = new Hono();
14
15platformStatus.get("/", (c) => {
16 c.header("cache-control", "no-store");
17 c.header("access-control-allow-origin", "*");
18 return c.json({
19 product: PRODUCT,
20 version: VERSION,
21 commit: COMMIT,
22 healthy: true,
23 timestamp: new Date().toISOString(),
24 siblings: SIBLINGS,
25 });
26});
027