# Ack

Documentation for the Ack project

## Docs

- [Overview](https://docs.page/btwld/ack): External data can't be trusted. APIs change, users mistype, and JSON drifts from what your code expects. Ack is a schema validation library for Dart and Flutter that puts a guardrail at those boundaries: describe the shape you expect onc...
- [API Reference](https://docs.page/btwld/ack/api-reference): This page is a curated quick reference for the core Ack classes, methods, and annotations. Use the [generated API documentation](https://pub.dev/documentation/ack/latest/ack/) for every public declaration and exact signatures; use the li...
- [Codecs](https://docs.page/btwld/ack/core-concepts/codecs): Your API sends a timestamp as an ISO string, but your code wants a `DateTime`. A codec handles that round-trip: it validates the incoming string, decodes it into the Dart type you actually use, and encodes it back when you send data out.
- [Configuration](https://docs.page/btwld/ack/core-concepts/configuration): Ack has no global configuration object. All behavior is configured at the schema level through the fluent API.
- [Error Handling](https://docs.page/btwld/ack/core-concepts/error-handling): When validation fails, you want to know what went wrong and where. `safeParse()` hands back a `SchemaResult` holding either the validated value or a `SchemaError`, so you can inspect failures without try/catch.
- [JSON Serialization](https://docs.page/btwld/ack/core-concepts/json-serialization): Ack validates decoded JSON at your application boundary. On the way back out, plain schemas produce JSON-native Dart values directly, while [codecs](./codecs.mdx) encode rich runtime values such as `DateTime` and `Uri` back to their wire...
- [Schemas](https://docs.page/btwld/ack/core-concepts/schemas): A schema describes the shape your data should have. You build one with the `Ack` factory, then validate input against it. This page tours every schema type and how to compose them.
- [Model Code Generation](https://docs.page/btwld/ack/core-concepts/typesafe-schemas): Ack supports code generation in three workflows: start from an Ack schema, start from a Dart class, or start from a `.schema.json` document.
- [Validation Rules](https://docs.page/btwld/ack/core-concepts/validation): Constraints turn "a string" into "an email between 2 and 50 characters." Chain them onto any schema — each comes with a sensible default error message, and you can supply your own (see [Custom Validation](../guides/custom-validation.mdx)).
- [Installing Ack](https://docs.page/btwld/ack/getting-started/installation): Ack is a pure-Dart package with no required build step. Add the core library — and, optionally, the code generator for immutable models.
- [What's New & Migration Guide](https://docs.page/btwld/ack/getting-started/migration-guide): This guide summarizes **what exists in Ack today**, **what changed in 1.7 and 2.0 (and why)**, and **every removed 1.x symbol with its exact substitution**.
- [Quickstart Tutorial](https://docs.page/btwld/ack/getting-started/quickstart-tutorial): This tutorial validates a Dart map — the kind you get from `jsonDecode()` of an API response or a form submission — and handles every outcome.
- [Common Recipes](https://docs.page/btwld/ack/guides/common-recipes): Quick solutions to common validation scenarios. Each recipe shows a working schema pattern you can copy and adapt. Examples assume `package:ack/ack.dart` is imported unless the snippet shows other imports.
- [Creating Adapter Packages](https://docs.page/btwld/ack/guides/creating-schema-converter-packages): An adapter exports an Ack boundary contract to another schema system. Choose the export surface according to the target, and reject semantics you cannot preserve. See [Ecosystem Integrations](./ecosystem-integrations.mdx) to use an exist...
- [Custom Validation Rules](https://docs.page/btwld/ack/guides/custom-validation): While Ack provides many [built-in validation rules](../core-concepts/validation.mdx), you can extend them with your own value-level constraints or object-level refinement logic.
- [Ecosystem Integrations](https://docs.page/btwld/ack/guides/ecosystem-integrations): Reuse an `AckSchema` (or a `@Schemable()` model's `Model.schema`) across Ack's official adapter packages. Each adapter has its own supported schema shapes; MCP tool inputs, for example, must render as a non-null object root.
- [Form Validation in Flutter with Ack](https://docs.page/btwld/ack/guides/flutter-form-validation): This guide shows how to use Ack for validating forms in Flutter applications.
- [JSON Schema Integration](https://docs.page/btwld/ack/guides/json-schema-integration): Your Ack [schema](../core-concepts/schemas.mdx) already describes your data's shape — so you can import and export JSON Schema (preserving Draft 2020-12 resources for imported schemas and emitting Draft-7 for native schemas) and reuse it...
- [Adapter Package Quickstart](https://docs.page/btwld/ack/guides/schema-converter-quickstart): Use an [existing adapter](./ecosystem-integrations.mdx) when it supports your target. To write a new one, start with [Creating Adapter Packages](./creating-schema-converter-packages.mdx), which owns the implementation guidance and a cont...