Hydrogen
Commerce primitives for you and your coding agents. Add cart, products, money, and accounts to the framework you already use.
Lag husleiekontrakt, kjøpekontrakt, gjeldsbrev, fullmakt og andre avtaler på få minutter. Se hele dokumentet gratis, betal én gang per dokument. Ingen abonnement.
Translation pending
CommerceTypeScript · CSSGitHub @quara0nOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Loading the full README. The saved excerpt is shown below.
Rettfram: legal documents at one honest price
A guided document builder for simple legal documents. Visitors answer one short question
at a time, watch the document write itself in a live preview, and pay once per document only
when they download the PDF. No subscription, no account.
The brand is Rettfram (rettframavtaler.no). NEXT_PUBLIC_SITE_NAME overrides it, for example for a US deployment.
One deployment sells to one market, chosen with NEXT_PUBLIC_MARKET at build time:Read the full README ↗A guided document builder for simple legal documents. Visitors answer one short question at a time, watch the document write itself in a live preview, and pay once per document only when they download the PDF. No subscription, no account.
The brand is Rettfram (rettframavtaler.no). NEXT_PUBLIC_SITE_NAME overrides it, for example for a US deployment.
One deployment sells to one market, chosen with NEXT_PUBLIC_MARKET at build time:
no (default): Norwegian site, prices in NOK, A4 PDFs, Norwegian terms with angrerett.
Templates in src/content/nb-NO/: husleiekontrakt, fremleiekontrakt, kjøpekontrakt,
gjeldsbrev, fullmakt, oppdragsavtale and taushetserklæring.us: English site, prices in USD, US Letter PDFs. Templates in src/content/en-US/: NDA,
residential lease, bill of sale, service agreement, power of attorney, promissory note,
sublease and roommate agreement.Interface text lives in src/i18n/ (en.tsx, nb.tsx); the legal pages have a version per
market (src/app/terms/no.tsx and us.tsx, and so on). The other market's templates stay in the
code and in the tests, but are not published.
npm install
cp .env.example .env.local # optional: add a Stripe test key
npm run dev # http://localhost:3000
Without STRIPE_SECRET_KEY the app runs in demo mode: the pay button skips checkout and
goes straight to the download page, so every flow can be tried locally.
legal-docs GitHub repository, and keep the default
Next.js settings..env.example (at least NEXT_PUBLIC_SITE_URL,
NEXT_PUBLIC_SUPPORT_EMAIL, NEXT_PUBLIC_COMPANY_NAME, NEXT_PUBLIC_COMPANY_ADDRESS and
STRIPE_SECRET_KEY).NEXT_PUBLIC_SITE_URL to match.Every push to main redeploys automatically.
npm run lint && npm run typecheck # static checks
npm test # unit tests: every template, PDF output, payment checks
npm run build && npm run test:e2e # browser tests (desktop + mobile) against the production build
The template tests answer every question with every option and fail if any blank is left
in the document, if a template refers to a field that doesn't exist, or if the PDF breaks.
CI runs all of this on every push (.github/workflows/ci.yml).
Set NEXT_PUBLIC_PLAUSIBLE_DOMAIN to turn on cookie-free Plausible analytics. The app sends
these events (never any document answers): Document started, Step completed, Checkout
started, Purchase completed, PDF downloaded. Add them as goals in Plausible to get a funnel.
.env.local as STRIPE_SECRET_KEY.4242 4242 4242 4242, any future date, any CVC.NEXT_PUBLIC_SITE_URL.Checkout is a one-time Stripe Checkout session built from the template's price (no Stripe products to set up). The download API re-checks the session with Stripe (paid, right document, within the 30-day free-edit window) before it generates a PDF.
| Path | What it is |
|---|---|
src/content/en-US/*.ts | The templates: questions (steps and fields), SEO copy, and a render() that turns answers into document blocks |
src/content/index.ts | Template registry per locale (currency, regions, templates) |
src/lib/doc.ts | Shared types and helpers. Answers are wrapped in tokens so the preview can highlight them |
src/lib/pdf.ts | Renders the same blocks to a US Letter PDF with pdf-lib (page numbers, signature lines, notary block) |
src/components/Wizard.tsx | The one-question-at-a-time editor with live preview, autosave, review and checkout |
src/app/api/checkout | Creates the Stripe Checkout session (or a demo session) |
src/app/api/download | Verifies the purchase and returns the PDF |
src/app/documents/[slug] | SEO landing page per template, with FAQ and Product structured data |
Answers live only in the visitor's browser (localStorage). They are sent to the server once, at download, to build the PDF, and are not stored.
Copy one of the files in src/content/en-US/, change the steps and render(), and add it to
src/content/index.ts. Field types: text, textarea, date, choice (cards), select, multi
(checkboxes), money, number, region, email. Steps and fields can be conditional with showIf.
To preview every template as a PDF with sample answers: npx tsx scripts/sample-pdfs.ts
(writes to ./out).
Create src/content/nb-NO/ with its own templates (for example a husleiekontrakt), register
the locale in src/content/index.ts with currency: "nok" and the list of fylker as
regions. The page routes currently serve the default locale; add a [locale] segment or a
separate domain when the second locale is ready.
See LAUNCH.md.