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

@thearchitech.xyz/validator

v0.1.1

Published

Genome validation library for The Architech ecosystem

Readme

@thearchitech.xyz/validator

Genome validation library for The Architech ecosystem.

npm version License: MIT

✅ Test Results

All validation rules tested and working:

  • Structure validation: Detects missing required fields
  • Module existence: Finds non-existent modules in marketplace
  • Dependency validation (V2): NEW - Reads dependencies from marketplace dynamically
  • Parameter validation: NEW - Validates parameters against marketplace schemas
  • Conflict detection: Identifies incompatible modules
  • Quality scoring: Provides 0-100 quality score

🚀 Key Features

Dynamic Validation:

  • ✅ Reads actual dependencies from marketplace manifests
  • ✅ No hardcoded rules - always in sync with marketplace
  • ✅ Works with any marketplace (official or custom)
  • ✅ Supports third-party and private company marketplaces

Parameter Validation:

  • ✅ Validates parameter types (string, boolean, number, object, array)
  • ✅ Validates enum/options values
  • ✅ Checks required parameters
  • ✅ Warns about unknown parameters

Marketplace-Agnostic:

  • ✅ Default: Uses @thearchitech.xyz/marketplace
  • ✅ Custom: Pass marketplacePath option for any marketplace

Installation

npm install @thearchitech.xyz/validator

Usage

Simple Validation

import { validateGenome } from '@thearchitech.xyz/validator';

const genome = {
  version: '1.0.0',
  project: {
    name: 'my-app',
    framework: 'nextjs'
  },
  modules: [
    { id: 'framework/nextjs' },
    { id: 'database/drizzle' }
  ]
};

const result = await validateGenome(genome);

if (result.isValid) {
  console.log('✅ Genome is valid! Score:', result.score);
} else {
  console.error('❌ Validation errors:');
  result.errors.forEach(error => {
    console.error(`  - ${error.message}`);
    if (error.fix) console.error(`    Fix: ${error.fix}`);
  });
}

Custom Marketplace Validation

import { validateGenome } from '@thearchitech.xyz/validator';

// Validate with custom/third-party marketplace
const result = await validateGenome(genome, {
  marketplacePath: '/path/to/custom/marketplace'
});

// Or using GenomeValidator class
import { GenomeValidator } from '@thearchitech.xyz/validator';

const validator = new GenomeValidator(undefined, {
  marketplacePath: '/path/to/my-company-marketplace',
  enableParameterValidation: true
});

const result = await validator.validate(genome);

Detailed Result

{
  isValid: true,
  errors: [],
  warnings: [],
  score: 100,
  metadata: {
    modulesValidated: 3,
    rulesApplied: 4,
    executionTime: 2
  }
}

Validation Rules

The validator checks:

  • Structure - Valid Genome interface
  • Module Existence - All module IDs exist in marketplace
  • Dependencies - Required dependencies are present
  • Conflicts - No conflicting modules
  • Parameters - Required parameters are provided
  • File Ownership - Modules only modify files they own

API

validateGenome(genome: Genome): ValidationResult

Main validation function.

Returns:

{
  isValid: boolean;
  errors: ValidationError[];
  warnings: ValidationWarning[];
  score?: number;  // Optional quality score 0-100
}

GenomeValidator

Class-based validator for advanced usage:

import { GenomeValidator } from '@thearchitech.xyz/validator';

const validator = new GenomeValidator();
const result = await validator.validate(genome);

// Add custom validation rules
validator.addRule({
  name: 'custom-rule',
  description: 'My custom validation',
  async validate(genome) {
    const errors = [];
    const warnings = [];
    
    // Your validation logic here
    if (!genome.project.description) {
      warnings.push({
        type: 'MISSING_RECOMMENDED',
        message: 'Project description is recommended',
        suggestion: 'Add a description to help users understand your project'
      });
    }
    
    return { errors, warnings };
  }
});

Examples

Example 1: Valid Genome (Score: 100/100)

const validGenome = {
  version: '1.0.0',
  project: {
    name: 'hello-world',
    framework: 'nextjs'
  },
  modules: [
    { id: 'framework/nextjs' },
    { id: 'ui/shadcn-ui' }
  ]
};

// Result: isValid = true, score = 100

Example 2: Missing Dependencies

const brokenGenome = {
  version: '1.0.0',
  project: {
    name: 'auth-app',
    framework: 'nextjs'
  },
  modules: [
    { id: 'features/auth/frontend/shadcn' }
    // ❌ Missing: auth adapter and database
  ]
};

// Result: 
// - Error: "Module requires a auth module"
// - Error: "Module requires a database module"

Example 3: Conflicting Modules

const conflictGenome = {
  version: '1.0.0',
  project: {
    name: 'multi-db',
    framework: 'nextjs'
  },
  modules: [
    { id: 'database/drizzle' },
    { id: 'database/prisma' }
    // ❌ Conflict: Only one ORM allowed
  ]
};

// Result:
// - Error: "Conflicting modules detected: database/drizzle, database/prisma"

License

MIT