Skip to content

[ 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).

terminal
pnpm add @vllnt/convex-memberships
pnpm add @vllnt/convex-memberships@canary

Register the component

Add it to your app’s convex/convex.config.ts, then run npx convex dev to generate the references.

convex/convex.config.ts
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.

Read the 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
WeekDownloads
14 June 2026 to 15 June 2026136
16 June 2026 to 22 June 2026383
23 June 2026 to 29 June 202633
30 June 2026 to 6 July 2026103
7 July 2026 to 13 July 202680
14 July 2026 to 20 July 202635
21 July 2026 to 27 July 20268
28 July 2026 to 3 August 20263
4 August 2026 to 10 August 202613
11 August 2026 to 17 August 202664
18 August 2026 to 24 August 20264
25 August 2026 to 31 August 2026314
1 September 2026 to 7 September 2026356
8 September 2026 to 14 September 202654
15 September 2026 to 21 September 202613
22 September 2026 to 28 September 202615
29 September 2026 to 5 October 20266
6 October 2026 to 12 October 202625
13 October 2026 to 19 October 20269
20 October 2026 to 26 October 202618
27 October 2026 to 2 November 2026169
3 November 2026 to 9 November 2026136
10 November 2026 to 16 November 202652
17 November 2026 to 23 November 202637

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
VersionKindPublished
0.1.1-canary.a415d14canary31 October 2026
0.1.0stable1 September 2026
0.1.0-canary.236426bcanary1 September 2026
0.1.0-canary.ff4f6f8canary31 August 2026
0.1.0-canary.2a0566ccanary31 August 2026
0.1.0-canary.c0aafd7canary31 August 2026
0.1.0-canary.6f96768canary16 June 2026
0.1.0-canary.8550436canary16 June 2026
0.1.0-canary.0e30b96canary16 June 2026
0.1.0-canary.3fc56e6canary14 June 2026

Changelog

The newest stable releases of @vllnt/convex-memberships, with the notes from its changelog.

  1. 0.1.0

    Changed
    • Treat Convex _generated output 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 maximumRowsRead at 1000 for reactive cursor ranges. Listing queries throw INVALID_PAGE_SIZE for invalid numeric pagination options.
    Fixed
    • Skip redundant document patches when an idempotent add leaves classification and status unchanged.
    Added
    • First release of @vllnt/convex-memberships — an auth-agnostic flat ReBAC relationship graph.
    • Sandboxed memberships table holding (memberRef, resourceRef, relation) edges with an opaque, host-classified memberKind and an optional opaque status lifecycle marker.
    • Memberships client: add (idempotent, patches memberKind/status on re-add), remove (returns { removed }), setRelation, listMembers (paginated), members (paginated), isMember (bounded by_member_resource lookup), and documents (paginated doc view exposing createdAt + status).
    • Configurable defaultRelation and defaultMemberKind.
    • Indexes: by_member, by_resource, by_resource_relation, by_member_resource, by_tuple.
    Notes
    • memberKind is an opaque v.string() (default "user") — no closed union, so it makes no domain assumption.
    • add is tuple-idempotent: if the exact (memberRef, resourceRef, relation) tuple already exists, the existing id is returned and memberKind / status are patched to the incoming values. Re-adding with a different memberKind updates the stored classification.
    • setRelation checks whether the source fromRelation edge exists before applying the same-relation no-op. Calling setRelation(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 and fromRelation === toRelation. reason is the typed union "NOT_FOUND" | "EXISTS".
    • Security — unscoped isMember: when called without relation, isMember returns true for any stored relation between the pair. Do not use the unscoped path as an authz gate without enumerating acceptable relations. The scoped path (relation provided) is safe for exact-relation authz checks.
    • MembersRef / ListMembersRef hook-ref types are now typed with concrete Page<ResourceEntry> / Page<MemberEntry> return generics (previously unknown), 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.
All releases of @vllnt/convex-memberships
Stable releases
RSSAtomJSON Feed
Canary builds
RSSAtomJSON Feed

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

Theme