npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vulcantech/forms

v0.1.1

Published

Dynamic form renderer with TipTap-style builder, Yup validation, sensitive field encryption, and Tailwind styling

Readme

@vulcantech/forms

Dynamic form renderer for VulcanTech apps. Renders a form from a JSON FormDefinition (authored in the CMS form builder) using Formik + Yup, with sensitive-field encryption and Tailwind styling.

Exports: DynamicForm, DynamicFormSection, FormDefinition (type), buildYupSchema, buildInitialValues, plus transform / crypto / email-template helpers.

Field types: text, email, phone, textarea, select, checkbox, radio, number, date, datetime, url, address, hidden.

Integration

Wire forms into a consumer site (Next.js App Router):

1. Add the dependency:

npm install @vulcantech/forms

(Inside the VulcanTech monorepo, use the workspace wiring in MONOREPO.md instead.)

2. Set the env — see Required env below.

3. Tailwind content (required) — add the package to Tailwind's sources, or the renderer's classes won't generate and forms render unstyled. Tailwind v4 (in the app's globals.css / tailwind.css); adjust the path to where the package resolves from:

@source "../node_modules/@vulcantech/forms/dist";

(JS config: add the equivalent glob to content. Monorepo apps point at the package source instead — see MONOREPO.md.)

4. Server fetcher src/lib/cms/forms.ts — ISR-cached wrapper over the CMS /api/forms. Exposes getFormById(id) / getFormBySlug(slug); tags each fetch form:{projectId}:{formId} + forms:{projectId}; returns null on failure so the page still renders.

5. Per-form loader src/lib/cms/load<Name>Form.ts — pin the form's Firestore id and wrap the fetcher with a fallback:

import { getFormById } from "./forms";
export const CONTACT_FORM_ID = "<firestore-doc-id-from-CMS>";
export async function loadContactForm() {
  try { return (await getFormById(CONTACT_FORM_ID)) ?? undefined; }
  catch { return undefined; }
}

6. Render — load server-side, pass to a "use client" wrapper around <DynamicForm>:

// page.tsx (server component)
const definition = await loadContactForm();
return <ContactForm definition={definition} />;

// ContactForm.tsx ("use client")
import { DynamicForm, type FormDefinition } from "@vulcantech/forms";
export function ContactForm({ definition }: { definition?: FormDefinition }) {
  return <DynamicForm definition={definition ?? FALLBACK_DEFINITION} apiRoute="/api/contact" />;
}

7. ISR invalidation — ensure src/app/api/revalidate/route.ts exists; the CMS purges form:{projectId}:{formId} (single) and forms:{projectId} (list) on edit.

Required env

VULCANTECH_PROJECT_ID, VULCANTECH_API_KEY (required) · VULCANTECH_CMS_URL (optional) · VULCANTECH_FORMS_NO_CACHE (optional, 1/true to bypass ISR).

Per-app values

  • Form definition ID(s) — Firestore doc id from the CMS admin (one per form), pinned in load<Name>Form.ts (e.g. CONTACT_FORM_ID, SERVICE_REQUEST_FORM_ID).

Notes

  • FormDefinition is the CMS-authored schema (sections, fields, submit config, style).
  • style.buttonPlacement: "inline" renders the submit button beside the fields instead of full-width below them — suited to single-field forms (newsletter email + Join). Editable in the CMS form builder under Style → Submit Button → Button Placement.
  • Newsletter forms (submissionType: "newsletter") should submit to an app route that proxies to the CMS /api/contact — the CMS routes them into newsletter_subscribers.
  • The package also ships buildYupSchema / buildInitialValues for custom render paths, but consumer sites use the server-fetcher pattern above for ISR caching.