Skip to content

[ CONVEX COMPONENT · STABLE · MIT ]

@vllnt/convex-progression

XP, levels, and streak windows

STABLE 0.1.0 · 0 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.1f83d62).

terminal
pnpm add @vllnt/convex-progression
pnpm add @vllnt/convex-progression@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 progression from "@vllnt/convex-progression/convex.config";
const app = defineApp();
app.use(progression);
export default app;

Use it

Usage, options and examples are in the package README.

Read the README

Downloads

Last 7 days
847
Since first publish
4,599

Downloads per week since 12 September 2026, oldest on the left. Weeks count back from 23 November 2026, so the first one may be shorter than seven days.

847 downloads in the last 7 days. 4,599 downloads since 12 September 2026. Source: npm, counted through 23 November 2026.

Show downloads per week as a table
WeekDownloads
12 September 2026 to 14 September 2026678
15 September 2026 to 21 September 2026264
22 September 2026 to 28 September 2026267
29 September 2026 to 5 October 2026141
6 October 2026 to 12 October 2026162
13 October 2026 to 19 October 2026308
20 October 2026 to 26 October 2026307
27 October 2026 to 2 November 2026970
3 November 2026 to 9 November 2026346
10 November 2026 to 16 November 2026309
17 November 2026 to 23 November 2026847

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 12 September 2026. Latest stable: 0.1.0 on 22 November 2026.

Show every release as a table
VersionKindPublished
0.1.1-canary.1f83d62canary23 November 2026
0.1.0stable22 November 2026
0.1.0-canary.a6dae8ccanary22 November 2026
0.1.0-canary.2f45a59canary22 November 2026
0.1.0-canary.5f68ae5canary31 October 2026
0.1.0-canary.605370dcanary30 October 2026
0.1.0-canary.1cda2fecanary30 October 2026
0.1.0-canary.7758b3bcanary24 October 2026
0.1.0-canary.687bbebcanary12 September 2026
0.1.0-canary.0canary12 September 2026

Changelog

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

  1. 0.1.0

    First stable release. Earlier builds were published only to the canary dist-tag.

    Added
    • XP, levels and streaks per opaque (scope, subjectRef, key):
      • accrue adds XP and reports leveledUp / previousLevel. level is the number of host-supplied thresholds the XP has reached.
      • recordActivity records a host periodKey. A matching expectedPrevious continues the streak, the same period leaves it unchanged, anything else restarts it at 1. It tracks maxStreak.
      • get returns the state or null, and recomputes level when thresholds are passed.
      • reset deletes one row; eraseSubject deletes a subject in bounded batches (default 200, clamped to 500) and reschedules until clean.
    • Host-wrapper design: the component stores one sandboxed progress table and never reads host tables or environment. The host owns auth, refs, thresholds and period keys.
    • Multiple named mounts with isolated tables and scheduled work.
    • @vllnt/convex-progression/test exports register for convex-test.
    Guarantees and limits
    • Fail closed: invalid input throws a ConvexError with a code (INVALID_REF, INVALID_THRESHOLDS, INVALID_DELTA, INVALID_BATCH, XP_OVERFLOW, STREAK_OVERFLOW). XP and streaks stay within MAX_SAFE_INTEGER, and an award that would be silently lost to floating-point precision is rejected.
    • get returns null for an empty or over-long ref so reactive queries with placeholder values do not error; mutations reject them with INVALID_REF.
    • Awards are not event-idempotent, periods are opaque and unordered, and erasure has no write fence or completion token: the host deduplicates, orders and fences. See docs/API.md.
    • Tests use the convex-test simulation, not a real Convex backend.
    Release process
    • Stable releases are published only from a vX.Y.Z tag on main through npm trusted publishing with provenance. Test files are not shipped.
All releases of @vllnt/convex-progression
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.1f83d62
GitHub stars
0 GitHub stars
Licence
MIT

Theme