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

@gyomu/schema

v1.1.3

Published

US English | [JP 日本語](README.ja.md)

Downloads

2,078

Readme

Gyomu Schema

US English | JP 日本語

Overview

The @gyomu/schema package serves as a foundational layer for the Gyomu project, supplying shared schemas, type definitions, service definitions, and domain-agnostic utilities. Its primary purpose is to establish common contracts across packages, ensuring strict type safety and consistency while enabling decoupled collaboration.

Built on top of Effect and Standard Schema, the framework delivers a comprehensive, domain-driven approach to validation. It provides essential error-handling structures, core entity definitions, and automated CRUD schema generators, alongside advanced tools for analyzing source code and metadata.

Architecture

The package is organized into dedicated directories that divide responsibilities across foundational infrastructure, domain modeling, and specialized analysis.

The core infrastructure layer provides low-level utilities, JSON schema representations, and a centralized error handling strategy. It establishes standardized result wrappers, diagnostic context, and operational policies that are utilized across the entire framework.

Domain-specific logic is managed through entity and business structure definitions. These components supply reusable field definitions, UI annotations, and date-handling routines that automatically generate complete CRUD schema suites for business entities and system configurations.

Finally, the TypeScript analysis layer provides structural models for examining code metadata, symbols, imports, exports, and type properties, enabling uniform representation for documentation and analysis tools. Together, these components collaborate to maintain type safety, data consistency, and robust validation throughout the application.

Installation

Install using pnpm.

pnpm add @gyomu/schema

Dependencies

This package requires an ESM environment and is built specifically for Effect version 4.x, relying on the effect ecosystem for its core runtime, schema, and context management. Additionally, it utilizes date-fns for handling date and time types and utilities.

Development

It provides schemas, type definitions, service definitions, and package-agnostic utilities shared across the entire Gyomu project. By defining common contracts between packages, it aims to serve as a foundation that enables packages to collaborate loosely while maintaining type safety and consistency.

As a design principle that contributors must follow, all data shared across packages, persisted, or requiring runtime validation must be defined as Effect Schema, and branded types should also be placed in this package so they can be shared and used. Schema annotations must be provided without omission because they are utilized not only at runtime but also for AI-generated code, documentation, and knowledge generation. Service definitions must be limited to those requiring sharing, defining only interfaces and Context Tag without implementing them. Utilities must be pure functions and must never depend on other Gyomu packages.

Furthermore, APIs should be designed to be immutable and declarative wherever possible, and error types should be structured with a common format to serve as implementation examples for other packages. Schemas, type definitions, and service definitions must always be designed with a priority on reusability, continually evolving the packages while maintaining these principles.

Public API

  • Entity Schema Generation - Defines business entity structures and automatically generates corresponding insert, update, and select CRUD schemas.
  • Domain Error Handling - Provides classified application errors equipped with operational logging policies, context metadata, and retryability traits.
  • TypeScript Code Analysis Schemas - Supplies rich structural models for analyzing symbols, type properties, imports, exports, and JSDoc annotations.
  • Result and Validation Flow - Encapsulates operation outcomes using standardized success and failure result schemas with integrated field-level error mapping.
  • Date and Time Utilities - Handles local dates, year-month periods, and business calendar transformations required by domain entities.

License

MIT