Z8ter Documentation

Z8ter is a lightweight, full-stack async Python web framework built on Starlette, designed for rapid development without compromising user experience.

Features

  • SSR-First: Server-side rendered pages with file-based routing
  • API Decorators: Clean, decorator-based API endpoint definitions
  • React Islands: Modern React components as Web Components for interactive UI
  • Vite Integration: Fast development with HMR and optimized production builds
  • Pluggable Auth: Protocol-based authentication with session management, password-reset/verification tokens, and account lockout
  • Security Baseline: CSRF, rate limiting, security headers, audit logging
  • Transactional Email: Pluggable providers (console, SMTP) with async sending
  • Background Tasks: In-process asyncio task manager with interval scheduling
  • Testing Utilities: In-memory repos and email outbox for fast app tests
  • Builder Pattern: Composable application assembly with dependency validation
  • CLI Tools: Scaffold pages, APIs, and entire projects

Quick Example

from z8ter.builders.app_builder import AppBuilder

# Build your application
builder = AppBuilder()
builder.use_config(".env")
builder.use_templating()
builder.use_vite()
builder.use_errors()

app = builder.build(debug=True)

Documentation

GuideDescription
Getting StartedInstall Z8ter and create your first project
Project StructureUnderstand the Z8ter project layout
Views & PagesCreate server-rendered pages
API EndpointsBuild REST API endpoints
React ComponentsAdd interactive React islands
AuthenticationImplement user authentication
SecurityMiddleware, lockout, tokens, secrets guidance
EmailSend transactional email
Background TasksRun recurring and fire-and-forget work
TestingTest apps with in-memory fakes
ConfigurationConfigure your application
CLI ReferenceCommand-line tools

Requirements

  • Python 3.10+
  • Node.js 18+ (for frontend tooling)

Installation

pip install z8ter

Philosophy

Z8ter embraces simplicity and convention over configuration:

  1. File-based routing: Your file structure defines your URLs
  2. Separation of concerns: Views, templates, content, and assets are organized logically
  3. Progressive enhancement: Start with SSR, add interactivity where needed
  4. Developer experience: Fast iteration with hot reload and helpful CLI tools

License

MIT License