/ justapi / docsplan.md
swadhinbiswas πŸ“š docs: comprehensive docsplan.md β€” FastAPI-level docs rebuild plan Β· 7/25/2026
a16ef06
735 lines Β· 29.9 KB
Raw Download

JustAPI Documentation Site β€” Full Rebuild Plan (FastAPI-Level Depth)

Goal: Rebuild the docs_site (Astro + Starlight) to match FastAPI's documentation in depth, polish, navigation structure, and developer experience.

FastAPI docs analyzed: https://fastapi.tiangolo.com/ β€” 7 top-level nav sections, ~140+ pages, auto-generated API reference, tutorial-first learning path, multilingual support, sponsor integration.

Current JustAPI docs_site: ~20 pages across getting-started, tutorials, API reference, advanced, deployment, security, observability, contributing, inference, and reference sections. Content exists but lacks tutorial depth, API reference auto-generation, and structured learning path.


0. FastAPI Docs Analysis β€” What Makes It Great

0.1 Navigation Architecture (Top-Level)

FastAPI Nav Item Pages Purpose
Home 1 Hero, sponsors, testimonials, quick-start, performance, dependencies
Features 1 Bullet-point feature showcase
Learn ~76 Main learning path β€” Python types intro, async intro, tutorial (35p), advanced guide (30p), CLI, editor support, deployment (8p), how-to recipes (11p)
Reference ~21 Auto-generated API reference β€” every class, function, parameter documented with signatures and examples
Resources 7 People, help, contributing, translations, project template, external links, newsletter
About 4 Alternatives/comparisons, history/design, benchmarks, repo management
Release Notes 1 Version changelog

0.2 Key Design Patterns

  1. Tutorial-first learning path. The Learn section is a structured course that builds from zero to advanced. Each page has:

    • Complete, runnable code example at the top
    • Step-by-step explanation
    • "Tip", "Note", "Info" callout boxes
    • Screenshots of Swagger UI / ReDoc
    • "Recap" section
    • Previous/Next page navigation
    • "On this page" right sidebar with section anchors
    • Breadcrumb navigation
  2. Python version tabs. Code blocks are shown with Python 3.10+ by default, with tabs for older versions.

  3. Auto-generated API Reference. The /reference/ section is generated from docstrings β€” every parameter, return type, and method has a documented signature with examples.

  4. Sponsor integration. Banner sponsors appear at the top of every page; sidebar sponsors on the home page.

  5. Translation support. 12 languages with automatic language switcher in the top bar.

  6. "How To" recipes section. 11 standalone recipes for specific tasks (GraphQL, custom middleware, database testing, etc.)

  7. Deployment depth. 8 pages covering HTTPS, manual, cloud providers, Docker, server workers, concepts.

0.3 Page Count Breakdown

Section Subsection Pages
Learn Python Types Intro, Async/Await 2
Learn Tutorial - User Guide 35 (5 deps sub + 4 security sub)
Learn Advanced User Guide 30 (2 security sub)
Learn FastAPI CLI 1
Learn Editor Support 1
Learn Deployment 8
Learn How-To Recipes 11
Reference API Reference 21 (2 OpenAPI sub)
Resources People, Help, Contributing, etc. 7
About Alternatives, History, Benchmarks, Management 4
Total ~140+ pages

1. JustAPI Current State Audit

1.1 Existing Docs Inventory

Section Existing Pages Status
Getting Started overview, installation, first-steps, cli-scaffolder, migrating-from-fastapi 5 pages exist, need enhancement
Tutorials hello-world, path-query-params, request-body, dependency-injection, middleware, error-handling, file-uploads, background-tasks, websockets-sse, routing-subrouters, database-integration 11 pages exist
API Reference index, justapiapp, routing, apirouter, request, responses, dependency-injection, exceptions, schema-validation, websockets, background-tasks, scheduler, session, plugins, testing-client, uploadfile, database 17 pages exist
Advanced native-fast-path, pyo3-ffi-safety, rust-core-deep-dive, zero-gil-architecture, streaming-output, agent-system, multi-protocol-apis, performance-tuning, resilience-patterns 9 pages exist
Deployment production-checklist, docker, kubernetes-helm, cloudflare-pages, railway, flyio, aks, eks, gke 9 pages exist
Security secure-configuration, penetration-testing, owasp-compliance, policy 4 pages exist
Observability opentelemetry, health-checks, metrics-monitoring, structured-logging 4 pages exist
Contributing development-setup, coding-standards, testing-guide, benchmarking-guide, documentation-guide 5 pages exist
Inference overview, gpu-cuda-setup, llm-serving-api, scheduling-batching 4 pages exist
Reference cli, configuration, error-codes, adr-index, glossary, release-notes 6 pages exist
Examples index 1 page exists
Total ~75 pages

1.2 Gaps vs FastAPI

What FastAPI has JustAPI status Action
Tutorial with 35 progressive lessons 11 tutorials, not fully progressive Expand to 35+ tutorial pages
Advanced User Guide with 30 pages 9 advanced pages Add 21 advanced topics
How-To Recipes (11 pages) 0 Create new section
Auto-generated API Reference 17 hand-written pages Switch to docstring-generated
Python version tabs in code Not supported Add Starlight tab component
Multilingual support (12 langs) Not supported Add i18n routing
Sponsor banners on every page Not supported Add sponsor integration
"On this page" TOC with anchors Starlight built-in Already works
Breadcrumb navigation Starlight built-in Already works
Previous/Next page links Starlight built-in Already works
Search (Pagefind) Starlight built-in Already works
Screenshots in tutorials 0 screenshots Add screenshots
"Tip/Note/Warning" callout boxes Starlight has :::tip etc. Use consistently
Recap section in tutorials Not used Add to every tutorial
Editor support page 0 Create
FastAPI CLI reference Has CLI reference Enhance
Deployment cloud providers in docs 9 deployment pages Enhance
External links/resources page 0 Create
Project generation template page 0 Create
History, design and future 0 Create (DECISIONS.md)
Performance benchmarks page BENCHMARKS.md exists Port to docs site
Release notes changelog release-notes.md exists Enhance

2. Rebuild Plan β€” Phases

Phase 1: Information Architecture & Navigation Overhaul

Goal: Restructure sidebar to match FastAPI's learning-path-first approach.

1.1 New Sidebar Structure

Getting Started (5 pages)
β”œβ”€β”€ Overview & Philosophy
β”œβ”€β”€ Installation
β”œβ”€β”€ First Steps
β”œβ”€β”€ CLI Project Scaffolder
└── Migrating from FastAPI

Tutorial β€” User Guide (35+ pages, progressive)
β”œβ”€β”€ Python Types Intro (NEW)
β”œβ”€β”€ Async / Await (NEW)
β”œβ”€β”€ First Steps (existing, enhance)
β”œβ”€β”€ Path Parameters (existing, enhance)
β”œβ”€β”€ Query Parameters (existing, enhance)
β”œβ”€β”€ Request Body (Pydantic) (existing, enhance)
β”œβ”€β”€ Query Parameters & String Validations (NEW)
β”œβ”€β”€ Path Parameters & Numeric Validations (NEW)
β”œβ”€β”€ Query Parameter Models (NEW)
β”œβ”€β”€ Body β€” Multiple Parameters (NEW)
β”œβ”€β”€ Body β€” Fields (NEW)
β”œβ”€β”€ Body β€” Nested Models (NEW)
β”œβ”€β”€ Declare Request Example Data (NEW)
β”œβ”€β”€ Extra Data Types (NEW)
β”œβ”€β”€ Cookie Parameters (NEW)
β”œβ”€β”€ Header Parameters (NEW)
β”œβ”€β”€ Cookie Parameter Models (NEW)
β”œβ”€β”€ Header Parameter Models (NEW)
β”œβ”€β”€ Response Model β€” Return Type (NEW)
β”œβ”€β”€ Extra Models (NEW)
β”œβ”€β”€ Response Status Code (NEW)
β”œβ”€β”€ Form Data (NEW)
β”œβ”€β”€ Form Models (NEW)
β”œβ”€β”€ Request Files (NEW)
β”œβ”€β”€ Request Forms & Files (NEW)
β”œβ”€β”€ Handling Errors (existing, enhance)
β”œβ”€β”€ Path Operation Configuration (NEW)
β”œβ”€β”€ JSON Compatible Encoder (NEW)
β”œβ”€β”€ Body β€” Updates (NEW)
β”œβ”€β”€ Dependencies (existing, expand)
β”‚   β”œβ”€β”€ Classes as Dependencies (NEW)
β”‚   β”œβ”€β”€ Sub-dependencies (NEW)
β”‚   β”œβ”€β”€ Dependencies in Path Ops (NEW)
β”‚   β”œβ”€β”€ Global Dependencies (NEW)
β”‚   └── Dependencies with yield (NEW)
β”œβ”€β”€ Security (expand)
β”‚   β”œβ”€β”€ Security First Steps (NEW)
β”‚   β”œβ”€β”€ Get Current User (NEW)
β”‚   β”œβ”€β”€ Simple OAuth2 (NEW)
β”‚   └── OAuth2 + JWT Tokens (NEW)
β”œβ”€β”€ Middleware (existing, enhance)
β”œβ”€β”€ CORS (existing)
β”œβ”€β”€ SQL Databases (existing)
β”œβ”€β”€ Bigger Applications β€” Multiple Files (existing)
β”œβ”€β”€ Background Tasks (existing, enhance)
β”œβ”€β”€ Metadata & Docs URLs (NEW)
β”œβ”€β”€ Frontend (NEW)
β”œβ”€β”€ Static Files (NEW)
β”œβ”€β”€ Testing (existing, enhance)
└── Debugging (NEW)

Advanced User Guide (30 pages)
β”œβ”€β”€ Native Fast Path (existing, enhance)
β”œβ”€β”€ Zero-GIL Architecture (existing, enhance)
β”œβ”€β”€ Rust Core Deep Dive (existing, enhance)
β”œβ”€β”€ PyO3 FFI Safety (existing, enhance)
β”œβ”€β”€ Streaming Output (existing, enhance)
β”œβ”€β”€ Agent System (existing, enhance)
β”œβ”€β”€ Multi-Protocol APIs (existing, enhance)
β”œβ”€β”€ Performance Tuning (existing, enhance)
β”œβ”€β”€ Resilience Patterns (existing, enhance)
β”œβ”€β”€ Path Operation Advanced Configuration (NEW)
β”œβ”€β”€ Additional Status Codes (NEW)
β”œβ”€β”€ Return a Response Directly (NEW)
β”œβ”€β”€ Custom Response β€” HTML, Stream, File (NEW)
β”œβ”€β”€ Additional Responses in OpenAPI (NEW)
β”œβ”€β”€ Response Cookies (NEW)
β”œβ”€β”€ Response Headers (NEW)
β”œβ”€β”€ Response β€” Change Status Code (NEW)
β”œβ”€β”€ Advanced Dependencies (NEW)
β”œβ”€β”€ Advanced Security (NEW)
β”‚   β”œβ”€β”€ OAuth2 Scopes (NEW)
β”‚   └── HTTP Basic Auth (NEW)
β”œβ”€β”€ Using the Request Directly (NEW)
β”œβ”€β”€ Using Dataclasses (NEW)
β”œβ”€β”€ Advanced Middleware (NEW)
β”œβ”€β”€ Sub Applications β€” Mounts (NEW)
β”œβ”€β”€ Behind a Proxy (NEW)
β”œβ”€β”€ Templates (Jinja2) (NEW)
β”œβ”€β”€ WebSockets (existing, enhance)
β”œβ”€β”€ Lifespan Events (NEW)
β”œβ”€β”€ Testing WebSockets (NEW)
β”œβ”€β”€ Testing Events (NEW)
β”œβ”€β”€ Testing Dependencies with Overrides (NEW)
β”œβ”€β”€ Async Tests (NEW)
β”œβ”€β”€ Settings & Environment Variables (NEW)
β”œβ”€β”€ OpenAPI Callbacks (NEW)
β”œβ”€β”€ OpenAPI Webhooks (NEW)
β”œβ”€β”€ Including WSGI β€” Flask, Django (NEW)
β”œβ”€β”€ Generating SDKs (NEW)
└── Strict Content-Type Checking (NEW)

How-To Recipes (15 pages, NEW section)
β”œβ”€β”€ General Recipes (NEW)
β”œβ”€β”€ Migrate from Pydantic v1 (NEW)
β”œβ”€β”€ GraphQL Integration (NEW)
β”œβ”€β”€ Custom Request & Route Classes (NEW)
β”œβ”€β”€ Conditional OpenAPI (NEW)
β”œβ”€β”€ Extending OpenAPI (NEW)
β”œβ”€β”€ Separate Input/Output Schemas (NEW)
β”œβ”€β”€ Custom Docs UI Assets (NEW)
β”œβ”€β”€ Configure Swagger UI (NEW)
β”œβ”€β”€ Testing a Database (NEW)
β”œβ”€β”€ Custom Error Status Codes (NEW)
β”œβ”€β”€ gRPC Advanced Patterns (NEW)
β”œβ”€β”€ WASM Middleware Plugins (NEW)
β”œβ”€β”€ Circuit Breaker Recipes (NEW)
└── Background Task Patterns (NEW)

API Reference (20+ pages, auto-generated)
β”œβ”€β”€ JustAPIApp β€” Constructor & Methods (enhance)
β”œβ”€β”€ Request Parameters (Path, Query, Header, Cookie) (enhance)
β”œβ”€β”€ Status Codes (enhance)
β”œβ”€β”€ UploadFile (enhance)
β”œβ”€β”€ Exceptions β€” HTTPException (enhance)
β”œβ”€β”€ Dependencies β€” Depends() (enhance)
β”œβ”€β”€ APIRouter (enhance)
β”œβ”€β”€ BackgroundTasks (enhance)
β”œβ”€β”€ Request (enhance)
β”œβ”€β”€ WebSockets (enhance)
β”œβ”€β”€ Response (enhance)
β”œβ”€β”€ Custom Response Classes (enhance)
β”œβ”€β”€ Middleware (enhance)
β”œβ”€β”€ OpenAPI β€” Docs & Models (enhance)
β”œβ”€β”€ Security Tools (enhance)
β”œβ”€β”€ Encoders (enhance)
β”œβ”€β”€ Static Files (enhance)
β”œβ”€β”€ Templating β€” Jinja2Templates (enhance)
β”œβ”€β”€ TestClient (enhance)
β”œβ”€β”€ Schema β€” Validator & Fields (enhance)
└── Plugin System β€” Lifecycle Hooks (enhance)

Deployment (10 pages, enhance existing)
β”œβ”€β”€ Production Checklist (enhance)
β”œβ”€β”€ About HTTPS (NEW)
β”œβ”€β”€ Run a Server Manually (NEW)
β”œβ”€β”€ Deployment Concepts (NEW)
β”œβ”€β”€ Docker (enhance)
β”œβ”€β”€ Kubernetes / Helm (enhance)
β”œβ”€β”€ Server Workers β€” Workers & Concurrency (NEW)
β”œβ”€β”€ Google Cloud (GKE) (enhance)
β”œβ”€β”€ Amazon (EKS) (enhance)
β”œβ”€β”€ Azure (AKS) (enhance)
β”œβ”€β”€ Fly.io (enhance)
β”œβ”€β”€ Railway (enhance)
└── Cloudflare Pages (enhance)

Security (5 pages)
β”œβ”€β”€ Security Policy (enhance)
β”œβ”€β”€ OWASP Compliance (enhance)
β”œβ”€β”€ Penetration Testing (enhance)
β”œβ”€β”€ Secure Configuration (enhance)
└── Authentication & Authorization Guide (NEW)

Observability (5 pages)
β”œβ”€β”€ OpenTelemetry Tracing (enhance)
β”œβ”€β”€ Prometheus Metrics (enhance)
β”œβ”€β”€ Structured Logging (enhance)
β”œβ”€β”€ Health Checks (enhance)
└── Alerting & Incident Response (NEW)

Contributing (6 pages)
β”œβ”€β”€ Development Setup (enhance)
β”œβ”€β”€ Coding Standards (enhance)
β”œβ”€β”€ Testing Guide (enhance)
β”œβ”€β”€ Benchmarking Guide (enhance)
β”œβ”€β”€ Documentation Guide (enhance)
└── Release Process (NEW)

Inference / AI (6 pages, existing)
β”œβ”€β”€ Overview (enhance)
β”œβ”€β”€ GPU / CUDA Setup (enhance)
β”œβ”€β”€ LLM Serving API (enhance)
β”œβ”€β”€ Scheduling & Batching (enhance)
β”œβ”€β”€ Quantization & LoRA (NEW)
└── OpenAI-Compatible API (NEW)

Reference (8 pages)
β”œβ”€β”€ CLI Reference (enhance)
β”œβ”€β”€ Configuration Reference (enhance)
β”œβ”€β”€ Error Codes (enhance)
β”œβ”€β”€ ADR Index (enhance)
β”œβ”€β”€ Glossary (enhance)
β”œβ”€β”€ Release Notes (enhance)
β”œβ”€β”€ Changelog (NEW)
└── Benchmarks (NEW, port from BENCHMARKS.md)

Resources (4 pages, NEW section)
β”œβ”€β”€ Help & Support (NEW)
β”œβ”€β”€ External Links & Ecosystem (NEW)
β”œβ”€β”€ Full Stack Project Template (NEW)
└── Newsletter / Community (NEW)

About (4 pages, NEW section)
β”œβ”€β”€ Alternatives, Inspiration & Comparisons (NEW)
β”œβ”€β”€ History, Design & Future (NEW)
β”œβ”€β”€ Benchmarks & Performance (NEW)
β”œβ”€β”€ Repository Management (NEW)
└── License (NEW)

Total planned pages: ~180+ (vs ~75 current, vs ~140 FastAPI)


Phase 2: Tutorial Deep-Dive β€” Expand to 35+ Progressive Pages

Pattern for each tutorial page (mirror FastAPI):

---
title: <Topic>
description: <SEO description>
keywords: [<tags>]
---

# <Title>

<2-3 sentence introduction>

<Complete, runnable code example at top>

## <Step 1>

<Explanation with code snippets>

:::tip
<Tip callout>
:::

:::note
<Note callout>
:::

## <Step N>

<Screenshots of Swagger UI / ReDoc where applicable>

## Recap

<Summary of what was learned>

## See Also

- [Next Topic](/tutorial/next-topic/)
- [Related API Reference](/reference/related/)

2.1 New Tutorials to Write (24 missing)

These are the tutorials FastAPI has that JustAPI doesn't:

  1. Python Types Intro β€” str, int, float, bool, list, dict, Optional, Union, Literal, TypedDict, dataclass. How JustAPI uses type hints.
  2. Async / Await β€” When to use async def vs def, concurrency model, GIL implications.
  3. Query Parameters & String Validations β€” Query() with min_length, max_length, pattern, deprecated.
  4. Path Parameters & Numeric Validations β€” Path() with ge, le, gt, lt.
  5. Query Parameter Models β€” Using Pydantic models for query params.
  6. Body β€” Multiple Parameters β€” Mixing path, query, body, singular body values.
  7. Body β€” Fields β€” Field() for Pydantic model fields.
  8. Body β€” Nested Models β€” Sub-models, deeply nested JSON.
  9. Declare Request Example Data β€” example, examples in schema.
  10. Extra Data Types β€” UUID, datetime, date, bytes, Decimal, Base64.
  11. Cookie Parameters β€” Reading cookies.
  12. Header Parameters β€” Reading headers.
  13. Cookie Parameter Models β€” Pydantic models for cookies.
  14. Header Parameter Models β€” Pydantic models for headers.
  15. Response Model β€” Return Type β€” response_model, filtering fields.
  16. Extra Models β€” Multiple related models, inheritance.
  17. Response Status Code β€” Setting custom status codes.
  18. Form Data β€” Form() for non-JSON forms.
  19. Form Models β€” Pydantic models for forms.
  20. Request Files β€” File() and UploadFile.
  21. Request Forms & Files β€” Combining forms and files.
  22. Path Operation Configuration β€” tags, summary, description, response_description, deprecated, include_in_schema.
  23. JSON Compatible Encoder β€” jsonable_encoder.
  24. Body β€” Updates β€” PATCH vs PUT, partial updates.

2.2 Tutorials to Expand (11 existing)

  1. Hello World β€” Add Python version tabs, run with uv not just python main.py, add curl testing examples, add OpenAPI docs section.
  2. Path & Query Parameters β€” Split into path params and query params separate pages. Add validation sections.
  3. Request Body β€” Add nested models section, example data, Field usage.
  4. Dependency Injection β€” Add sub-dependencies, classes as deps, global deps, yield deps.
  5. Middleware β€” Add ASGI middleware, custom middleware, third-party middleware.
  6. Error Handling β€” Add custom exception handlers, override default handlers.
  7. File Uploads β€” Add form models, multiple file uploads.
  8. Background Tasks β€” Add task dependencies, error handling.
  9. WebSockets & SSE β€” Split into separate pages. Add testing WebSockets section.
  10. Routing & Subrouters β€” Add path operation configuration, metadata.
  11. Database Integration β€” Add async SQL, migrations, testing.

Phase 3: Advanced User Guide β€” Expand to 30+ Pages

3.1 Existing to Enhance (9 pages)

  1. Native Fast Path β€” Add performance comparison graphs, when to use native=True vs when not to.
  2. Zero-GIL Architecture β€” Update with free-threaded Python 3.13t/3.14t section.
  3. Rust Core Deep Dive β€” Add codebase navigation guide, key structs and traits.
  4. PyO3 FFI Safety β€” Update with latest PyO3 patterns, Bound API.
  5. Streaming Output β€” Add @app.stream_json, async generator patterns.
  6. Agent System β€” Add MCP tool exposition guide, session management.
  7. Multi-Protocol APIs β€” Add JSON-RPC and gRPC examples side-by-side.
  8. Performance Tuning β€” Add worker config, connection pooling, justapi.conf reference.
  9. Resilience Patterns β€” Add circuit breaker configuration, bulkhead, retry policies.

3.2 New Advanced Pages to Write (21 pages)

  1. Path Operation Advanced Configuration β€” openapi_extra, response_model_exclude_unset, etc.
  2. Additional Status Codes β€” Returning custom status codes alongside 200.
  3. Return a Response Directly β€” Response, JSONResponse, HTMLResponse.
  4. Custom Response β€” HTML, Stream, File β€” StreamingResponse, FileResponse, RedirectResponse.
  5. Additional Responses in OpenAPI β€” Documenting error responses, multiple response schemas.
  6. Response Cookies β€” Setting and deleting cookies in responses.
  7. Response Headers β€” Custom response headers.
  8. Response β€” Change Status Code β€” Default status code override.
  9. Advanced Dependencies β€” Parameterized dependencies, async generator deps.
  10. Advanced Security β€” OAuth2 scopes, HTTP Basic Auth, API keys.
  11. Using the Request Directly β€” Accessing raw request body, headers.
  12. Using Dataclasses β€” Python dataclasses as request models.
  13. Advanced Middleware β€” BaseHTTPMiddleware, ASGI middleware, third-party middleware integration.
  14. Sub Applications β€” Mounts β€” Mounting sub-applications at sub-paths.
  15. Behind a Proxy β€” root_path, X-Forwarded-* headers, reverse proxy config.
  16. Templates (Jinja2) β€” Server-side rendering with Jinja2.
  17. WebSockets Advanced β€” WebSocket connection management, broadcasting.
  18. Lifespan Events β€” startup/shutdown, lifespan context manager.
  19. Testing WebSockets β€” TestClient WebSocket testing.
  20. Testing Events β€” Testing lifespan events.
  21. Testing Dependencies with Overrides β€” app.dependency_overrides, test dependency injection.
  22. Async Tests β€” async test functions, httpx.AsyncClient.
  23. Settings & Environment Variables β€” Pydantic Settings, .env files.
  24. OpenAPI Callbacks β€” Webhook request schemas in OpenAPI.
  25. OpenAPI Webhooks β€” Outbound webhook definitions.
  26. Including WSGI β€” Flask, Django β€” Mounting WSGI apps.
  27. Generating SDKs β€” OpenAPI-based client generation (openapi-generator).
  28. Strict Content-Type Checking β€” CSRF prevention, Content-Type enforcement.

Phase 4: How-To Recipes (15 pages, NEW)

A standalone section for specific, task-oriented recipes:

  1. General How-To β€” Common patterns and workarounds.
  2. Migrate from Pydantic v1 β€” Field changes, model_dump() vs dict(), validators.
  3. GraphQL Integration β€” Setting up Strawberry GraphQL alongside REST.
  4. Custom Request & Route Classes β€” Extending Request and APIRoute.
  5. Conditional OpenAPI β€” Disabling OpenAPI in production.
  6. Extending OpenAPI β€” Adding custom OpenAPI fields.
  7. Separate Input/Output Schemas β€” Benefits and configuration.
  8. Custom Docs UI Assets β€” Self-hosting Swagger UI / ReDoc.
  9. Configure Swagger UI β€” swagger_ui_parameters, themes, syntax highlighting.
  10. Testing a Database β€” In-memory SQLite for tests, transaction rollback.
  11. Custom Error Status Codes β€” 403 β†’ 401 migration patterns.
  12. gRPC Advanced Patterns β€” Streaming RPCs, interceptors, auth.
  13. WASM Middleware Plugins β€” Writing and deploying wasmtime plugins.
  14. Circuit Breaker Recipes β€” Configuring resilience patterns for specific scenarios.
  15. Background Task Patterns β€” Prioritized tasks, task cancellation, progress reporting.

Phase 5: API Reference β€” Auto-Generated from Docstrings

Current state: 17 hand-written markdown pages.
Target: Auto-generated API reference from Python docstrings + Rust docstrings.

5.1 Tools & Implementation

  • Use pydoc-style generation or a Starlight plugin that parses Python stubs
  • Generate from actual .pyi type stubs in crates/justapi-py/python/justapi/
  • Document every public class, method, function, and parameter
  • Each reference page includes:
    • Signature with type annotations
    • Description from docstring
    • Parameter table (name, type, default, description)
    • Example usage
    • See also links

5.2 Reference Pages to Create/Enhance

# Page Source Priority
1 JustAPIApp justapi/__init__.py β€” FastAPI docstring style P0
2 Routing (@app.get/post/etc) Route decorators P0
3 APIRouter justapi/routing.py P0
4 Request Request object properties & methods P0
5 Response Response, JSONResponse, StreamingResponse P0
6 Dependencies Depends(), Path(), Query(), Header(), Cookie() P0
7 Exceptions HTTPException, RequestValidationError P0
8 WebSockets WebSocket handler, WebSocket class P0
9 Background Tasks BackgroundTasks, add_task P0
10 Schema & Validation Schema, Field, body_schema P0
11 UploadFile UploadFile properties & methods P0
12 Testing Client JustAPITestClient, get/post/etc P0
13 Middleware add_middleware, built-in middleware classes P1
14 Security Tools JWT, OAuth2 utilities P1
15 OpenAPI Docs UI configuration, openapi.json P1
16 Static Files Mount static files P1
17 Templating Jinja2Templates P1
18 Scheduler PyScheduler, cron/interval/once P1
19 Plugins Plugin lifecycle hooks P1
20 Session Session properties, agent state P1
21 Status Codes status module reference P2

Phase 6: Deployment β€” Expand to 12 Pages

Current: 9 deployment pages.

Enhancements:

  1. Production Checklist β€” Add Redis config, database pooling, logging levels, monitoring setup.
  2. About HTTPS β€” NEW. TLS termination, certbot, rustls, Let's Encrypt.
  3. Run a Server Manually β€” NEW. justapi serve flags, --workers, --port, --host.
  4. Deployment Concepts β€” NEW. Concurrency, workers, auto-scaling, resource limits.
  5. Docker β€” Add docker-compose examples with Redis, PostgreSQL, Prometheus.
  6. Kubernetes / Helm β€” Add auto-scaling config, ingress examples, resource requests/limits.
  7. Server Workers β€” NEW. Uvicorn workers vs JustAPI workers, Gunicorn integration.
  8. Cloud deployment guides β€” Port from deploy/ to docs_site with screenshots and CLI steps.

Phase 7: Security & Observability β€” Expand and Polish

Security (5 pages):

  • Add new Authentication & Authorization Guide β€” OAuth2 flows, JWT, API keys, RBAC.
  • Enhance existing pages with screenshots, config examples, and troubleshooting.

Observability (5 pages):

  • Add new Alerting & Incident Response β€” Prometheus AlertManager, PagerDuty integration, SLIs/SLOs.
  • Enhance existing with Grafana dashboard JSON examples.

Phase 8: Inference / AI Section (6 pages)

Current: 4 pages.
Add:

  • Quantization & LoRA β€” Model quantization, LoRA adapter serving.
  • OpenAI-Compatible API β€” /v1/chat/completions endpoint, token streaming, function calling.

Phase 9: Resources, About, and Polish Sections

Resources (NEW β€” 4 pages):

  1. Help & Support β€” GitHub Issues, Discord, Stack Overflow, FAQ.
  2. External Links & Ecosystem β€” Related projects, plugins, community tools.
  3. Full Stack Project Template β€” Guide to using the justapi create full-stack template.
  4. Newsletter / Community β€” RSS feed, mailing list, social links.

About (NEW β€” 5 pages):

  1. Alternatives, Inspiration & Comparisons β€” Port and expand from README competitors section.
  2. History, Design & Future β€” Why Rust, design decisions (port from DECISIONS.md).
  3. Benchmarks & Performance β€” Port from BENCHMARKS.md into searchable, navigable format.
  4. Repository Management β€” Maintainers, governance, release process.
  5. License β€” MIT License text.

Phase 10: Infrastructure & CI

10.1 Auto-Generation Pipeline

  • Create a script (scripts/gen_api_ref.py) that parses crates/justapi-py/python/justapi/ .pyi stubs and generates Starlight markdown pages in docs_site/src/content/docs/reference/
  • Run this script as part of the docs build (astro build)

10.2 Deployment

  • Cloudflare Pages (current target) β€” already configured
  • Add PR preview deployments for docs changes
  • Add link checker in CI for docs builds
  • Add spell checker (cspell) for documentation

10.3 CI Integration

  • Add docs build to wheels.yml (or a separate docs.yml)
  • Fail build on broken links
  • Auto-deploy on merge to main/master

10.4 SEO & Performance

  • Sitemap generation (@astrojs/sitemap)
  • OpenGraph + Twitter Card meta tags on every page
  • Canonical URLs
  • Pagefind full-text search
  • RSS feed for release notes (@astrojs/rss)
  • Lighthouse target: 100/100

3. Page Templates

3.1 Tutorial Page Template

---
title: <Topic Title>
description: <2-line SEO description>
keywords: [JustAPI, <topic>, Python web framework, FastAPI alternative]
---

# <Topic Title>

<2-3 sentence introduction explaining what this page covers and why it matters.

## <First Concept>

<Clear explanation with code snippet>

```python
# Example code

:::tip

:::

Swagger UI showing the feature

Recap

See Also


### 3.2 Reference Page Template

```markdown
---
title: <Class/Function Name>
description: API reference for <class/function>
keywords: [JustAPI, <class/function>, API reference]
---

# `<Class/Function Name>`

<Description of what this does>

## Signature

```python
<def signature with types>

Parameters

Parameter Type Default Description
<name> <type> <default>

Example

<runnable example>

See Also


---

## 4. Implementation Order

| Phase | Priority | Pages | Effort | Depends On |
|---|---|---|---|---|
| Phase 1: IA & Nav | P0 | Sidebar config | 1 day | Nothing |
| Phase 2: Tutorial Expansion | P0 | +24 new tutorials, 11 enhanced | 3 weeks | Phase 1 |
| Phase 3: Advanced Guide | P1 | +21 new, 9 enhanced | 2 weeks | Phase 1 |
| Phase 5: API Reference | P0 | 21 pages auto-generated | 1 week | Phase 1 |
| Phase 4: How-To Recipes | P1 | 15 new pages | 1 week | Phase 1 |
| Phase 6: Deployment | P1 | +3 new, 9 enhanced | 3 days | Phase 1 |
| Phase 7: Security & O11y | P2 | +2 new, 8 enhanced | 2 days | Phase 1 |
| Phase 8: Inference | P2 | +2 new, 4 enhanced | 2 days | Phase 1 |
| Phase 9: Resources & About | P2 | 9 new pages | 2 days | Phase 1 |
| Phase 10: Infrastructure | P2 | CI, auto-gen, SEO | 3 days | Phase 5 |

**Total estimated effort: ~8-10 weeks for a single contributor.**

---

## 5. Success Criteria

- [ ] Sidebar structure mirrors FastAPI β€” learning-path-first with progressive tutorials
- [ ] Tutorial β€” User Guide has 35+ progressive lessons with code, screenshots, and recaps
- [ ] Advanced User Guide has 30+ pages covering every framework feature
- [ ] API Reference auto-generated from `.pyi` stubs with full parameter docs
- [ ] How-To Recipes has 15 standalone task guides
- [ ] Deployment covers all 5 cloud providers with screenshots
- [ ] Security & Observability include configuration examples and dashboard JSON
- [ ] Resources, About, and Reference sections complete the 180-page target
- [ ] All pages have SEO meta tags, OpenGraph, and breadcrumbs
- [ ] docs build passes CI with no broken links
- [ ] Lighthouse 100/100 on all categories
- [ ] Search (Pagefind) indexes all content with section-level granularity