Thank you for contributing to Seamless Auth.
Seamless Auth is:
- Passwordless-first
- Security-focused
- Minimal and intentional
- Infrastructure-grade software
For non-trivial changes:
- Open an issue first
- Explain the motivation
- Describe your proposed solution
- Wait for feedback
The React SDK is developed against a real Seamless Auth server instance.
Contributors must run the local Seamless Auth server while developing changes to this package.
Fork the repository and clone it locally:
# Clone the auth server code or your forks
git clone https://github.com/fells-code/seamless-auth-api.git
# Clone the react SDK
git clone https://github.com/fells-code/seamless-auth-react.gitcd seamless-auth-api
cp .env.example .envIMPORTANT Change the APP_ORIGIN env to
http://localhost:5173to match vite. The React SDK talks to a server adapter mounted at/auth, not directly to API auth cookies.
docker compose up -dIf you are using docker you can stop here and move on to Step 3.
Start postgres in whatever way your system does e.g. on mac
brew services start postgresqlnpm install
npm run db:create
npm run db:migrate
npm run devEnsure the server is running locally (default: http://localhost:5312).
curl http://localhost:5312/health/status
## Expected result
## {"message":"System up"}You will need a web application to integrate the SDK into. We recommend using Vite for fast iteration:
# If still in the auth directory
cd ../
npm create vite@latest seamless-auth-dev
### Select React as the framework, Typescript as the variantWeb site will be active at http://localhost:5173
From the seamless-auth-react repository:
npm install
npm linkThen inside your test application:
npm link @seamless-auth/react
npm install react-router-domUpdate main.tsx:
// main.tsx
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { AuthProvider, AuthRoutes, useAuth } from '@seamless-auth/react';
import './index.css';
import App from './App.tsx';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
// eslint-disable-next-line react-refresh/only-export-components
function ApplicationRoutes() {
const { isAuthenticated } = useAuth();
return (
<Routes>
{isAuthenticated ? (
<Route path="*" element={<App />} />
) : (
<Route path="*" element={<AuthRoutes />} />
)}
</Routes>
);
}
createRoot(document.getElementById('root')!).render(
<StrictMode>
<BrowserRouter>
<AuthProvider apiHost="http://localhost:5312">
<ApplicationRoutes />
</AuthProvider>
</BrowserRouter>
</StrictMode>
);Inside seamless-auth-react:
npm run build -- --watchChanges will automatically rebuild and propagate to your linked development application.
If all went well you should have a directory structure like this
.
├── seamless-auth-api
├── seamless-auth-dev
└── seamless-auth-reactNavigating to http://localhost:5173 give you the seamless auth login page.
If so you are ready to start dev work
When submitting a pull request:
- Ensure the SDK works against a running local auth server
- Verify login, logout, and session behavior
- Confirm role-based logic works as expected
- Run lint and tests before submitting
This ensures changes remain aligned with real authentication flows and infrastructure behavior.
This repository uses Conventional Commits for readable history and commitlint checks.
Common commit types:
feat:fix:docs:refactor:test:chore:
Example:
feat: add configurable token expiration overrideWrite commit subjects for future maintainers. Prefer concrete impact, such as
fix(provider): refresh credentials after mutation, over vague subjects like fix auth.
This repository uses Changesets for package versions and changelogs.
Every adopter-facing package change should include a changeset:
npm run changesetChoose the semver bump intentionally:
patchfor bug fixes and documentation corrections that affect package adoptersminorfor new APIs, new supported flows, or meaningful behavior additions before v1majorfor breaking changes after the public contract reaches v1
Write changeset summaries as release notes for SDK adopters, not implementation notes.
Merging a PR with one or more changesets to main runs the Release GitHub Actions workflow.
The workflow:
- installs dependencies with
npm ci - runs lint, tests, build, and package verification
- opens or updates a Changesets release PR with
CHANGELOG.md,package.json, andpackage-lock.json - waits for maintainers to review and merge that release PR
- publishes
@seamless-auth/reactto npm after the reviewed release PR lands onmain - creates the Git tag and GitHub Release from the changeset summaries
Do not create release tags manually for normal releases. The workflow owns stable package tags after the reviewed release PR is merged.
This package targets a Node 24 baseline. The engines field requires Node 24 (>=24.0.0 <25.0.0),
.nvmrc pins 24, and both CI and release automation run on Node 24 in GitHub Actions. Use Node 24.10
or newer locally so development and release commands match the workflows.
npm publishing uses the NPM_TOKEN repository secret and publishes with provenance enabled from
GitHub Actions. Before the first automated release, configure:
NPM_TOKEN: npm automation token with publish access to@seamless-auth/react
The Release workflow needs contents: write and pull-requests: write so it can maintain the
release PR branch and create GitHub Releases. It does not need a branch-protection bypass for direct
pushes to main; the version and changelog changes land through the reviewed release PR.
- Be scoped
- Include tests
- Update docs
- Pass CI
By contributing, you agree your contributions fall under the project license.