Putting Everything Together¶
You’ve learned about pipelines. You’ve learned about boundaries. You’ve learned about policy, analysis, and fluent composition.
Now it’s time to zoom out.
This chapter brings everything together — not by introducing new features, but by showing how Jane’s pieces form a single, coherent system for validating real-world data.
If you understand this chapter, you understand Jane.
Jane Is a System, Not a Validator¶
Jane is intentionally opinionated.
It does not try to be:
- A bag of validation helpers.
- A schema-first code generator.
- A runtime type system.
Instead, Jane is a data boundary framework, which means:
- Data enters the system explicitly.
- It is processed in clearly defined stages.
- Decisions are made transparently.
- Outcomes are observable and auditable.
Everything you’ve seen — pipelines, boundaries, policy, analysis — exists to support that single idea.
The Complete Flow¶
Every Jane execution follows the same conceptual path:
- Input enters a pipeline.
- Stages produce events.
- Policy interprets events.
- A decision is made.
- A result is returned.
Nothing is hidden. Nothing is implicit. Nothing throws.
Whether you validate a single value or an entire object, this flow never changes.
Pipelines: The Unit of Meaning¶
Pipelines are where intent meets data.
A pipeline:
- Accepts exactly one value.
- Applies scan, parse, and validation rules.
- Records what happened as events.
- Produces a
JaneResult.
Example:
const age = await jane
.value(input.age)
.parse('numeric')
.positive()
.run();
Pipelines are:
- Immutable
- Composable
- Observable
They are the smallest meaningful unit in Jane.
Boundaries: Where Systems Live¶
Real systems don’t validate one value. They validate objects.
Boundaries let you:
- Run multiple pipelines together.
- Apply shared policy.
- Shape a final output object.
- Produce a single, coherent decision.
Example:
const result = await jane.boundary({
name: jane.value(input.name).string().nonEmpty(),
age: jane.value(input.age).parse('numeric').positive(),
email: jane.value(input.email).isEmail(),
});
Boundaries turn scattered validation into a data contract.
Policy: Interpreting What Happened¶
Rules describe what should be checked. Policy describes what it means.
Policy controls:
- Strictness (
strict,moderateorlax). - Severity interpretation.
- Reject, review, and warn behavior.
- Analysis features.
- Boundary aggregation rules.
Policy is:
- Declarative.
- Predictable.
- Resolved explicitly at execution time.
This makes Jane adaptable to real-world constraints without sacrificing clarity.
Analysis: Visibility Without Influence¶
Jane’s analysis features are observers. They never change outcomes.
They exist to answer questions like:
- What changed?
- Why did this pass or fail?
- What stages ran?
- What happened across the system?
Features like:
- Diff
- Explain
- Replay
- Telemetry
Turn Jane into a debuggable, observable system, not a black box.
Results: The Contract¶
Jane never throws validation errors. It always returns results.
A JaneResult:
- Tells you whether something passed.
- Tells you why it failed.
- Gives you structured issues and events.
- Provides shaped, safe output.
This makes Jane results:
- API-friendly.
- UI-friendly.
- Log-friendly.
- Test-friendly.
Results are the product of the system.
A Realistic Example¶
Putting it all together:
const UserBoundary = jane.strictBoundary({
name: jane.value(input.name).string().nonEmpty(),
age: jane.value(input.age).parse('numeric').positive(),
email: jane.value(input.email).nonEmpty().isEmail(),
});
const result = await UserBoundary;
if (!result.ok) {
return res.status(400).json({ errors: result.issues });
}
createUser(result.value);
What you get:
- Explicit validation.
- Shaped data.
- One decision.
- No exceptions.
- Full observability when you need it.
This is Jane working as intended.
Mental Model Recap¶
When working with Jane, remember:
- Pipelines validate values.
- Boundaries validate structures.
- Policy interprets events.
- Analysis observes behavior.
- Results are the contract.
If you keep that model in your head, Jane will always feel predictable.