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:
- Getting Started Guide β Install FieldTest and validate your first markdown file
- Why FieldTest? β Understand the problems FieldTest solves
π Guides (How-to) β
Step-by-step instructions for common tasks:
- Schema Validation Guide β Create schemas and validate content
- Framework Integration β Use FieldTest with Astro, Next.js, and other frameworks
- Biome Integration β Set up Biome linting with FieldTest plugins
π Reference β
Complete API documentation:
- API Reference β All functions, types, and utilities
π‘ Explainers (Understanding) β
Conceptual articles to deepen your understanding:
- What is Standard Schema? β Learn about Standard Schema and why it matters
- Why FieldTest? β The problems FieldTest solves and when to use it
π Quick Links β
- Examples β Real-world use cases
- Biome Plugins β Custom linting rules
- Changelog β Version history and changes
ποΈ 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 β
- π Report bugs
- π¬ Discussions
- π§ Contact: hello@matthewhendricks.net
π¦ Installation β
npm install @watthem/fieldtest
Or with pnpm:
pnpm add @watthem/fieldtest
Requirements: Node.js 18+ and PNPM 8+
π Quick Example β
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