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

@anarchitects/forms-nest

v0.1.5

Published

NestJS bricks that expose the Forms platform contracts through layered modules. The library ships application services, HTTP controllers, and infrastructure adapters so a NestJS host can fetch form definitions and accept submissions without re-implementin

Readme

@anarchitects/forms-nest

NestJS bricks that expose the Forms platform contracts through layered modules. The library ships application services, HTTP controllers, and infrastructure adapters so a NestJS host can fetch form definitions and accept submissions without re-implementing the contract logic.

Layered entry points

| Entry point | Responsibility | | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | @anarchitects/forms-nest/application | Use-case services plus the FormsApplicationModule, along with DI tokens for repository and mailer ports. | | @anarchitects/forms-nest/presentation | Fastify-ready controllers that serve /forms/:formId and POST /forms/submit, delegating to the application layer. | | @anarchitects/forms-nest/infrastructure-persistence | FormsPersistenceModule — TypeORM-backed adapter that fulfils the submissions repository port. | | @anarchitects/forms-nest/infrastructure-mailer | FormsMailerModule — MailerModule adapter that fulfils the mailer port using @nestjs-modules/mailer. |

You can combine these layers or swap infrastructure modules with custom implementations that respect the exported tokens.

Installation

npm install @anarchitects/forms-nest @anarchitects/forms-ts @nestjs/typeorm typeorm @nestjs-modules/mailer
# or
yarn add @anarchitects/forms-nest @anarchitects/forms-ts @nestjs/typeorm typeorm @nestjs-modules/mailer

@anarchitects/forms-ts provides the DTOs and models referenced by the Nest modules and should be installed alongside the bricks.

Quick start

// forms.module.ts
import { Module } from '@nestjs/common';
import { FormsApplicationModule } from '@anarchitects/forms-nest/application';
import { FormsPresentationModule } from '@anarchitects/forms-nest/presentation';
import { FormsPersistenceModule } from '@anarchitects/forms-nest/infrastructure-persistence';
import { FormsMailerModule } from '@anarchitects/forms-nest/infrastructure-mailer';

@Module({
  imports: [FormsApplicationModule, FormsPersistenceModule, FormsMailerModule, FormsPresentationModule],
})
export class FormsModule {}

Then register the module in your application bootstrap (together with your database and mailer configuration). The presentation controllers expose:

  • GET /forms/:formId – resolves contract-driven form definitions and JSON schema.
  • POST /submissions/submit – validates the request body against SubmissionRequestSchema, stores the payload, and triggers mail notifications through the mailer port.

Customising infrastructure

  • Replace persistence: Bind your own implementation to SUBMISSIONS_REPOSITORY if you do not use TypeORM. Your adapter should extend or fulfil the SubmissionsRepository abstract class.
  • Swap mailer provider: Provide a custom implementation for MAILER_PORT to integrate with your preferred email service. The included FormMailerModule wraps @nestjs-modules/mailer but any adapter that implements MailerPort will work.
  • Extend application services: The exported FormsService and SubmissionsService can be injected elsewhere to compose additional workflows, while keeping contract compliance.

License

Released under the Apache License 2.0.