@eminuckan/spine 0.2.4 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/CODE_OF_CONDUCT.md +39 -0
- package/CONTRIBUTING.md +78 -0
- package/MAINTAINERS.md +43 -0
- package/README.md +170 -135
- package/ROADMAP.md +58 -0
- package/SECURITY.md +37 -0
- package/dist/access/evaluator.d.ts.map +1 -1
- package/dist/access/index.js +1 -1
- package/dist/access/types.d.ts +10 -2
- package/dist/access/types.d.ts.map +1 -1
- package/dist/{access-DlAqsVGQ.js → access-CGrsDMwu.js} +9 -7
- package/dist/access-CGrsDMwu.js.map +1 -0
- package/dist/api-client/api-config.server.d.ts +27 -0
- package/dist/api-client/api-config.server.d.ts.map +1 -1
- package/dist/api-client/error-codes.d.ts +6 -31
- package/dist/api-client/error-codes.d.ts.map +1 -1
- package/dist/api-client/index.js +2 -2
- package/dist/api-client/server.d.ts +1 -1
- package/dist/api-client/server.d.ts.map +1 -1
- package/dist/api-client/server.js +3 -3
- package/dist/{api-client-CZapXIF8.js → api-client-CgZUMukO.js} +9 -26
- package/dist/api-client-CgZUMukO.js.map +1 -0
- package/dist/auth/auth.server.d.ts.map +1 -1
- package/dist/auth/authorization-parameters.d.ts +5 -0
- package/dist/auth/authorization-parameters.d.ts.map +1 -0
- package/dist/auth/route-protection.server.d.ts +20 -4
- package/dist/auth/route-protection.server.d.ts.map +1 -1
- package/dist/auth/server.d.ts +1 -1
- package/dist/auth/server.d.ts.map +1 -1
- package/dist/auth/server.js +5 -5
- package/dist/auth/types.d.ts +24 -2
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/{auth.server-B3ODGIX4.js → auth.server-D5oiz9aF.js} +62 -53
- package/dist/auth.server-D5oiz9aF.js.map +1 -0
- package/dist/{auth.server-wdKsjQsn.js → auth.server-lC94lmlx.js} +3 -3
- package/dist/identity/identity-context.server.d.ts +2 -0
- package/dist/identity/identity-context.server.d.ts.map +1 -1
- package/dist/identity/identity-store.d.ts +19 -2
- package/dist/identity/identity-store.d.ts.map +1 -1
- package/dist/identity/index.js +2 -2
- package/dist/identity/server.js +2 -2
- package/dist/identity/types.d.ts +3 -1
- package/dist/identity/types.d.ts.map +1 -1
- package/dist/{identity-yT2ijZF0.js → identity-C5un-xAs.js} +104 -60
- package/dist/identity-C5un-xAs.js.map +1 -0
- package/dist/index.js +8 -8
- package/dist/logging/index.js +1 -1
- package/dist/{logging-_h2mi3L9.js → logging-DviiAkLx.js} +2 -2
- package/dist/{logging-_h2mi3L9.js.map → logging-DviiAkLx.js.map} +1 -1
- package/dist/permissions/constants.d.ts +3 -0
- package/dist/permissions/constants.d.ts.map +1 -1
- package/dist/permissions/index.js +1 -1
- package/dist/permissions/permission-store.d.ts +1 -1
- package/dist/permissions/types.d.ts +1 -1
- package/dist/permissions/types.d.ts.map +1 -1
- package/dist/{permissions-OUK8Eql2.js → permissions-_n1hIG7Q.js} +6 -12
- package/dist/permissions-_n1hIG7Q.js.map +1 -0
- package/dist/query-client/types.d.ts +9 -9
- package/dist/query-client/types.d.ts.map +1 -1
- package/dist/query-client-Bh3TyB8W.js.map +1 -1
- package/dist/react-router/index.js +8 -8
- package/dist/react-router/server.js +14 -14
- package/dist/{redis-session-storage.server-D0-72FV-.js → redis-session-storage.server-v2VcpFsQ.js} +2 -2
- package/dist/{redis-session-storage.server-D0-72FV-.js.map → redis-session-storage.server-v2VcpFsQ.js.map} +1 -1
- package/dist/{server-B7JN86_0.js → server-B6PCxc-T.js} +31 -83
- package/dist/server-B6PCxc-T.js.map +1 -0
- package/dist/{server-DeBlxoaW.js → server-C96NMFBy.js} +17 -9
- package/dist/server-C96NMFBy.js.map +1 -0
- package/dist/{server-Ce9jQRdL.js → server-Ca-3DJf2.js} +44 -11
- package/dist/server-Ca-3DJf2.js.map +1 -0
- package/dist/{server-BmiuV28c.js → server-Dxsww9v9.js} +5 -4
- package/dist/server-Dxsww9v9.js.map +1 -0
- package/dist/server.js +14 -14
- package/dist/signalr/index.js +1 -1
- package/dist/signalr/types.d.ts +1 -1
- package/dist/{signalr-CSfCz1Ik.js → signalr-k-70VHKo.js} +3 -2
- package/dist/signalr-k-70VHKo.js.map +1 -0
- package/dist/tenant/index.js +2 -2
- package/dist/tenant/server.js +4 -4
- package/dist/tenant/tenant-context.d.ts +17 -1
- package/dist/tenant/tenant-context.d.ts.map +1 -1
- package/dist/tenant/tenant-cookie.server.d.ts.map +1 -1
- package/dist/tenant/tenant-store.d.ts +54 -9
- package/dist/tenant/tenant-store.d.ts.map +1 -1
- package/dist/tenant/tenant.server.d.ts +20 -1
- package/dist/tenant/tenant.server.d.ts.map +1 -1
- package/dist/tenant/types.d.ts +29 -9
- package/dist/tenant/types.d.ts.map +1 -1
- package/dist/tenant-DfLemb6n.js +384 -0
- package/dist/tenant-DfLemb6n.js.map +1 -0
- package/docs/adapters.md +87 -0
- package/docs/architecture.md +193 -0
- package/docs/backend-adaptation.md +249 -0
- package/docs/codex-for-oss-application.md +39 -0
- package/docs/codex-maintenance.md +47 -0
- package/docs/installation.md +213 -0
- package/docs/module-reference.md +207 -0
- package/docs/releasing.md +92 -0
- package/package.json +21 -3
- package/dist/access-DlAqsVGQ.js.map +0 -1
- package/dist/api-client-CZapXIF8.js.map +0 -1
- package/dist/auth.server-B3ODGIX4.js.map +0 -1
- package/dist/identity-yT2ijZF0.js.map +0 -1
- package/dist/permissions-OUK8Eql2.js.map +0 -1
- package/dist/server-B7JN86_0.js.map +0 -1
- package/dist/server-BmiuV28c.js.map +0 -1
- package/dist/server-Ce9jQRdL.js.map +0 -1
- package/dist/server-DeBlxoaW.js.map +0 -1
- package/dist/signalr-CSfCz1Ik.js.map +0 -1
- package/dist/tenant-BErqEENp.js +0 -256
- package/dist/tenant-BErqEENp.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,18 +4,37 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
No unreleased changes.
|
|
8
|
+
|
|
9
|
+
## [0.3.1] - 2026-06-01
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Clarified README positioning, backend contract guidance, and quick-start snippets for the open source package.
|
|
14
|
+
|
|
15
|
+
## [0.3.0] - 2026-06-01
|
|
16
|
+
|
|
7
17
|
### Added
|
|
8
18
|
|
|
19
|
+
- Added a public-surface check that blocks private project names and app-specific authorization hints from the public package.
|
|
20
|
+
- Added per-login allowlists for app-specific OIDC authorization parameters and public state UI context.
|
|
9
21
|
- Added Keycloak-compatible back-channel and front-channel logout handlers.
|
|
10
22
|
- Added Redis session indexes by user, OIDC `sid`, and legacy `session_state`.
|
|
11
23
|
- Added session listing and destroy primitives for current-user, all-user, `sid`, and `session_state` cleanup.
|
|
12
24
|
- Added OIDC client authentication method configuration for public and confidential clients.
|
|
25
|
+
- Added generic tenant, identity, permission, access, and API configuration surfaces for custom SaaS backend contracts.
|
|
26
|
+
- Added Vitest coverage for authorization parameters, access evaluation, permissions, tenant state, identity state, and API header configuration.
|
|
27
|
+
- Added React Router SaaS example app, installation docs, adapter docs, roadmap, maintainer notes, and Codex maintenance plan.
|
|
28
|
+
- Added an adapter request issue template for framework and provider integrations.
|
|
13
29
|
|
|
14
30
|
### Changed
|
|
15
31
|
|
|
16
32
|
- Switched server-side auth from direct `oauth4webapi` calls to `openid-client`.
|
|
33
|
+
- Removed built-in product-flow redirects from route protection; consuming apps now own all setup, billing, and tenant workflow routing through `configureRouteProtection`.
|
|
34
|
+
- Changed built-in package defaults from legacy project branding to Spine-oriented defaults.
|
|
17
35
|
- Made default logout RP-Initiated Logout and kept app-local cleanup explicit with `logout=local`.
|
|
18
36
|
- Removed `offline_access` from the default scope; apps can opt in explicitly if they need long-lived refresh tokens.
|
|
37
|
+
- Updated CI and release validation to run the full `pnpm check` gate.
|
|
19
38
|
|
|
20
39
|
## [0.2.4] - 2026-04-25
|
|
21
40
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We want Spine to be a welcoming project for contributors of all experience levels. We commit to making participation respectful, constructive, and harassment-free.
|
|
6
|
+
|
|
7
|
+
## Our Standards
|
|
8
|
+
|
|
9
|
+
Examples of behavior that help create a positive environment:
|
|
10
|
+
|
|
11
|
+
- Being respectful in language and tone
|
|
12
|
+
- Giving actionable, kind feedback
|
|
13
|
+
- Accepting good-faith disagreement
|
|
14
|
+
- Prioritizing shared understanding over ego
|
|
15
|
+
- Helping newer contributors learn the codebase
|
|
16
|
+
|
|
17
|
+
Examples of unacceptable behavior:
|
|
18
|
+
|
|
19
|
+
- Harassment or discrimination
|
|
20
|
+
- Personal attacks
|
|
21
|
+
- Trolling or deliberately hostile behavior
|
|
22
|
+
- Publishing private information without permission
|
|
23
|
+
- Repeatedly derailing technical discussions
|
|
24
|
+
|
|
25
|
+
## Enforcement
|
|
26
|
+
|
|
27
|
+
Project maintainers are responsible for clarifying and enforcing this code of conduct. They may remove, edit, or reject comments, commits, issues, pull requests, and other contributions that violate these standards.
|
|
28
|
+
|
|
29
|
+
## Reporting
|
|
30
|
+
|
|
31
|
+
If you experience or witness unacceptable behavior, open a private report to the maintainer at `eminuckan@gmail.com`.
|
|
32
|
+
|
|
33
|
+
## Scope
|
|
34
|
+
|
|
35
|
+
This code of conduct applies within project spaces and in public spaces when someone is representing the project.
|
|
36
|
+
|
|
37
|
+
## Attribution
|
|
38
|
+
|
|
39
|
+
This document is inspired by the Contributor Covenant and adapted for this project.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Contributing to Spine
|
|
2
|
+
|
|
3
|
+
Thanks for contributing.
|
|
4
|
+
|
|
5
|
+
Spine is intended to be a reusable foundation for SaaS infrastructure, so changes should optimize for clarity, composability, and portability across products.
|
|
6
|
+
|
|
7
|
+
## Before You Start
|
|
8
|
+
|
|
9
|
+
- Read [README.md](README.md)
|
|
10
|
+
- Read [docs/architecture.md](docs/architecture.md)
|
|
11
|
+
- Read [docs/backend-adaptation.md](docs/backend-adaptation.md)
|
|
12
|
+
- Check existing issues and pull requests first
|
|
13
|
+
|
|
14
|
+
## Local Setup
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pnpm install
|
|
18
|
+
pnpm check
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Project Structure
|
|
22
|
+
|
|
23
|
+
| Path | Purpose |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| `src/auth` | OAuth, sessions, token refresh, route protection |
|
|
26
|
+
| `src/tenant` | Tenant store, provider, cookie, and server helpers |
|
|
27
|
+
| `src/identity` | Identity cache, client store, and provider |
|
|
28
|
+
| `src/permissions` | Permission store, hooks, components, and server protection |
|
|
29
|
+
| `src/api-client` | API config factory, fetch middleware, and retry/error helpers |
|
|
30
|
+
| `src/query-client` | TanStack Query defaults and utilities |
|
|
31
|
+
| `src/signalr` | Realtime client primitives |
|
|
32
|
+
| `src/logging` | Logging utilities |
|
|
33
|
+
| `src/react-router` | React Router adapter entry points |
|
|
34
|
+
| `docs` | Project documentation |
|
|
35
|
+
|
|
36
|
+
## Contribution Rules
|
|
37
|
+
|
|
38
|
+
- Keep core modules framework-agnostic unless the file is inside an adapter namespace
|
|
39
|
+
- Prefer configuration hooks over hardcoded product behavior
|
|
40
|
+
- Avoid shipping product-specific routes, claim names, endpoint paths, or UI assumptions into core
|
|
41
|
+
- Keep public APIs small and explicit
|
|
42
|
+
- Update documentation when behavior or public APIs change
|
|
43
|
+
- Add or update changelog entries for user-visible changes
|
|
44
|
+
|
|
45
|
+
## Adapter Philosophy
|
|
46
|
+
|
|
47
|
+
When deciding where code should live:
|
|
48
|
+
|
|
49
|
+
- Put it in core if it can work across multiple apps with configuration
|
|
50
|
+
- Put it in an adapter if it depends on framework primitives
|
|
51
|
+
- Keep it in the consuming app if it expresses product policy
|
|
52
|
+
|
|
53
|
+
Examples:
|
|
54
|
+
|
|
55
|
+
- Good for core: token refresh, tenant cookie utilities, permission checks, identity caching
|
|
56
|
+
- Good for adapters: framework-specific redirects, loader wrappers, request helpers
|
|
57
|
+
- Good for apps: setup redirects, entitlement gating, domain permission constants
|
|
58
|
+
|
|
59
|
+
## Pull Request Checklist
|
|
60
|
+
|
|
61
|
+
- `pnpm check` passes
|
|
62
|
+
- Public API changes are documented
|
|
63
|
+
- Changelog is updated when needed
|
|
64
|
+
- No product-specific behavior leaked into core without a configuration escape hatch
|
|
65
|
+
|
|
66
|
+
## Commit Messages
|
|
67
|
+
|
|
68
|
+
Use concise, English commit messages.
|
|
69
|
+
|
|
70
|
+
Examples:
|
|
71
|
+
|
|
72
|
+
- `docs: rewrite README for open source release`
|
|
73
|
+
- `feat: add configurable permission route protection`
|
|
74
|
+
- `refactor: move tenant cookie policy into core config`
|
|
75
|
+
|
|
76
|
+
## Release Notes
|
|
77
|
+
|
|
78
|
+
Maintainers should also read [docs/releasing.md](docs/releasing.md).
|
package/MAINTAINERS.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Maintainers
|
|
2
|
+
|
|
3
|
+
## Current Maintainer
|
|
4
|
+
|
|
5
|
+
- Muhammet Emin Uckan, primary maintainer
|
|
6
|
+
|
|
7
|
+
## Maintainer Responsibilities
|
|
8
|
+
|
|
9
|
+
The maintainer owns:
|
|
10
|
+
|
|
11
|
+
- reviewing issues and pull requests
|
|
12
|
+
- keeping the package installable and documented
|
|
13
|
+
- preserving the boundary between Spine core, framework adapters, and consuming apps
|
|
14
|
+
- coordinating security reports
|
|
15
|
+
- preparing releases and changelog entries
|
|
16
|
+
- validating changes with `pnpm check` and package dry runs
|
|
17
|
+
|
|
18
|
+
## Review Policy
|
|
19
|
+
|
|
20
|
+
Changes should be reviewed against these questions:
|
|
21
|
+
|
|
22
|
+
- Does this solve a repeated SaaS infrastructure problem?
|
|
23
|
+
- Can it work across multiple apps without product-specific naming?
|
|
24
|
+
- Is the core still framework-agnostic?
|
|
25
|
+
- Does this belong in core, a framework adapter, provider guidance, or the app?
|
|
26
|
+
- Are public API changes documented and covered by tests?
|
|
27
|
+
|
|
28
|
+
## Release Policy
|
|
29
|
+
|
|
30
|
+
Spine follows semver. While the package is on a `0.x` line, breaking changes may still happen, but they must be documented and kept migration-friendly where practical.
|
|
31
|
+
|
|
32
|
+
Before publishing:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pnpm check
|
|
36
|
+
npm pack --dry-run
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Codex-Assisted Maintenance
|
|
40
|
+
|
|
41
|
+
Codex may be used to help with issue triage, pull request review, release checks, documentation updates, and security hardening. The maintainer remains responsible for all final decisions, shipped code, and release artifacts.
|
|
42
|
+
|
|
43
|
+
See [docs/codex-maintenance.md](docs/codex-maintenance.md) for the operating plan.
|