The catalog

95 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.

93 shown

Core · 7

Event tracking for Lacspace platforms — batching and an offline queue.

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. Zero-dependency, isomorphic.

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

Lightweight, zero-dependency, isomorphic TypeScript HTTP client for Lacspace APIs.

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

Authentication flows (login, register, token, refresh) for Lacspace APIs.

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, cookie helpers and a middleware auth guard.

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

React hooks and provider for the Lacspace SDK — useAuth, useQuery, useLacspace.

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

High-level TypeScript SDK for Lacspace — api, auth, analytics and e-commerce in one client.

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, X-Frame-Options, Referrer-Policy, Permissions-Policy. 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 and parse llms.txt and llms-full.txt (the llmstxt.org standard) — 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 set of items — content syndication for blogs and news. 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, Next.js verification metadata and file tokens 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, useCopyToClipboard and 20+ more. Zero-dependency, fully typed, isomorphic.

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

Ergonomic keyboard shortcuts for React — combos (mod+k), key sequences (g then d), scopes, and pretty display formatting (⌘K). SSR-safe, respects form fields, zero-dependency, fully typed.

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

Tiny data fetching for React with a shared cache, request de-duplication, stale-while-revalidate, focus/reconnect revalidation, and mutations. useQuery + useMutation in ~2KB. 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, use selectors, no provider. Built on useSyncExternalStore with a persist middleware and shallow equality. Zero-dependency, SSR-safe, fully typed.

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

SSR-safe dark / light / system theme for React — a tiny ThemeProvider, a useTheme hook, and a no-flash inline script. Persists to storage, follows the OS, toggles a class or data-attribute. Zero-dependency, framework-agnostic, 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. 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, and scroll-to-index. useVirtualizer in ~2KB. 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 for the server — turn FormData into typed, validated data with a honeypot + timing spam guard, and get back your data or per-field errors ready to re-render. Shaped for Next.js Server Actions. Zero-dependency, isomorphic.

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 and grammatical lists. Zero-dependency, isomorphic.

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, batteries-included invoice() & receipt() generators. 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, and verify incoming ones (timing-safe, replay-protected) with Stripe / GitHub / Shopify presets. Plus event ids & idempotency. 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 Nepali formatting.

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

Everyday Nepal helpers — NPR currency formatting, Devanagari numerals, amount-in-words, validators, provinces. 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, plus a tamper-evident SHA-256 hash chain that proves the log was never altered. 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 — canonical delivery state machine, Pathao (Nepal) adapter, and inbound webhook verification + status normalization. Zero-dependency, isomorphic.

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

Stock-tracking engine that prevents overselling — reserve, release, commit & restock over a plain { onHand, reserved } state. Immutable, bring-your-own-store, throws before it oversells. 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 — balanced transactions, per-account balances and a trial balance that always sums to zero. Integer minor units, immutable ops, crypto-random ids. 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 — flat / weight / price / item rate tables by zone, free-shipping thresholds, surcharges and handling, returning sorted method quotes. 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 — sign the redirect transaction token with your RSA private key and validate transactions server-to-server. Zero-dep, isomorphic.

connectipsnepalpaymentnchl
npm i @lacspace/connectips
0 depsNepal Paymentsnpm ↗

eSewa ePay v2 (Nepal) payment gateway toolkit over Web Crypto — HMAC-SHA256 signing, form building, response verification and transaction status checks. Zero-dependency, isomorphic.

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

Fonepay (Nepal) merchant redirect / Request-To-Pay over Web Crypto — HMAC-SHA512 sign the request DV and verify the response DV. Zero-dep, isomorphic.

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

Khalti KPG-2 (ePayment API v2, Nepal) client — initiate payments, look up status, typed errors and Key auth over global fetch. 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). 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 AND get a runtime dispatcher that validates arguments and calls your handler. 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. 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, fix trailing commas, single quotes, unquoted keys and Python literals, and close 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 are inferred from the template string, so .render() is type-checked. Zero-dependency, isomorphic.

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

A zero-dependency, isomorphic parser for Server-Sent Events and streaming LLM responses — turn a fetch body into a clean async iterator of text and tool-call deltas, normalized across OpenAI and Anthropic. 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. Zero-dependency, isomorphic and fully typed.

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

Testing Kit · 4

A fluent assertion library that runs anywhere — deep-equal, async resolves/rejects, toThrow, asymmetric matchers (any/objectContaining/…) and expect.extend custom matchers. Throws a descriptive error, so it 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. 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. 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 tick a fake clock. 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 — 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). Pairs with @lacspace/humanize for display. 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 add/subtract business days with weekend & holiday config. 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, with 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.