Skip to content

FieldTest Documentation ​

Welcome to FieldTest! This documentation will help you get started with content validation using Standard Schema.

πŸ“– Getting Started ​

New to FieldTest? Start here:

πŸŽ“ Guides (How-to) ​

Step-by-step instructions for common tasks:

πŸ“š Reference ​

Complete API documentation:

πŸ’‘ Explainers (Understanding) ​

Conceptual articles to deepen your understanding:

πŸ—‚οΈ Documentation Structure ​

This documentation follows the DiΓ‘taxis framework:

docs/
β”œβ”€β”€ getting-started.md           # Quick start guide
β”œβ”€β”€ guides/                      # How-to guides
β”‚   β”œβ”€β”€ schema-validation.md
β”‚   β”œβ”€β”€ framework-integration.md
β”‚   └── biome-integration.md
β”œβ”€β”€ reference/                   # API documentation
β”‚   └── api.md
└── explainers/                  # Conceptual articles
    β”œβ”€β”€ standard-schema.md
    └── why-fieldtest.md

🎯 Find What You Need ​

I want to ​

Get started quickly β†’ Getting Started Guide

Validate markdown content β†’ Schema Validation Guide

Use FieldTest with Astro or Next.js β†’ Framework Integration Guide

Set up Biome linting β†’ Biome Integration Guide

Understand Standard Schema β†’ Standard Schema Explainer

Look up API details β†’ API Reference

See example code β†’ Examples

πŸ”§ Tools & Integrations ​

  • MCP Server β€” AI-powered content validation
  • Biome Plugins β€” Custom linting rules for migration and best practices

🌟 Features ​

FieldTest provides:

  • βœ… Markdown parsing with frontmatter support
  • βœ… Schema validation using Standard Schema
  • βœ… Schema registry for reusable validation rules
  • βœ… Framework integrations (Astro, Next.js, and more)
  • βœ… MCP integration for AI workflows
  • βœ… Biome plugins for linting and migration

πŸ’¬ Community & Support ​

πŸ“¦ Installation ​

bash
npm install @watthem/fieldtest

Or with pnpm:

bash
pnpm add @watthem/fieldtest

Requirements: Node.js 18+ and PNPM 8+

πŸš€ Quick Example ​

typescript
import { loadUserSchema, validateWithSchema } from '@watthem/fieldtest';
import type { StandardSchemaV1 } from '@watthem/fieldtest';

// Define schema
const schema: StandardSchemaV1 = {
  version: '1',
  name: 'blog-post',
  fields: {
    title: { type: 'string', required: true },
    published: { type: 'boolean', required: true }
  }
};

// Validate content
const loaded = loadUserSchema(schema);
const result = validateWithSchema(markdown, loaded);

if (!result.valid) {
  console.error('Validation failed:', result.errors);
}

πŸ“– Contributing ​

Want to contribute? Check out:

πŸ“ License ​

MIT Β© Matthew Hendricks


Ready to get started? β†’ Getting Started Guide

Released under the MIT License.