You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1b01b48
Browse filesBrowse the repository at this point in the historyBrowse files
ci: add build/lint/typecheck gate and repo agent docs
The repo had no CI at all — no lint, typecheck, build, or test ran on any push.
Two latent breakages had accumulated unnoticed as a result:
- apps/web/biome.json is invalid for Biome 2 (`jsxRuntime: "automatic"` is not
an accepted value), so `pnpm lint` there has been failing on a config error
rather than linting anything. Left as-is since apps/web is being retired;
apps/site gets a corrected Biome 2 config (`assist.actions.source`,
`files.includes` with negations, `jsxRuntime: "transparent"`).
- apps/sanity/extract.json can silently drift from the schema, which is how
three divergent copies accumulated. CI now re-runs the extract and fails if
the result differs from what is committed.
ci.yml runs lint + typecheck + build for the site, typecheck + build for the
Studio, and the extract drift check. Uses node-version-file: .nvmrc rather than
a bare "22", which is what actually enforces the >=22.12 floor that sanity 6 and
@sanity/ui 4 require; deploy.yml switched to the same.
deploy.yml also gains a paths filter so site-only changes stop redeploying the
Studio on every push.
Adds a root CLAUDE.md (the repo had no root docs) recording the package layout,
the in-flight migration, where the vendored Sanity skills live, and the
conventions that have already caused real bugs here — no getStaticPaths under
output: "server", GROQ must live in .ts files for TypeGen, never read secrets
from import.meta.env, bindings are not inherited into env.production, and
stegaClean anything bound to an attribute or feed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HZ4S1uTJwFdbv3A6PHWfw2
pnpm monorepo. Node >= 22.12 (see `.nvmrc`); pnpm 10.34.1.
4
+
5
+
## Packages
6
+
7
+
| Path | Package | What it is |
8
+
|---|---|---|
9
+
|`apps/site`|`@codingcatdev/site`|**Astro 7 SSR on Cloudflare Workers** — the public site. Active development. |
10
+
|`apps/web`|`@codingcatdev/web`| Next.js 16 app. Being retired: its public half is replaced by `apps/site`; the dashboard + sponsor portal move to `admin.codingcat.dev`. |
11
+
|`apps/sanity`|`@codingcatdev/sanity`| Sanity Studio v6, deployed to Sanity hosting. |
12
+
13
+
Root scripts target `apps/site`. Use `pnpm dev:dashboard` / `build:dashboard` for the Next app, `pnpm dev:studio` for the Studio.
14
+
15
+
## In-flight migration
16
+
17
+
Moving from Next.js on Vercel to Astro 7 SSR on Cloudflare Workers, with Sanity
18
+
upgraded to v6 and the video/AI pipeline (Remotion, Gemini, ElevenLabs,
19
+
NotebookLM, GCS, YouTube upload) dropped. Auth moves from Supabase to
20
+
better-auth on Cloudflare D1.
21
+
22
+
Branch note: `dev` still holds the **pre-Next Astro app** and `main` holds the
23
+
Next app — `main` is ahead. Harvest old Astro code with `git show dev:<path>`,
24
+
never by checking `dev` out over the working tree.
25
+
26
+
## Conventions that bite
27
+
28
+
-**`output: "server"` — there is no `getStaticPaths` anywhere.** Pagination is a
29
+
runtime bounds check on `Astro.params`, not a build-time param list.
30
+
-**GROQ queries must live in `.ts` files.** Sanity TypeGen cannot parse `.astro`
31
+
frontmatter, so `defineQuery` calls in `.astro` files are silently skipped.
32
+
-**Never read secrets from `import.meta.env`.** Vite inlines non-`PUBLIC_` vars
33
+
into the server bundle, baking them into the deployed Worker script. Read them
34
+
per-request from `locals.runtime.env`.
35
+
-**Cloudflare bindings are not inherited into `env.production`.** Anything added
36
+
to the top level of `wrangler.jsonc` must be repeated there.
37
+
-**`stegaClean` anything bound to an attribute**, `<meta>`, JSON-LD, or XML.
38
+
Stega's zero-width characters are harmless in text nodes and corrupting in
39
+
`href`, `src`, and feeds.
40
+
-**`@sanity/icons` v5 has no root-entry icon exports.** Import from subpaths:
41
+
`import {UserIcon} from "@sanity/icons/User"`.
42
+
-`apps/sanity/plugins/podcast-rss/` is vendored, not an npm dep — see its README.
43
+
44
+
## Agent skills
45
+
46
+
Sanity guidance is vendored in `.agents/skills/` (pinned by `skills-lock.json`).
0 commit comments