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

@vonome-codepack/vonome-builder-nestjs

v1.0.5

Published

NestJS library for dynamic page builder backend with multi-tenancy, versioning, and license key validation

Readme

Vonome Builder for NestJS

The Ultimate Dynamic Page Builder Backend library for Multi-Tenant SaaS & Enterprise Applications.

NPM Version License Organization

Vonome Builder is a powerful, production-ready NestJS library designed to accelerate the development of dynamic, data-driven applications. It provides a robust backend infrastructure for managing pages, layouts, and configurations at runtime, with built-in support for multi-tenancy, soft deletion, backups, and enterprise-grade security.


🚀 Key Features

  • 🏢 Multi-Tenancy Architecture: Native support for tenant-specific page configurations and overrides.
  • 📄 Dynamic Page Management: Create, update, and serve page layouts (JSON-based) dynamically via API.
  • 🔄 Version Control & Backup: Automatic tracking of changes with updated_date_time and full restore capabilities.
  • ♻️ Restore & Copy Operations: Easily restore deleted pages or duplicate existing pages (even across tenants).
  • 🔐 License Validation: Built-in secure license key validation (Trial & Enterprise tiers).
  • ⚡ High Performance: Optimized queries with PostgreSQL and TypeORM.
  • 🛡️ Secure: Input validation, soft-delete mechanisms, and robust error handling.

📦 Installation

Install the package via NPM:

npm install @vonome-codepack/vonome-builder-nestjs

Peer Dependencies

Ensure you have the following peer dependencies installed in your NestJS project:

npm install @nestjs/common @nestjs/core @nestjs/cqrs @nestjs/typeorm @nestjs/mapped-types typeorm pg class-validator class-transformer reflect-metadata rxjs

🔑 Commercial Licensing & Support

This is a commercial product. To use @vonome-codepack/vonome-builder-nestjs in a production environment, you must obtain a valid license key from Vonome Software and Systems.

License Tiers

  1. Trial License: 30-day full access for evaluation.
  2. Enterprise License: Unlimited tenants, pages, and production usage.

How to Get a License

Please contact our sales team to purchase a license or request a trial key:

License Agreement

By installing or using this software, you agree to the terms specified in the LICENSE file. Unauthorized redistribution or use without a valid license is strictly prohibited.


🛠 Quick Start Guide

1. Import the Module

Import VonomeBuilderModule in your app.module.ts. You must provide your License Key and Database Configuration.

import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { VonomeBuilderModule } from '@vonome-codepack/vonome-builder-nestjs';

@Module({
  imports: [
    ConfigModule.forRoot({ isGlobal: true }),
    VonomeBuilderModule.forRootAsync({
      imports: [ConfigModule],
      useFactory: (config) => ({
        licenseKey: config.get('VONOME_LICENSE_KEY'), // Your purchased key
        database: {
          type: 'postgres',
          host: config.get('DB_HOST', 'localhost'),
          port: 5432,
          username: config.get('DB_USER', 'postgres'),
          password: config.get('DB_PASSWORD'),
          database: config.get('DB_NAME', 'pagebuilder'),
          schema: config.get<string>('VONOME_BUILDER_SCHEMA') ?? 'vonome_builder', // Custom schema support
          synchronize: config.get('NODE_ENV') === 'development', // Auto-run migrations in dev
        },
      }),
      inject: [ConfigService],
    }),
  ],
})
export class AppModule {}

2. Database Migrations

To ensure the library's database tables are created and updated correctly, you must register the library's migrations in your application's root DataSource configuration.

Use the getVonomeBuilderMigrationsPath utility:

// data-source.ts
import * as path from 'path';
import { DataSource } from 'typeorm';
import { getVonomeBuilderMigrationsPath } from '@vonome-codepack/vonome-builder-nestjs';

export const AppDataSource = new DataSource({
  type: 'postgres',
  // ... other config ...
  migrations: [
    path.join(__dirname, '../migrations/*{.ts,.js}'), // Your app's migrations
    getVonomeBuilderMigrationsPath(),                 // Vonome Builder migrations
  ],
});

3. Basic Usage

Use PageBuilderService to create and manage pages programmatically.

import { Injectable } from '@nestjs/common';
import { PageBuilderService, PageType } from '@vonome-codepack/vonome-builder-nestjs';

@Injectable()
export class SetupService {
  constructor(private readonly pageBuilderService: PageBuilderService) {}

  async createDashboard() {
    return await this.pageBuilderService.createGlobalPage({
      systemModule: 'Sales',
      pageType: PageType.DASHBOARD,
      name: 'sales_overview',
      displayName: 'Sales Overview',
      routingUrl: '/sales/overview',
      // Dynamic Layout Definition
      appPageLayout: {
        sections: [
          { type: 'stats', widgets: ['revenue', 'users'] }
        ]
      }
    });
  }
}

🔧 Customization & Extension

You can extend the base controllers to add custom logic, changing routes, or override validation.

Extending GlobalPageController

import { Controller, Post, Body, BadRequestException } from "@nestjs/common";
import { GlobalPageController, PageBuilderService, CreateGlobalPageDto } from "@vonome-codepack/vonome-builder-nestjs";

@Controller('page-builder') // Custom route prefix
export class PageBuilderController extends GlobalPageController {
    constructor(pageBuilderService: PageBuilderService) {
        super(pageBuilderService);
    }

    // Example: Override create method with custom validation
    @Post()
    async create(@Body() createDto: CreateGlobalPageDto) {
        if (!createDto.name.startsWith('page-')) {
            throw new BadRequestException('Page name must start with "page-"');
        }
        return super.create(createDto);
    }
}

Extending TenantPageController

import { Controller, Post, Body, Headers } from "@nestjs/common";
import { TenantPageController, PageBuilderService, CreateTenantPageDto } from "@vonome-codepack/vonome-builder-nestjs";

@Controller('tenant-pages')
export class MyTenantPageController extends TenantPageController {
    constructor(pageBuilderService: PageBuilderService) {
        super(pageBuilderService);
    }

    // Example: Custom implementation requiring tenant ID
    @Post()
    async create(
        @Headers('x-tenant-id') tenantId: string, 
        @Body() createDto: CreateTenantPageDto
    ) {
        if (!tenantId) {
            throw new BadRequestException('Tenant ID header (x-tenant-id) is required');
        }
        
        console.log(`Creating page for tenant: ${tenantId}`);
        
        // Custom logic using tenantId
        // createDto.tenantId = tenantId; // If needed
        
        return super.create(createDto);
    }
}

Extending PageBuilderService

You can also extend the service to inject custom business logic before or after core operations.

import { Injectable } from '@nestjs/common';
import { PageBuilderService } from '@vonome-codepack/vonome-builder-nestjs';

@Injectable()
export class CustomPageService extends PageBuilderService {
    async createGlobalPage(createDto: CreateGlobalPageDto) {
        // Pre-processing logic
        console.log('Creating page...', createDto.name);
        
        // Call core logic
        const result = await super.createGlobalPage(createDto);
        
        // Post-processing logic (e.g., notify other services)
        await this.notifySlack(`New page created: ${result.name}`);
        
        return result;
    }
}

📚 API References

The library automatically exposes RESTful endpoints for your frontend to consume.

Global Pages (Admin/Default)

| Method | Endpoint | Description | Payload/Params | | :--- | :--- | :--- | :--- | | POST | /page-builder/global | Create a new global page | CreateGlobalPageDto | | POST | /page-builder/global/search | Search pages with advanced filtering | PageQueryDto | | POST | /page-builder/global/query/by-module | Query pages by System Module | { systemModule: string, query: PageQueryDto } | | POST | /page-builder/global/query/by-type | Query pages by Page Type | { pageType: string, query: PageQueryDto } | | GET | /page-builder/global/:id | Get details of a specific page | - | | PUT | /page-builder/global/:id | Update an existing page | UpdateGlobalPageDto | | DELETE | /page-builder/global/:id | Soft delete a page | - | | POST | /page-builder/global/:id/restore | Restore a deleted page | - | | POST | /page-builder/global/:id/copy | Copy/Duplicate a page | { newName?: string } | | GET | /page-builder/global/:id/backups | Get Backup/Version History | - |

Tenant Pages (Custom Overrides)

All requests require header: x-tenant-id: <UUID>

| Method | Endpoint | Description | Payload/Params | | :--- | :--- | :--- | :--- | | POST | /page-builder/tenant | Create/Override a page for tenant | CreateTenantPageDto | | POST | /page-builder/tenant/search | Search tenant pages | PageQueryDto | | POST | /page-builder/tenant/query/by-module | Query by System Module | { systemModule: string, query: PageQueryDto } | | POST | /page-builder/tenant/query/by-type | Query by Page Type | { pageType: string, query: PageQueryDto } | | GET | /page-builder/tenant/:id | Get tenant page details | - | | PUT | /page-builder/tenant/:id | Update a tenant page | UpdateTenantPageDto | | DELETE | /page-builder/tenant/:id | Soft delete a tenant page | - | | POST | /page-builder/tenant/:id/restore | Restore a deleted tenant page | - | | POST | /page-builder/tenant/:id/copy | Copy (supports cross-tenant) | { targetTenantId?: string, newName?: string } | | GET | /page-builder/tenant/:id/backups | Get Backup/Version History | - |

For detailed code examples, see EXAMPLES.md. For database schema changes, see MIGRATION-GUIDE.md.


🤝 Support & Feedback

We are committed to the success of your project.

  • Technical Support: Contact us at [email protected] for implementation assistance.
  • Bug Reports: Please email us directly with a reproduction case.
  • Feature Requests: We value your feedback! Let us know what would make Vonome Builder even better for you.

Copyright (c) 2026 Vonome Software and Systems. All Rights Reserved.