Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24
95 changes: 95 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down