diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..a45fd52 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24 diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..9aa58d4 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,95 @@ +# AGENTS.md + +This file is for coding agents working in the `seamless-auth-starter-react` +repository. + +## Purpose + +This repository is the Vite + React starter that the Seamless CLI clones during +`seamless init`. It is a minimal, working reference app with the Seamless Auth +React SDK already wired in: `AuthProvider`, the built-in auth routes, a protected +route example, role-based UI checks, and a protected call to the companion +Express starter. + +It is adopter-facing sample code. It is the first Seamless Auth code a new user +runs, so keep it minimal, idiomatic, and cleanly runnable straight from a fresh +scaffold. Do not grow it into a full application. + +## Working Standards (fells-code baseline) + +These rules apply to every repository in the fells-code org. Repo-specific +guidance may extend them but must not contradict them. + +### Attribution +- Commit and open PRs solely under the repository owner's identity. Never + commit under an agent or assistant identity. +- Never attribute work to an AI assistant: no `Co-Authored-By: Claude` (or any + assistant) trailers, no "Generated with" / "Created with Claude" notes, and no + assistant branding or emoji anywhere in commit messages, PR or issue titles + and descriptions, changesets, code comments, or docs. + +### Comments +- Comment only when the code genuinely needs explaining: a non-obvious reason, a + gotcha, or an invariant. Never narrate what the code plainly does. + +### TODOs +- Every `TODO`/`FIXME` must reference a ticket, e.g. `// TODO(#123): ...`. + Do not leave a bare TODO. If no ticket exists, create one first. + +### Commits & branches +- Conventional Commits (`feat:`, `fix:`, `chore:`, `docs:`, `ci:`, `test:`). +- Descriptive branch names (`feat/...`, `fix/...`); never a `claude/` or other + tool-generated prefix. + +### Public-facing text +- No em dashes in commit messages, code comments, PR or issue text, changesets, + or docs. Use a comma, parentheses, or a separate sentence. + +### Before declaring work done +- Run the repo's checks (typecheck, lint, format, tests) and report real output. + Never claim a change works without running them. +- Match the surrounding code's style, naming, and comment density. + +## Runtime Model + +- Vite + React single-page app; static build output, no server runtime here. +- Auth is provided by the `@seamless-auth/react` SDK. `AuthProvider` is + configured with the application API origin (see `src/lib/runtimeConfig.ts`). +- Protected API calls go through the companion Express starter; the API client + lives in `src/lib/api.ts`. + +## Architecture Map + +```text +src/ + main.tsx app entry (mounts AuthProvider + router) + App.tsx routes and layout wiring + layouts/ shared page shell + pages/ Home, Login, About, BetaAccess (route views) + components/Navbar.tsx shared navigation with auth-aware UI + lib/ + runtimeConfig.ts reads the API origin / runtime config + api.ts fetch client for the companion Express starter +``` + +## Tooling + +| Task | Command | +| ------- | ----------------- | +| Dev | `npm run dev` | +| Build | `npm run build` | +| Lint | `npm run lint` | +| Preview | `npm run preview` | + +- Node version is pinned by `.nvmrc` (Node 24). Run `nvm use` locally to match. +- CI runs the cross-repo conformance matrix (`.github/workflows/conformance.yml`) + by calling the reusable workflow in `fells-code/seamless-cli`. There is no + local test suite; conformance is the gate. + +## Safe Change Workflow + +1. Run `nvm use` and `npm install`. +2. Keep changes minimal and representative of real SDK usage; this is a template. +3. Run `npm run lint` and `npm run build` before opening a PR. +4. If a change depends on a new `@seamless-auth/react` release, note the version + bump; the conformance matrix pins SDK versions across the ecosystem. diff --git a/package.json b/package.json index f31a41a..8f18363 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "license": "AGPL-3.0-only", "engines": { - "node": ">=20.0.0 <25.0.0", + "node": ">=24.0.0 <25.0.0", "npm": ">=9.0.0 <13.0.0" }, "scripts": {