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

@86d-app/forms

v0.0.25

Published

Custom forms module for 86d commerce platform — contact forms, surveys, inquiries

Readme

@86d-app/forms

Custom forms module for the 86d commerce platform. Create contact forms, surveys, inquiry forms, feedback forms, and more with configurable fields and submission management.

Installation

import forms from "@86d-app/forms";

export default defineStore({
  modules: [
    forms({
      maxSubmissionsPerHour: 10,
    }),
  ],
});

Features

  • Form builder — define forms with 11 field types (text, email, textarea, number, phone, select, radio, checkbox, date, url, hidden)
  • Field validation — required fields, email/URL format, number range, text length, regex patterns, select/radio options
  • Spam protection — built-in honeypot field support
  • Submission management — status tracking (unread/read/spam/archived), bulk delete
  • Submission limits — optional cap on total submissions per form
  • Auto-read — viewing a submission in admin auto-marks it as read
  • Admin UI — full admin interface with form list, create/edit with drag-and-drop field builder, submission inbox with filtering and bulk actions

Configuration

| Option | Type | Default | Description | |--------|------|---------|-------------| | maxSubmissionsPerHour | number | 10 | Rate limit per IP address per hour |

Store endpoints

| Method | Path | Description | |--------|------|-------------| | GET | /forms | List active forms | | GET | /forms/:slug | Get a form by slug (active only) | | POST | /forms/:slug/submit | Submit a form response |

Submit body

{
  "values": { "name": "Jane", "email": "[email protected]", "message": "Hello" },
  "_hp": ""
}

The _hp field is a honeypot — if non-empty and honeypot is enabled on the form, the submission is silently discarded.

Admin endpoints

| Method | Path | Description | |--------|------|-------------| | GET | /admin/forms | List all forms | | POST | /admin/forms/create | Create a new form | | GET | /admin/forms/:id | Get form details | | POST | /admin/forms/:id/update | Update a form | | POST | /admin/forms/:id/delete | Delete a form and its submissions | | GET | /admin/forms/:formId/submissions | List submissions (filterable by status) | | GET | /admin/forms/submissions/:id | Get submission (auto-marks as read) | | POST | /admin/forms/submissions/:id/status | Update submission status | | POST | /admin/forms/submissions/:id/delete | Delete a submission | | POST | /admin/forms/submissions/bulk-delete | Bulk delete submissions | | GET | /admin/forms/stats | Form statistics |

Controller API

interface FormsController {
  // Forms
  createForm(params): Promise<Form>
  getForm(id): Promise<Form | null>
  getFormBySlug(slug): Promise<Form | null>
  listForms(opts?): Promise<Form[]>
  updateForm(id, data): Promise<Form>
  deleteForm(id): Promise<void>

  // Submissions
  submitForm(params): Promise<FormSubmission>
  getSubmission(id): Promise<FormSubmission | null>
  listSubmissions(opts?): Promise<FormSubmission[]>
  updateSubmissionStatus(id, status): Promise<FormSubmission>
  deleteSubmission(id): Promise<void>
  bulkDeleteSubmissions(ids): Promise<number>
  getStats(formId?): Promise<Stats>
}

Types

type FormFieldType = "text" | "email" | "textarea" | "number" | "phone"
  | "select" | "radio" | "checkbox" | "date" | "url" | "hidden";

interface FormField {
  name: string;
  label: string;
  type: FormFieldType;
  required: boolean;
  placeholder?: string;
  defaultValue?: string;
  options?: string[];     // for select/radio
  pattern?: string;       // regex validation
  min?: number;           // min length/value
  max?: number;           // max length/value
  position: number;
}

type SubmissionStatus = "unread" | "read" | "spam" | "archived";

Events

| Event | Description | |-------|-------------| | forms.form.created | Form definition created | | forms.form.updated | Form definition updated | | forms.form.deleted | Form definition deleted | | forms.submission.created | New submission received | | forms.submission.statusChanged | Submission status changed | | forms.submission.deleted | Submission deleted |

Admin pages

| Page | Path | Description | |------|------|-------------| | Forms List | /admin/forms | Dashboard with stats cards (total forms, submissions, unread, spam) and sortable form table | | Create Form | /admin/forms/create | Multi-section form with field builder, settings, and auto-slug generation | | Form Detail | /admin/forms/:id | View form config, inline edit mode with field builder, toggle active/inactive, delete | | Submissions | /admin/forms/:id/submissions | Submission inbox with status filter, bulk select, mark read/spam/archive, bulk delete |

Notes

  • Forms with isActive: false are hidden from store endpoints but visible in admin
  • Deleting a form cascades to delete all its submissions
  • The maxSubmissions field (0 = unlimited) caps total submissions per form
  • The honeypot field _hp is checked in the store submit endpoint, not in the controller — this keeps controller logic reusable
  • All form inputs use nested <label> elements for accessibility compliance