[ CONVEX COMPONENT · STABLE · MIT ]
@vllnt/convex-memberships
Auth-agnostic membership and relationship graph (ReBAC tuples)
STABLE 0.1.0 · 2 GitHub stars
Package details
Install
The untagged install gets the latest stable version (0.1.0). The canary tag tracks main (0.1.1-canary.a415d14).
pnpm add @vllnt/convex-memberships
pnpm add @vllnt/convex-memberships@canaryRegister the component
Add it to your app’s convex/convex.config.ts, then run npx convex dev to generate the references.
import { defineApp } from "convex/server";
import memberships from "@vllnt/convex-memberships/convex.config";
const app = defineApp();
app.use(memberships);
export default app;Use it
Usage, options and examples are in the package README.
Downloads
- Last 7 days
- 37
- Since first publish
- 2,066
Downloads per week since 14 June 2026, oldest on the left. Weeks count back from 23 November 2026, so the first one may be shorter than seven days.
37 downloads in the last 7 days. 2,066 downloads since 14 June 2026. Source: npm, counted through 23 November 2026.
Show downloads per week as a table
| Week | Downloads |
|---|---|
| 14 June 2026 to 15 June 2026 | 136 |
| 16 June 2026 to 22 June 2026 | 383 |
| 23 June 2026 to 29 June 2026 | 33 |
| 30 June 2026 to 6 July 2026 | 103 |
| 7 July 2026 to 13 July 2026 | 80 |
| 14 July 2026 to 20 July 2026 | 35 |
| 21 July 2026 to 27 July 2026 | 8 |
| 28 July 2026 to 3 August 2026 | 3 |
| 4 August 2026 to 10 August 2026 | 13 |
| 11 August 2026 to 17 August 2026 | 64 |
| 18 August 2026 to 24 August 2026 | 4 |
| 25 August 2026 to 31 August 2026 | 314 |
| 1 September 2026 to 7 September 2026 | 356 |
| 8 September 2026 to 14 September 2026 | 54 |
| 15 September 2026 to 21 September 2026 | 13 |
| 22 September 2026 to 28 September 2026 | 15 |
| 29 September 2026 to 5 October 2026 | 6 |
| 6 October 2026 to 12 October 2026 | 25 |
| 13 October 2026 to 19 October 2026 | 9 |
| 20 October 2026 to 26 October 2026 | 18 |
| 27 October 2026 to 2 November 2026 | 169 |
| 3 November 2026 to 9 November 2026 | 136 |
| 10 November 2026 to 16 November 2026 | 52 |
| 17 November 2026 to 23 November 2026 | 37 |
Release history
Every release on a timeline, oldest on the left. A tall mark with its version is a stable release; a short mark is a canary build. The time axis is the one of the downloads chart, so a release stands above the week it shipped in.
1 stable release and 9 canary builds since 14 June 2026. Latest stable: 0.1.0 on 1 September 2026.
Show every release as a table
| Version | Kind | Published |
|---|---|---|
| 0.1.1-canary.a415d14 | canary | 31 October 2026 |
| 0.1.0 | stable | 1 September 2026 |
| 0.1.0-canary.236426b | canary | 1 September 2026 |
| 0.1.0-canary.ff4f6f8 | canary | 31 August 2026 |
| 0.1.0-canary.2a0566c | canary | 31 August 2026 |
| 0.1.0-canary.c0aafd7 | canary | 31 August 2026 |
| 0.1.0-canary.6f96768 | canary | 16 June 2026 |
| 0.1.0-canary.8550436 | canary | 16 June 2026 |
| 0.1.0-canary.0e30b96 | canary | 16 June 2026 |
| 0.1.0-canary.3fc56e6 | canary | 14 June 2026 |
Changelog
The newest stable releases of @vllnt/convex-memberships, with the notes from its changelog.
0.1.0
Changed
- Treat Convex
_generatedoutput as CLI-owned, exclude it from formatting, and expose a dedicated codegen script. - Require
convex@^1.45.0. - Bound all paginated membership reads to integer page sizes from 1 through 1000
and cap
maximumRowsReadat 1000 for reactive cursor ranges. Listing queries throwINVALID_PAGE_SIZEfor invalid numeric pagination options.
Fixed
- Skip redundant document patches when an idempotent
addleaves classification and status unchanged.
Added
- First release of
@vllnt/convex-memberships— an auth-agnostic flat ReBAC relationship graph. - Sandboxed
membershipstable holding(memberRef, resourceRef, relation)edges with an opaque, host-classifiedmemberKindand an optional opaquestatuslifecycle marker. Membershipsclient:add(idempotent, patchesmemberKind/statuson re-add),remove(returns{ removed }),setRelation,listMembers(paginated),members(paginated),isMember(boundedby_member_resourcelookup), anddocuments(paginated doc view exposingcreatedAt+status).- Configurable
defaultRelationanddefaultMemberKind. - Indexes:
by_member,by_resource,by_resource_relation,by_member_resource,by_tuple.
Notes
memberKindis an opaquev.string()(default"user") — no closed union, so it makes no domain assumption.addis tuple-idempotent: if the exact(memberRef, resourceRef, relation)tuple already exists, the existing id is returned andmemberKind/statusare patched to the incoming values. Re-adding with a differentmemberKindupdates the stored classification.setRelationchecks whether the sourcefromRelationedge exists before applying the same-relation no-op. CallingsetRelation(m, r, "x", "x")on a non-existent edge returns{ ok: false, reason: "NOT_FOUND" }, not{ ok: true }. The{ ok: true }no-op only fires when the edge exists andfromRelation === toRelation.reasonis the typed union"NOT_FOUND" | "EXISTS".- Security — unscoped
isMember: when called withoutrelation,isMemberreturnstruefor any stored relation between the pair. Do not use the unscoped path as an authz gate without enumerating acceptable relations. The scoped path (relationprovided) is safe for exact-relation authz checks. MembersRef/ListMembersRefhook-ref types are now typed with concretePage<ResourceEntry>/Page<MemberEntry>return generics (previouslyunknown), giving hosts full type safety.- Tuple reads use
.first()so a stray duplicate row degrades gracefully rather than hard-throwing. - Transitive expansion (
expandMembers/resolve) is deferred to vNext; edges are flat.
- Treat Convex
Licence
Released under the MIT licence. The full text is in the source repository.
[ PACKAGE ]
- Stable
- 0.1.0
- Canary
- 0.1.1-canary.a415d14
- GitHub stars
- 2 GitHub stars
- Licence
- MIT
- Issues
- Open an issue