From f41381785abc2caf3ea3bed3ddf2a12b92fabcba Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 29 Oct 2026 09:52:38 +0000 Subject: [PATCH] Restore Makerble branding and the /openapi.yaml fix; guard against regressions PR #52's branding and spec-path fix were silently reverted by 228fe1c ("Document POST /project_beneficiaries and project statuses", merged via PR #53), which committed a stale server.js and deleted assets/. - Re-apply the branding: Makerble logo lockup, shield favicon (served at /favicon.png and /favicon.ico), Quicksand + JetBrains Mono, navy/purple/blue palette. Nav links added since keep their method classes, minus the old inline colours. - Serve openapi.yaml from the repo root again so /openapi.yaml and the Prism mock stop 404ing, and bundle assets/ and openapi.yaml in vercel.json. - Add CLAUDE.md with repo layout, branding rules, and how to avoid overwriting others' work. - Add `npm run check` (boots the server, asserts routes, logo, favicon and brand markers) and a GitHub Actions workflow running it on every PR. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01F1a5xoQdmj3Zc28ZZV8phC --- .github/workflows/check.yml | 19 ++ CLAUDE.md | 36 ++++ assets/favicon.png | Bin 0 -> 6325 bytes assets/makerble-logo.png | Bin 0 -> 33332 bytes package.json | 3 +- scripts/check-site.mjs | 82 +++++++++ server.js | 335 ++++++++++++++++++++---------------- vercel.json | 2 +- 8 files changed, 330 insertions(+), 147 deletions(-) create mode 100644 .github/workflows/check.yml create mode 100644 CLAUDE.md create mode 100644 assets/favicon.png create mode 100644 assets/makerble-logo.png create mode 100644 scripts/check-site.mjs diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..cb3029c --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,19 @@ +name: Site check + +on: + pull_request: + push: + branches: [main] + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + - run: npm ci + - run: node --check server.js + - run: npm run check diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..6590cdf --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,36 @@ +# Makerble API docs + +The site at api-docs.makerble.com. It is an Express app (`server.js`) deployed on Vercel. + +- `openapi.yaml` (repo root): the OpenAPI spec, served at `/openapi.yaml` and used by the Prism mock server at `/mock`. +- `server.js`: the routes, plus the whole docs page (HTML, CSS and endpoint cards) in `buildDocsPage()`. +- `assets/`: the Makerble logo and favicon, served from `/assets/makerble-logo.png` and `/favicon.png`. +- `vercel.json`: must keep `includeFiles: ["assets/**", "openapi.yaml"]`. Without it, Vercel leaves those files out and the logo, favicon and spec return errors. + +## Don't undo other people's changes + +The Makerble branding (PR #52) was wiped out by a later docs commit. That commit was built from an out-of-date copy of `server.js`, so it rewrote the page styles and deleted `assets/` without anyone noticing. To stop that happening again: + +- **Start from the latest `main`.** Fetch and merge `origin/main` before you edit, and again before you open a PR. Never paste or rewrite `server.js` wholesale from an older copy. Make targeted edits. +- **Check your diff before you commit.** A docs PR should only touch `openapi.yaml` and the endpoint cards or nav links in `server.js`. If `git diff --stat` shows changes to the ` @@ -848,17 +897,13 @@ function buildDocsPage() {
- - - makerble + + API Reference
@@ -875,61 +920,61 @@ function buildDocsPage() { @@ -3715,7 +3760,7 @@ function buildDocsPage() { /mock
-

Creating a Story

+

Creating a Story

{ "story": { "story_group": "change_created", diff --git a/vercel.json b/vercel.json index 4eb087b..f763573 100644 --- a/vercel.json +++ b/vercel.json @@ -1,7 +1,7 @@ { "version": 2, "builds": [ - { "src": "server.js", "use": "@vercel/node" } + { "src": "server.js", "use": "@vercel/node", "config": { "includeFiles": ["assets/**", "openapi.yaml"] } } ], "routes": [ { "src": "/(.*)", "dest": "server.js" }