v1.0.0
Quickstart GitHub

Build APIs. Skip the boilerplate.

Consistent request validation and automated OpenAPI documentation for your favorite backend frameworks.

v1.0.0 Open Source (MIT) Zero-Config /docs

---

ONE WORKFLOW · MULTIPLE BACKEND ECOSYSTEMS

Express

Node.js middleware

Declarative schema validation middleware attaching sanitized objects to req.validatedBody with instant HTTP 422 errors.

View Documentation →
React / Next @atozapi/nextjs

Next.js

App Router integration

Higher-order route handler wrapping Request streams with JSON validation and typed response inference.

View Documentation →
Go 1.20+ pkg.go.dev

Go · Gin

Typed request validation

Reflection-driven Guard middleware validating Go struct binding tags with type-safe BodyT retrieval.

View Documentation →
PHP 8.2+ atozapi/laravel

Laravel

PHP 8 integration

Native PHP 8 #[Post] routing attributes and reflection middleware formatting errors into FastAPI's { detail: [...] } standard.

View Documentation →

---

Why AtoZAPI?

FastAPI revolutionized the Python backend ecosystem with two core ergonomics: declarative runtime validation and instant interactive documentation at /docs.

Until now, teams using Node.js, Next.js, Go, or PHP had to choose between writing verbose JSDoc/Swagger YAML by hand, maintaining desynchronized specs, or stitching together incompatible libraries.

AtoZAPI bridges that gap:

Zero Manual Swagger Writing

Never write hundreds of lines of brittle OpenAPI YAML or JSDoc comments again. Your route definitions and schemas serve as the single source of truth.

Standardized HTTP 422 Errors

Every SDK emits the identical Pydantic-compatible validation payload: { "detail": [{ "loc": [...], "msg": "...", "type": "..." }] }.

Instant Interactive /docs & /redoc

A single CLI command scans your code and boots up embedded Swagger UI and ReDoc servers at http://localhost:8000/docs.

Zero-Dependency Runtime Architecture

Lightweight, deterministic validation designed for microservices and serverless runtimes without heavy dependencies.

---

Standardized HTTP 422 Error Contract

Whenever a request fails schema validation, AtoZAPI intercepts the request before reaching your business logic and returns an HTTP 422 Unprocessable Entity response:

json
{
  "detail": [
    {
      "loc": ["body", "age"],
      "msg": "Input should be greater than or equal to 18",
      "type": "greater_than_equal",
      "ctx": { "ge": 18 }
    },
    {
      "loc": ["body", "email"],
      "msg": "Input should be a valid email address",
      "type": "value_error.email"
    }
  ]
}

---

Ecosystem Comparison

FrameworkPackageLanguage ParadigmValidation Hook
Node.js (Express)@atozapi/expressExpress Middlewareapp.post('/api', atozapi(schema), handler)
Next.js App Router@atozapi/nextjsHigher-Order Handlerexport const POST = nextAtozapi({ schema, handler })
Go (Gin)github.com/dhirajparihar/AtoZAPI/sdk-go/ginGin Middleware + Genericsr.POST('/api', ginatozapi.Guard(Req{}), handler)
PHP (Laravel)atozapi/laravelPHP 8 Attributes + Reflection#[Post('/api', rules: [...])]
Type to search documentation...