Getting started, a which-package-for-what guide, and copy-paste examples for all 55 packages — each zero-dependency, isomorphic and fully typed.
The fastest way to start is to scaffold a complete app — SEO, security headers, dynamic OG images, a working contact form, a ⌘K command palette and a CI SEO gate, all wired in. Or install any package on its own.
npm create lacspace-app@latest my-app
cd my-app
npm run devnpm i @lacspace/seo
# pnpm add · yarn add · bun add all work tooStart from what you’re trying to do — each goal maps to the packages that solve it, with a snippet to copy.
Type-safe schemas with coercion, then handle the submission with spam protection.
import { v } from "@lacspace/validate";
import { createForm } from "@lacspace/form";
const contact = createForm({
schema: v.object({ email: v.string().email(), message: v.string().min(10) }),
honeypot: "company",
});Configure your site once; metadata, canonical, Open Graph, Twitter and JSON-LD flow everywhere. Gate it in CI.
import { defineSite } from "@lacspace/seo";
export const site = defineSite({ name: "Acme", url: "https://acme.com" });
// site.meta({ title, path }) -> full Next.js Metadata
// npx @lacspace/seo crawl https://acme.com --min-grade AA dynamic OG image per page — real PNG via next/og, or a zero-dep SVG anywhere.
import { ImageResponse } from "next/og";
import { ogCard } from "@lacspace/og";
export const runtime = "edge";
export const GET = (req) => new ImageResponse(
ogCard({ title: "Hello", from: "#22d3ee", to: "#6366f1" }), { width: 1200, height: 630 });Scroll reveals, count-ups, gradient text, tilt cards and a ⌘K command palette — no animation library.
import { Reveal, Counter, CommandPalette } from "@lacspace/ui";
<Reveal><Counter value={12480} suffix="+" /></Reveal>Bound memory (LRU), expire (TTL) and hide latency (stale-while-revalidate); concurrent callers share one fetch.
import { createCache } from "@lacspace/cache";
const cache = createCache({ max: 500, ttl: 60_000 });
await cache.wrap(`user:${id}`, () => db.users.find(id), { staleWhileRevalidate: 30_000 });Markdown to safe HTML with headings, tables, code and a table-of-contents extractor.
import { markdownToHtml, extractHeadings } from "@lacspace/markdown";
const html = markdownToHtml(post);
const toc = extractHeadings(post);Integer minor-units (no float bugs), currency-safe math, split without losing a cent, Intl formatting.
import { money } from "@lacspace/money";
money(19.99, "USD").multiply(3).format(); // "$59.97"
money(10, "USD").allocate([1, 1, 1]); // 3.34, 3.33, 3.33Cookieless page views and events to your own endpoint — no consent banner, respects Do-Not-Track.
import { createAnalytics } from "@lacspace/analytics-lite";
const a = createAnalytics({ endpoint: "/api/collect", siteId: "acme" });
a.autoTrack();OTP/TOTP 2FA, password hashing, JWTs, API keys, WebAuthn and account lockout — all Web-Crypto based.
import { hashPassword, verifyPassword } from "@lacspace/password";
const hash = await hashPassword(input);Retry with backoff + jitter, per-call timeouts, and a circuit breaker; cache the result.
import { retry } from "@lacspace/retry";
await retry(() => fetch(url), { retries: 4 });Zero-dependency SMTP, bulletproof responsive HTML templates, and address validation/verification.
import { mailerFromEnv } from "@lacspace/mailer";
await mailerFromEnv().send({ to, subject, html });Token-bucket / sliding-window limits, hardened security headers, idempotency keys and redaction.
import { rateLimit } from "@lacspace/rate-limit";
const { allowed } = rateLimit(ip, { limit: 100, window: 60_000 });Real .xlsx and RFC-4180 CSV with no heavy libraries, plus watermarked PDFs with no headless browser.
import { jsonToXlsx } from "@lacspace/xlsx";
const bytes = jsonToXlsx(rows); // Uint8Array (.xlsx)Scaffold a finished-looking Next.js app with every relevant package pre-wired.
npm create lacspace-app@latest my-appTalk to the Lacspace platform from any JavaScript runtime.
The suite that powers StockYatra. Everything a trading, charting or algo app re-implements — done once, done right.
Everything a backend needs to send, compose and validate email. Send with one line; compose bulletproof HTML; catch bad addresses before they cost you.
Generate every file and tag search engines and AI crawlers look for — metadata, JSON-LD, sitemaps, robots.txt, llms.txt, feeds and more. All typed and dependency-free.
Real security primitives built on vetted crypto (Web Crypto — never hand-rolled): AES, password hashing, tokens, API keys, 2FA/3FA, passkeys, account lockout, hardened headers and log redaction. For web, backend, mobile, AWS/S3 and Mongo.
The things every backend re-implements — signed links and PDF documents — done once, zero-dependency, isomorphic. A new kit, growing.
Get data in and out — real Excel files and correct CSV — with no heavy libraries and no headless browser.
The small helpers every UI rebuilds — human-readable formatting and colour maths — as tiny, typed, dependency-free packages.
The tiny helpers every project reaches for — unique IDs, resilient calls and string-case conversion — typed and dependency-free.
The pieces every product app needs — schema validation, spam-proof forms, dynamic social images and a lively UI — powering create-lacspace-app out of the box.
The utilities every web app and backend re-implements — config, rate limiting, feature flags and Next.js — done once, typed, and dependency-free.
Batteries-included helpers for building Nepal-facing apps.
First-class hooks for the SDK.
Download the full developer handbook as a polished, watermarked PDF — every package, every example, offline.