The catalog

104 packages, zero dependencies

Every one is isomorphic TypeScript, dual ESM + CJS, and free under the Lacspace Free Licence. Search, filter, switch package manager, and tick the ones you need to build a single install command.

102 shown

Core · 7

Event tracking for Lacspace platforms — a spec-style track/identify/page/group/alias client with batching, an offline retry queue, consent + Do-Not-Track gating, and pluggable middleware. Every transport, clock and timer is injectable, so it never touches the network by default.

lacspaceanalyticstrackingevents
npm i @lacspace/analytics
1 @lacspace depCorenpm ↗

Privacy-first, cookieless web analytics — page views and custom events sent to your own endpoint. No cookies, no localStorage IDs, no cross-site tracking, no consent banner. Respects Do-Not-Track, auto-tracks SPA navigation, uses sendBeacon. Now with a batching LiteClient, a sendBeacon-first transport, UTM parsing, DNT/consent helpers and a CSPRNG id. Zero-dependency, isomorphic.

analyticsweb-analyticsprivacycookieless
npm i @lacspace/analytics-lite
0 depsCorenpm ↗

Lightweight, zero-dependency, isomorphic TypeScript HTTP client for Lacspace APIs — retries with backoff, interceptors, timeouts/abort, page- & cursor-pagination, plus dependency-free query-string, URL/path, header-merge, form-body and typed-error helpers.

lacspaceapihttp-clientfetch
npm i @lacspace/api
0 depsCorenpm ↗

Authentication flows (login, register, token, refresh) for Lacspace APIs — now with PKCE/OIDC helpers, JWT expiry math, scope/role checks and proactive token refresh.

lacspaceauthauthenticationlogin
npm i @lacspace/auth
1 @lacspace depCorenpm ↗

Next.js App Router integration for the Lacspace SDK — authenticated server client from cookies, Route Handler/Server Action wrappers, CSRF + middleware auth guard, plus edge-safe pure helpers for cookies, Cache-Control, route matching, open-redirect-safe redirects and bearer tokens.

nextjsnextapp-routerserver-components
npm i @lacspace/next
1 @lacspace depCorenpm ↗

React hooks and provider for the Lacspace SDK — useAuth, useQuery, useMutation, useAuthStatus and useLacspace, all sharing one authenticated client, over a pure DOM-free core (async state machine, retry/backoff, polling) you can unit-test anywhere.

lacspacereacthookssdk
npm i @lacspace/react
1 @lacspace depCorenpm ↗

High-level TypeScript SDK for Lacspace — api, auth, analytics and e-commerce sharing one connection and token. Now with named environment presets, a config merger, correlation/idempotency ids, health probes, typed error normalization and transport-agnostic pagination.

lacspacesdkecommerceauth
npm i @lacspace/sdk
3 @lacspace depsCorenpm ↗

Security Kit · 11

Issue & verify API keys the right way — prefixed high-entropy keys, store only the SHA-256 hash, constant-time verify, plus a storage-agnostic record toolkit: public fingerprints, hierarchical scopes, expiry, key rotation with a grace window, and revocation. Isomorphic over Web Crypto.

api-keyapikeytokensecret
npm i @lacspace/apikey
1 @lacspace depSecurity Kitnpm ↗

Safe, boring cryptography over Web Crypto — authenticated AES-256-GCM, PBKDF2/HKDF key derivation, SHA-256/384/512, HMAC, timing-safe compare and unbiased secure random (tokens, UUIDs, integers). Isomorphic (Node, edge, browser, RN).

cryptoaesaes-256-gcmencryption
npm i @lacspace/crypto
0 depsSecurity Kitnpm ↗

Secure HTTP headers & a typed Content-Security-Policy builder — HSTS, CSP nonces & hashes, a typed Permissions-Policy, COOP/COEP/CORP cross-origin isolation, Reporting-Endpoints and report-only, plus ready-made strict and API presets. Framework-agnostic + Next.js. Zero-dependency, isomorphic.

security-headerscspcontent-security-policyhsts
npm i @lacspace/headers
0 depsSecurity Kitnpm ↗

JSON Web Tokens over Web Crypto — HS/RS/ES/EdDSA signing, JWK/JWKS with kid-based key rotation, and strict expiry/issuer/audience/subject/jti checks. Plus refresh-token rotation and CSRF tokens. Isomorphic — Node, edge, browser.

jwtjsonwebtokenhs256token
npm i @lacspace/jwt
1 @lacspace depSecurity Kitnpm ↗

Account lockout & brute-force protection (server lock) — N-strikes with exponential or progressive/tiered backoff, per-account + per-IP composite locking, allow/deny lists, and a CAPTCHA step-up threshold before hard lockout. Pluggable store, zero-dependency, isomorphic.

account-lockoutbrute-forcelogin-securitylockout
npm i @lacspace/lock
0 depsSecurity Kitnpm ↗

Orchestrate multi-factor auth — combine password + TOTP + passkeys into 2FA/3FA step-up flows with NIST assurance levels (AAL), now with factor enrollment flows, failed-attempt lockout, trusted-device tokens and recovery codes. Isomorphic (bar @lacspace/otp).

mfa2fa3famulti-factor
npm i @lacspace/mfa
2 @lacspace depsSecurity Kitnpm ↗

TOTP & HOTP two-factor auth, Google Authenticator compatible — generate secrets, compute/verify codes, parse and build otpauth:// QR URIs, and issue single-use recovery codes. Built on Web Crypto: Node, edge and browser. Zero-dependency, isomorphic.

otptotphotp2fa
npm i @lacspace/otp
0 depsSecurity Kitnpm ↗

Password hashing & verification — PBKDF2-HMAC-SHA256 (OWASP iterations, portable PHC string) plus a zxcvbn-style strength estimator, k-anonymity breach check, a configurable policy evaluator, and CSPRNG passphrase/password generators. Isomorphic over Web Crypto.

passwordhashpbkdf2password-hashing
npm i @lacspace/password
1 @lacspace depSecurity Kitnpm ↗

Framework-agnostic rate limiting — five algorithms (fixed, sliding-window log & weighted counter, token bucket, leaky bucket) over a pluggable store, with cost-weighted requests, composite and per-route limiters, and standard IETF RateLimit-* + legacy X-RateLimit-* headers. For API routes, middleware and edge. Zero-dependency, isomorphic.

rate-limitrate-limiterthrottletoken-bucket
npm i @lacspace/rate-limit
0 depsSecurity Kitnpm ↗

Redact secrets & PII from logs — masks by sensitive key and by pattern (Luhn-checked cards, SSNs, JWTs, IBANs, IPs, AWS/GitHub/Slack/Stripe keys, private keys). Cycle-safe deep object redaction with partial masking, custom patterns and a never-throw guarantee. Zero-dependency, isomorphic.

redactmaskpiisecrets
npm i @lacspace/redact
0 depsSecurity Kitnpm ↗

Passkeys / biometric (FaceID, fingerprint, security keys) — browser ceremony helpers + server-side ES256/RS256/Ed25519 verification over Web Crypto, with passkey-sync backup flags, AAGUID, UV/resident-key policy and transports. Zero-dependency, isomorphic.

webauthnpasskeyfido2biometric
npm i @lacspace/webauthn
0 depsSecurity Kitnpm ↗

SEO Kit · 8

Generate, parse, and validate llms.txt / llms-full.txt (the llmstxt.org standard) — build both from your sitemap, routes, or a page list, with ## Optional blocks. A Markdown map of your site for LLMs. Zero-dependency, isomorphic.

llms-txtllms-full-txtllmstxtai-seo
npm i @lacspace/llms-txt
0 depsSEO Kitnpm ↗

Dynamic Open Graph images — a share-card design system you configure once and call per page. Produces a next/og element tree AND a zero-dependency SVG from the same options, with 7 templates (article, product, quote, event, split, minimal), named gradient & surface presets, image/avatar embedding and auto-fitting multi-line titles. Zero-dependency, isomorphic.

og-imageopen-graphopengraphsocial-image
npm i @lacspace/og
0 depsSEO Kitnpm ↗

Build and parse robots.txt — typed per-user-agent rules, crawl-delay & clean-param, sitemap refs, a parser + longest-match isAllowed(), and one-liners to block/allow AI crawlers per-agent from a 21-bot catalog (GPTBot, ClaudeBot, CCBot, Google-Extended, PerplexityBot…). Next.js robots.ts output. Zero-dependency, isomorphic.

robots-txtrobotsseocrawler
npm i @lacspace/robots
0 depsSEO Kitnpm ↗

Generate RSS 2.0, Atom 1.0 and JSON Feed 1.1 from one item set — with podcast (iTunes) tags, enclosures, media, rich channel metadata and a one-call feeds() builder. Zero-dependency, isomorphic.

rssatomjson-feedfeed
npm i @lacspace/rss
0 depsSEO Kitnpm ↗

Typed metadata + JSON-LD for modern web apps — schema.org builders (Organization, Article, Product, FAQ, Breadcrumb, Event, Dataset, Book, Podcast), robots directives, richer Open Graph & Twitter cards, canonical + hreflang alternates, a Next.js App Router Metadata helper, the defineSite() SEO Autopilot engine, and an on-page SEO auditor with a CI sitemap crawler (`npx @lacspace/seo audit <url>` / `crawl <site> --min-grade A`). Zero-dependency, isomorphic.

seojson-ldstructured-dataschema-org
npm i @lacspace/seo
0 depsSEO Kitnpm ↗

Search-engine site verification — meta tags, DNS TXT records, upload files, Next.js verification metadata, batch emit, and tag parsing for Google Search Console, Bing, Yandex, Baidu, Pinterest, Ahrefs, Facebook & more. Zero-dependency, isomorphic.

site-verificationgoogle-search-consolebing-webmasteryandex
npm i @lacspace/site-verify
0 depsSEO Kitnpm ↗

Generate sitemap.xml, sitemap indexes and Next.js sitemaps — image/video/news extensions, hreflang alternates, auto-split at 50k URLs, plus priority/changefreq/lastmod validators and a URL-count guard. Zero-dependency, isomorphic.

sitemapsitemap-xmlsitemap-generatorseo
npm i @lacspace/sitemap
0 depsSEO Kitnpm ↗

Turn any text into a clean, SEO-friendly URL slug — transliterates diacritics/Cyrillic/Greek, expands symbols, truncates on word boundaries, and guarantees uniqueness with a stateful slugger(). Validate with isSlug, plus strict/locale options. Zero-dependency, isomorphic.

slugifyslugurl-slugseo
npm i @lacspace/slugify
0 depsSEO Kitnpm ↗

React Kit · 7

Essential, SSR-safe React hooks — useLocalStorage, useDebounce, useMediaQuery, useOnClickOutside plus new usePagination, useStep, useHistory (undo/redo), useList and useBreakpoint. 35+ hooks built on pure, DOM-free helpers. Zero-dependency, fully typed, isomorphic.

reactreact-hookshooksuselocalstorage
npm i @lacspace/hooks
0 depsReact Kitnpm ↗

Ergonomic keyboard shortcuts for React — mod+k combos, g-then-d sequences, named scopes and ⌘K formatting, built on a pure, React-free matching core you can reuse anywhere. SSR-safe, respects form fields, zero-dependency, fully typed.

reacthotkeyskeyboard-shortcutsusehotkeys
npm i @lacspace/hotkeys
0 depsReact Kitnpm ↗

Tiny data fetching for React — useQuery + useMutation in ~2KB over a shared, deduped, stale-while-revalidate cache. Now with a pure, framework-agnostic core: query invalidation with structural key matching, cache inspection/subscriptions, retry/backoff and GC. Zero-dependency, SSR-safe, fully typed.

reactdata-fetchingusequeryusemutation
npm i @lacspace/query
0 depsReact Kitnpm ↗

Minimal global state for React in ~1KB — create a store, select slices, no provider. A React-free vanilla core adds persist/logger middleware, memoized computed values, subscribe-with-selector and slice composition. Zero-dependency, SSR-safe, fully typed.

reactstate-managementstoreusesyncexternalstore
npm i @lacspace/store
0 depsReact Kitnpm ↗

SSR-safe dark / light / system theming for React — a tiny ThemeProvider, useTheme hook and no-flash inline script. Now ships a pure, framework-agnostic core: theme resolution, CSS-variable & stylesheet generation from design tokens, WCAG contrast helpers and an injectable-storage theme controller. Zero-dependency, fully typed.

reactthemedark-modelight-mode
npm i @lacspace/theme
0 depsReact Kitnpm ↗

A tiny, dependency-free React kit that makes a page feel alive — scroll reveals, animated counters, gradient text, tilt cards, marquees, a typewriter and a ⌘K command palette — plus framework-agnostic helpers (easings, a variant class builder, tilt/gradient math, command filter & scorer). No animation library, no CSS import. Respects prefers-reduced-motion; Tailwind-friendly.

reactreact-componentsanimationscroll-reveal
npm i @lacspace/ui
0 depsReact Kitnpm ↗

Headless list virtualization for React — render only the rows in view, with fixed or dynamically-measured sizes, overscan, sticky/pinned headers, horizontal lists and scroll-to-index. Ships a pure, React-free math core you can run anywhere. Zero-dependency, SSR-safe, fully typed.

reactvirtualizationvirtual-listusevirtualizer
npm i @lacspace/virtual
0 depsReact Kitnpm ↗

App & Utils Kit · 12

A tiny in-memory cache — LRU/LFU eviction, per-entry TTL, stale-while-revalidate, tag invalidation and hit/miss stats, plus wrap()/getOrSet()/memoize() to cache any async function with single-flight de-duplication. Zero-dependency, isomorphic.

cachelrulru-cachettl
npm i @lacspace/cache
0 depsApp & Utils Kitnpm ↗

Convert strings between cases — camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title/Sentence/Header/Capital Case and more, with a unicode-aware word splitter, an opt-in acronym registry, and is<Case> detectors. Zero-dependency, isomorphic.

casecamelcasepascalcasesnakecase
npm i @lacspace/case
0 depsApp & Utils Kitnpm ↗

Parse, convert, manipulate and check colours — hex/rgb/hsl/hsv/oklch plus 148 CSS names, lighten/darken/mix/invert/complement, tints/shades & colour-wheel harmonies, and WCAG contrast for accessible UIs. Zero-dependency, isomorphic.

colorcolourhexrgb
npm i @lacspace/color
0 depsApp & Utils Kitnpm ↗

Typed, validated environment variables — declare a schema, validate at boot, get a typed frozen object or one clear aggregated error. Coercers for ports, URLs, durations, byte sizes, lists & enums, ${VAR} expansion, secret-redacted errors and non-throwing safe-parse. A zero-dependency t3-env / envalid alternative.

envenvironment-variablesdotenvenv-validation
npm i @lacspace/env
0 depsApp & Utils Kitnpm ↗

Feature flags & A/B experiments with no SaaS and no infrastructure — deterministic percentage rollouts, targeting segments, weighted variants, kill switches and per-user QA overrides, with an explain() that tells you why each flag resolved. Synchronous, zero-dependency, isomorphic.

feature-flagsfeature-togglefeature-flagab-testing
npm i @lacspace/flags
0 depsApp & Utils Kitnpm ↗

End-to-end form handling — turn FormData into typed, validated, spam-guarded data on the server (Next.js Server Actions), and manage interactive form state on the client (values/errors/touched/dirty, sync+async validation, nested paths, field arrays). One framework-free, zero-dependency package.

formform-handlingform-validationformdata
npm i @lacspace/form
0 depsApp & Utils Kitnpm ↗

Turn machine values into human-readable text — bytes, durations, relative time, ordinals, plurals, compact numbers, grammatical lists, number-to-words, Roman numerals and SI units. Zero-dependency, isomorphic — one typed package instead of a pile of tiny formatting libs.

humanizepretty-bytesformat-bytesduration
npm i @lacspace/humanize
0 depsApp & Utils Kitnpm ↗

Every ID kind you need — UUID v4/v7, ULID, cuid2, Snowflake, Nano-ID, base62/base58 and Stripe-style prefixed ids. Custom alphabets with unbiased sampling, time-sortable ids with decodeTime. Cryptographically random (Web Crypto), zero-dependency, isomorphic.

uuiduuidv4uuidv7uuid-v7
npm i @lacspace/id
0 depsApp & Utils Kitnpm ↗

A small, safe Markdown → HTML renderer — headings with anchor ids, nested & task lists, fenced code, GFM tables, strikethrough and autolinks. HTML in the source is escaped by default. Plus YAML frontmatter parsing, a nested table of contents, plain-text excerpts and an HTML sanitizer. Zero-dependency, isomorphic.

markdownmdmarkdown-to-htmlmarked-alternative
npm i @lacspace/markdown
0 depsApp & Utils Kitnpm ↗

Money done right — integer minor units (no floating-point cent bugs), currency-safe arithmetic, remainder-preserving allocation/split, explicit rounding modes (incl. banker's), Intl and Intl-free formatting, string parsing, and injected-rate conversion. Zero-dependency, isomorphic.

moneycurrencydinero-alternativeminor-units
npm i @lacspace/money
0 depsApp & Utils Kitnpm ↗

Resilience for flaky calls — retry with exponential backoff & jitter, per-call timeouts, and a circuit breaker. Zero-dependency, isomorphic.

retrybackoffexponential-backoffjitter
npm i @lacspace/retry
0 depsApp & Utils Kitnpm ↗

A tiny, typed schema validator with Zod-style ergonomics — parse/safeParse, objects/arrays/tuples, unions & discriminated unions, records/maps/sets, recursive (lazy) schemas, coercion, refinements/transforms/pipes, and nested form-error formatting, all fully type-inferred. Zero-dependency, isomorphic.

validationschemavalidatorzod-alternative
npm i @lacspace/validate
0 depsApp & Utils Kitnpm ↗

Backend Kit · 4

Make any operation exactly-once with an idempotency key — fingerprint the request (reject key-reuse with a different body), replay the stored response on retries, lock in-flight duplicates, and sweep expired records. Framework-agnostic, pluggable store, zero-dependency, isomorphic.

idempotencyidempotency-keyidempotentexactly-once
npm i @lacspace/idempotency
0 depsBackend Kitnpm ↗

Generate real PDFs — invoices, receipts & documents — with zero dependencies and no headless browser. Accurate text layout, auto page-breaks and batteries-included invoice() & receipt() generators, now with tables, JPEG/raw images, page sizes & landscape, Times/Courier fonts, page numbers, bookmarks and Info metadata. Isomorphic (Node, edge, browser).

pdfpdf-generatorinvoiceinvoice-pdf
npm i @lacspace/pdf
0 depsBackend Kitnpm ↗

HMAC-signed, expiring URLs & tokens over Web Crypto — secure download links, magic-login links, unsubscribe and one-time-action tokens — now with key rotation, method/IP/path binding, single-use nonces, signed claims and clock tolerance. Tamper-proof, timing-safe. Isomorphic (Node, edge, browser).

signed-urlsigned-tokenhmacexpiring-url
npm i @lacspace/signed-url
1 @lacspace depBackend Kitnpm ↗

The webhook toolkit for both directions — sign & deliver outgoing webhooks with retries/backoff, verify incoming ones (timing-safe, replay-protected) with Stripe / GitHub / Shopify presets, plus typed event envelopes, exactly-once idempotency and pure endpoint routing. One internal dependency (@lacspace/crypto), isomorphic.

webhookwebhookswebhook-signatureverify-webhook
npm i @lacspace/webhooks
1 @lacspace depBackend Kitnpm ↗

Mail Kit · 4

Compose bulletproof, responsive, dark-mode HTML emails from simple blocks, plus 13 ready-made transactional templates (OTP, verify, password-reset, magic-link, receipt, order, shipping, invitation, digest, announcement). Ships plaintext generation, preheaders and {{var}} i18n interpolation. Zero-dependency, isomorphic.

email-templatehtml-emailresponsive-emailtransactional-email
npm i @lacspace/email-templates
0 depsMail Kitnpm ↗

Smart, network-free email validation — RFC-5322 syntax (incl. quoted local parts & IP-literal domains), disposable/temp-mail & role-account detection, free-provider flags, Gmail normalization and 'did you mean?' typo suggestions. Zero-dependency, isomorphic.

email-validationemail-validatordisposable-emailtemp-mail
npm i @lacspace/email-validate
0 depsMail Kitnpm ↗

Best-effort email deliverability for Node — syntax + disposable/role, MX lookup with priority ranking, an optional SMTP RCPT probe (no mail sent), catch-all detection, a 0-100 confidence score, and de-duped batch verification. All DNS/SMTP injectable; zero npm dependencies.

email-verificationemail-verifymx-lookupsmtp-check
npm i @lacspace/email-verify
1 @lacspace depMail Kitnpm ↗

A tiny zero-dependency SMTP client for Node — send email over raw net/tls with STARTTLS & AUTH, plus a fluent MIME builder (inline images, attachments, alternatives), RFC 5322 address + RFC 2047 helpers, batch send with retry, and no-network test transports. Provider presets (Hostinger, Gmail, Outlook, Zoho…) make setup one line.

smtpemailmailersend-email
npm i @lacspace/mailer
0 depsMail Kitnpm ↗

StockKit · 4

30+ streaming technical indicators (RSI, MACD, EMA, Bollinger, ATR, Supertrend, ADX, VWAP, Ichimoku, Parabolic SAR, StochRSI, CCI, MFI, Keltner, Donchian, OBV, CMF and more) with O(1) incremental next() updates for live price feeds, plus batch helpers. Zero-dependency.

technical-indicatorstradingstock-marketrsi
npm i @lacspace/indicators
0 depsStockKitnpm ↗

Stock-market money math — P&L, returns, CAGR, XIRR, tick/lot rounding, circuit limits, position sizing and an Indian brokerage & charges calculator (STT, GST, SEBI, stamp), plus OHLCV candle resampling & gap detection, VWAP, corporate-action adjusted-close and beta/log-returns. Zero-dependency.

stock-markettradingbrokerage-calculatorstt
npm i @lacspace/market
0 depsStockKitnpm ↗

Holiday-aware, timezone-correct trading clock — is NSE/BSE/NYSE/LSE open now, which session segment (pre-open/regular/post), next open/close, half-days and the next N sessions. Built-in presets for 8 exchanges (DST-correct) or bring your own spec. Zero-dependency.

market-hourstrading-hoursstock-marketnse
npm i @lacspace/market-clock
0 depsStockKitnpm ↗

Headless paper-trading engine — a virtual wallet with market, limit, stop, stop-limit and trailing-stop orders (plus DAY/GTC/IOC/FOK time-in-force) that fill against live price ticks, average-cost positions with realized & unrealized P&L, pluggable commission + slippage models, and equity-curve/drawdown analytics. The simulator core behind StockYatra. Zero-dependency.

paper-tradingtrading-simulatorstock-marketvirtual-trading
npm i @lacspace/paper-trade
0 depsStockKitnpm ↗

Data Kit · 2

Correct, RFC 4180 CSV parsing & stringifying — quoted fields, escaped quotes, newlines in cells, CRLF, custom dialects (delimiter/quote/escape/comment), TSV & BOM, plus opt-in type coercion, column mapping and a chunked/streaming parser. Zero-dependency, isomorphic.

csvcsv-parsercsv-parsecsv-stringify
npm i @lacspace/csv
0 depsData Kitnpm ↗

Read & write real Excel (.xlsx) with zero dependencies and no headless browser — objects or arrays to a workbook, typed cells (string/number/boolean/Date), per-column number formats, bold headers, column widths, multiple sheets, and built-in CSV↔XLSX conversion. Isomorphic (Node, edge, browser).

xlsxexcelexcel-exportxlsx-writer
npm i @lacspace/xlsx
0 depsData Kitnpm ↗

Nepal Toolkit · 2

Bikram Sambat (BS) ↔ Gregorian (AD) date conversion — zero-dependency, isomorphic, with token formatting (Nepali digits & names), BS date arithmetic, parsing, calendar-month and fiscal-year helpers.

nepali-datebikram-sambatbs-datenepali-calendar
npm i @lacspace/nepali-date
0 depsNepal Toolkitnpm ↗

Everyday Nepal helpers — NPR currency formatting (integer-paisa parse/format), Devanagari numerals, amount-in-words (Nepali & Roman), validators (vehicle plate, citizenship), provinces & district lookup. Zero-dependency.

nepalnepalinprcurrency
npm i @lacspace/nepali-utils
0 depsNepal Toolkitnpm ↗

Commerce & Ledger · 13

Structured audit-trail toolkit — who did what, when, with before/after diffs, actor attribution and field-level redaction; seal events into a tamper-evident SHA-256 hash chain (with retention pruning + verifiable checkpoints); and query, filter and export the trail to NDJSON/JSON. Zero-dependency, isomorphic.

audit-logaudit-trailtamper-evidenthash-chain
npm i @lacspace/audit-log
0 depsCommerce & Ledgernpm ↗

Headless, framework-agnostic shopping-cart engine — pure, immutable & serializable. Line-item options/add-ons, line & cart discounts (%/fixed), injectable tax hooks (inclusive/exclusive), a full totals breakdown, plus serialize/hydrate/merge — all in integer minor units. Isomorphic (Node, edge, browser).

cartshopping-cartecommercecheckout
npm i @lacspace/cart
0 depsCommerce & Ledgernpm ↗

Commission & payout engine — flat/percent/marginal-tier/progressive-slab rules with caps & floors, composite and per-category rates, tax-on-commission (inclusive/exclusive), explicit rounding modes, and a marketplace split (platform + seller + affiliate) whose lines conserve the gross exactly. Integer minor units, zero floats. Isomorphic.

commissionpayoutmarketplacetiered
npm i @lacspace/commission
0 depsCommerce & Ledgernpm ↗

Discount & coupon engine — percent, fixed, free-shipping, BOGO and tiered codes, with validity windows, total/per-user limits, first-order and product/category scope, a currency guard, safe coupon stacking and CSPRNG code generation. Integer minor units, no float drift. Zero-dependency, isomorphic.

coupondiscountpromo-codevoucher
npm i @lacspace/coupon
0 depsCommerce & Ledgernpm ↗

Courier / last-mile delivery toolkit — a canonical delivery state machine, tracking-number validation with carrier detection (UPS/FedEx/USPS/DHL + regional, check digits), tracking-event timelines, business-day ETA/SLA, tracking-URL building, a Pathao (Nepal) adapter, and inbound webhook verification + status normalization. Zero-dependency, isomorphic.

courierlogisticsdeliverypathao
npm i @lacspace/courier
0 depsCommerce & Ledgernpm ↗

Headless stock engine that prevents overselling — reserve/commit/restock over plain { onHand, reserved } state, plus multi-location transfers, reorder points, lot/expiry FIFO-FEFO allocation, and an append-only movements ledger with low-stock & expiring-soon reports. Immutable, bring-your-own-store, isomorphic.

inventorystockreservationoversell
npm i @lacspace/inventory
0 depsCommerce & Ledgernpm ↗

Invoice model, numbering and tax-rollup engine — per-line and total calculation, tax grouped by rate, sequential invoice numbers, a status lifecycle, partial payments, credit notes and a render-ready row structure for PDF/XLSX. Integer minor units, zero-dependency, isomorphic.

invoiceinvoicingbillingtax
npm i @lacspace/invoice
0 depsCommerce & Ledgernpm ↗

A tiny double-entry ledger & wallet in integer minor units — balanced journal entries, a chart of accounts with correct normal balances, trial balance, Balance Sheet & Income Statement, period close and idempotent posting. Immutable, zero-dep, isomorphic.

ledgerdouble-entryaccountingwallet
npm i @lacspace/ledger
0 depsCommerce & Ledgernpm ↗

Headless order-lifecycle engine — an immutable order model with a state machine, order-number generation, partial fulfillment tracking, refund tracking, on-demand totals recompute and a typed audit-trail timeline. Integer minor units, zero-dependency, isomorphic.

orderorder-managementecommercestate-machine
npm i @lacspace/order
0 depsCommerce & Ledgernpm ↗

Returns / RMA workflow and refund engine — line-level partial refunds with proportional tax & shipping, restocking fees, a reason-code policy check (injectable clock), multi-tender split refunds, restock lists and a return state machine. Remainder-safe integer minor units, zero-dependency, isomorphic.

refundreturnsrmaecommerce
npm i @lacspace/refund
0 depsCommerce & Ledgernpm ↗

Settlement, netting & reconciliation for marketplace payouts — batch-settle transactions per payee, deduct commission/fees/tax, hold rolling reserves, schedule payout dates (skipping weekends & holidays) and build statements. Integer minor units, pure functions. Isomorphic.

settlementnettingreconciliationpayouts
npm i @lacspace/settlement
0 depsCommerce & Ledgernpm ↗

Checkout-time shipping-rate calculator — zone rate tables, weight-break brackets, dimensional/volumetric weight, flat/price/item strategies, free & discounted thresholds, surcharges + handling breakdowns, and sorted multi-method quotes with ETA. Integer minor units, zero-dependency, isomorphic.

shippingshipping-ratesecommercecheckout
npm i @lacspace/shipping
0 depsCommerce & Ledgernpm ↗

VAT & sales-tax done right — exact integer minor-unit arithmetic (no float cents bugs), add/extract tax (inclusive & exclusive), multiple & compound taxes with a labelled breakdown, category rate tables, reverse charge, and line-level vs invoice-level rounding. Isomorphic.

taxvatsales-taxgst
npm i @lacspace/tax
0 depsCommerce & Ledgernpm ↗

Nepal Payments · 4

Connect IPS (Nepal) merchant integration over Web Crypto — RSA-SHA256-sign the redirect token, build or send the validate-txn request, verify signatures, and validate/inspect the canonical message fields offline. Zero-dep, isomorphic.

connectipsnepalpaymentnchl
npm i @lacspace/connectips
0 depsNepal Paymentsnpm ↗

eSewa ePay v2 (Nepal) payment toolkit over Web Crypto — HMAC-SHA256 signing, checkout-form building, response verify/decode, amount validation, CSPRNG transaction ids, and transaction-status request/parse. Zero-dependency, isomorphic.

nepalpaymentesewaepay-v2
npm i @lacspace/esewa
0 depsNepal Paymentsnpm ↗

Fonepay (Nepal) Request-To-Pay over Web Crypto — HMAC-SHA512 sign the request DV and verify the response DV, now with request validation, a CSPRNG PRN generator, auto-submit form + dynamic-QR builders and sandbox/live presets. Zero-dep, isomorphic.

fonepaynepalpaymentrequest-to-pay
npm i @lacspace/fonepay
0 depsNepal Paymentsnpm ↗

Khalti KPG-2 (ePayment API v2, Nepal) client — initiate payments and look up status over injectable fetch, plus pure helpers: request builders, paisa amount validation, callback verification, sandbox/production presets and a CSPRNG order-id generator. Zero-dependency, isomorphic.

nepalpaymentkhaltikpg-2
npm i @lacspace/khalti
0 depsNepal Paymentsnpm ↗

AI Kit · 7

A tiny, provider-agnostic LLM chat client over fetch — one chat()/stream() API for OpenAI, Anthropic, Google Gemini and any OpenAI-compatible endpoint (Groq, Together, OpenRouter, Ollama). Now with typed message builders, retry/backoff + timeout, usage/cost accounting and JSON-output parsing. Bring your own key, no SDK, isomorphic.

aillmchatopenai
npm i @lacspace/ai
0 depsAI Kitnpm ↗

Define LLM function-calling / tool-use tools once and use them with any provider — generate the OpenAI, Anthropic or Google tool spec, parse tool calls out of any response, validate/coerce the model's arguments (with an opt-in strict validator), dispatch to your handler and format results back into messages. Zero-dependency, keyless.

aillmfunction-callingtool-use
npm i @lacspace/ai-tools
0 depsAI Kitnpm ↗

A tiny text splitter for RAG and long-context prompts — recursive character, Markdown, code, sentence and paragraph chunking with overlap and a pluggable token-aware lengthFn. Now batch-chunks whole corpora (per-chunk docId + metadata), merges tiny fragments and ships a dependency-free approximate token counter. Zero-dependency, isomorphic.

chunktext-splitterchunkingrag
npm i @lacspace/chunk
0 depsAI Kitnpm ↗

Extract and repair JSON from messy LLM output — strip code fences and prose, pull out every embedded JSON value, repair with typed diagnostics, and fix trailing commas, single quotes, unquoted keys, Python literals and truncated objects. Zero-dependency, isomorphic, typed.

json-repairjson-parseextract-jsonllm
npm i @lacspace/json-repair
0 depsAI Kitnpm ↗

A tiny, typed prompt-engineering toolkit — build, compose and render LLM prompts and chat messages with real type safety (variable names inferred from the template). Now with a versioned prompt registry, prompt-injection guards, JSON/enum output-format instructions and pure token-budget trimming. Zero-dependency, isomorphic.

aillmpromptprompt-engineering
npm i @lacspace/prompt
0 depsAI Kitnpm ↗

A zero-dependency, isomorphic parser for Server-Sent Events, NDJSON and streaming LLM responses — a unified async iterator of text and tool-call deltas across OpenAI and Anthropic, plus map/filter/tee transforms, ReadableStream adapters and AbortSignal cancellation. No SDK, keyless.

sseserver-sent-eventseventsourcestreaming
npm i @lacspace/stream
0 depsAI Kitnpm ↗

A fast token estimator, LLM cost calculator and context-budget manager — good-enough GPT/Claude/Gemini token counts without the 3 MB tiktoken/wasm. Now with context-window usage checks, batch estimation and cross-model cost comparison across an expanded model table. Zero-dependency, isomorphic and fully typed.

tokenizertoken-countertoken-estimatellm
npm i @lacspace/tokenizer
0 depsAI Kitnpm ↗

AI App Kit · 9

A tiny, keyless tool-calling / ReAct agent loop — inject any chat model and any tools as duck-typed interfaces and it drives the reason→act→observe loop with a full trace, maxSteps guard and error recovery.

agentai-agenttool-callingreact-agent
npm i @lacspace/agent
0 depsAI App Kitnpm ↗

A tiny, provider-agnostic, keyless embeddings client plus pure vector math (cosine, dot, euclidean, mean-pool, top-k) — the entry point of the RAG stack. Calls OpenAI-compatible, Ollama, Google and Cohere endpoints through an injectable fetch.

embeddingsvectorcosine-similarityrag
npm i @lacspace/embeddings
0 depsAI App Kitnpm ↗

Keyless, zero-dependency toolkit for evaluating LLM outputs — deterministic scorers (contains, regex, JSON-schema, Levenshtein, cosine, keyword coverage, JSONPath) plus an optional LLM-as-judge whose model you inject, with batch runs and pass-rate reports.

evalllm-as-judgeevaluationscorer
npm i @lacspace/eval
0 depsAI App Kitnpm ↗

Keyless, zero-dependency conversation memory for LLM chat apps — track history, keep it inside a token/message budget with a sliding window, and optionally summarize old turns via an injected summarizer.

memoryconversation-memorychat-historycontext-window
npm i @lacspace/memory
0 depsAI App Kitnpm ↗

Keyless content-safety guardrails for AI apps — detect & redact PII, flag toxic content, catch prompt-injection, and validate LLM output before you show or store it. Zero-dependency and isomorphic.

moderationcontent-safetyguardrailspii-detection
npm i @lacspace/moderation
0 depsAI App Kitnpm ↗

A keyless registry of connection presets for LLM & embedding endpoints — point @lacspace/ai or @lacspace/embeddings at a free or local model (Ollama, Groq, OpenRouter, Google AI Studio…) in one line.

aillmproviderspresets
npm i @lacspace/providers
0 depsAI App Kitnpm ↗

The glue of a RAG pipeline — index documents and retrieve + assemble prompt context by composing an injected embedder, vector store and splitter, with zero hard dependencies.

ragretrieval-augmented-generationembeddingsvector-search
npm i @lacspace/rag
0 depsAI App Kitnpm ↗

Rerank retrieved RAG documents for precision — BM25, TF-IDF, Reciprocal Rank Fusion, hybrid vector+lexical blending and MMR diversity, plus an injectable cross-encoder/LLM scorer. Zero-dependency, keyless, isomorphic.

rerankbm25reciprocal-rank-fusionmmr
npm i @lacspace/rerank
0 depsAI App Kitnpm ↗

A tiny in-memory vector store for RAG and semantic search — upsert embeddings, run brute-force k-NN queries with cosine/dot/euclidean metrics, metadata filtering and JSON persistence. Zero dependencies.

vector-storeembeddingssemantic-searchsimilarity-search
npm i @lacspace/vector
0 depsAI App Kitnpm ↗

Testing Kit · 4

A fluent assertion library that runs anywhere — deep-equal, async resolves/rejects, toThrow, asymmetric matchers (any/objectContaining/…), expect.extend custom matchers, and 15 more built-ins (toBeOneOf/toBeWithin/toBeSorted/toIncludeSameMembers/type guards). Plugs into any runner or the browser. Zero-dependency, isomorphic.

expectassertassertionmatchers
npm i @lacspace/expect
0 depsTesting Kitnpm ↗

Typed, deterministic test-data factories — define a factory once, then build realistic objects with sequences, traits, associations and transient params. Now with a seeded fake-data generator (names/emails/dates), async builds and cleanup hooks. Seed it and the same data comes out every run. Zero-dependency, isomorphic.

fixturesfactorytest-datafactory-bot
npm i @lacspace/fixtures
0 depsTesting Kitnpm ↗

Snapshot testing without a framework — a stable, deterministic value serializer (sorted keys, circular-safe, pluggable) plus inline and file (.snap) matchers, now with property matchers, volatile-value redaction and obsolete-snapshot detection. Isomorphic core, with a node subpath for filesystem snapshots. Zero-dependency.

snapshotsnapshot-testingserializepretty-format
npm i @lacspace/snapshot
0 depsTesting Kitnpm ↗

Spies, stubs, mocks and deterministic fake timers for any test runner or the browser — record calls, program returns/throws/resolves with once-queues, spyOn with call-through, and now argument matchers (any/objectContaining/…), richer call-inspection and resetAll. Zero-dependency, isomorphic.

spystubmockmocking
npm i @lacspace/spy
0 depsTesting Kitnpm ↗

Dates & Time · 4

An immutable date-time toolkit — arithmetic, start/end of unit, diff & breakdown, comparison, token format/parse and ISO, now with relative-time ("3 hours ago"), business-day math with injectable holidays and a month calendar-grid builder — a tiny date-fns/dayjs with no dependencies. Zero-dependency, isomorphic.

datetimedatetimedate-fns
npm i @lacspace/datetime
0 depsDates & Timenpm ↗

A Duration type — parse, build, normalize and do arithmetic on ISO-8601 time spans, calendar-honest about months & years (never silently assumes a 30-day month). Now with an optional humanizer, HH:MM:SS clock format/parse and clamp/sum/rebalance helpers. Zero-dependency, isomorphic.

durationiso8601parse-durationtime-span
npm i @lacspace/duration
0 depsDates & Timenpm ↗

Time ranges, date iteration and business-day math — overlaps, merge, free/busy invert, eachDay/Week/Month and business-day add/subtract, now with coverage/utilization, gaps, total covered duration, peak concurrency and interval algebra (contains/shift/expand). Zero-dependency, isomorphic.

intervaldate-rangetime-rangeoverlap
npm i @lacspace/interval
0 depsDates & Timenpm ↗

An IANA timezone toolkit built on Intl — DST-correct offsets, wall-clock parts, zoned↔UTC conversion and DST detection, now with zoned string/abbreviation formatting, zone-vs-zone comparison and forward/backward/range transition scanning. No bundled tz database, so it stays tiny and always current. Zero-dependency, isomorphic.

timezoneianaintldst
npm i @lacspace/timezone
0 depsDates & Timenpm ↗

CLIs · 2

Scaffold a finished Next.js app from one of 8 templates in ~0.12s — now with --theme.

npm create lacspace-app@latest

Drop a complete SEO setup into an existing Next.js App Router app.

npm create lacspace-app@latest
Prefer a guided tour?

Read the handbook

Install, use, integrate and upgrade — with real code for the packages you'll reach for most.