Demo App

A production-style full-stack Todo application that uses every major part of the Cleverbrush framework — from schema-first REST endpoints and typed client to auth, ORM, OpenAPI, OpenTelemetry tracing, and schema-driven React forms. All services run as Docker containers so you can explore the live app, inspect traces in SigNoz, and browse the database in pgAdmin straight away.

Running the demo

The entire stack — backend, frontend, Postgres, Swagger UI, pgAdmin, OpenTelemetry Collector, ClickHouse, and SigNoz — runs via Docker Compose. Requires Docker.

git clone https://github.com/cleverbrush/framework.git
cd framework
docker compose -f demos/docker-compose.yml up

On first boot the database migrator, SigNoz provisioner, and ClickHouse init containers run automatically — allow 30–60 seconds for everything to become healthy before opening the URLs below.

OpenTelemetry instrumentation

The backend is instrumented with @cleverbrush/otel. Every HTTP request, database query, and background job produces a span that is exported to the bundled OpenTelemetry Collector (OTLP gRPC on port 4317) and stored in SigNoz + ClickHouse. Structured log lines from @cleverbrush/log are forwarded to the same pipeline so traces and logs are correlated by trace_id.

Open SigNoz at http://localhost:8082 to explore:

  • Traces — end-to-end request waterfalls including DB queries and outbound calls
  • Logs — structured log stream with trace correlation
  • Dashboards — HTTP traffic, DB calls, and Node.js runtime metrics. Dashboard JSON files are included in demos/signoz/dashboards/ and can be imported manually via the SigNoz UI under Dashboards → Import if auto-provisioning does not run.

Login: admin@todo.local.com / Admin1234!

Services & URLs

Once the stack is running, these services are available on localhost:

ServiceURLNotes
Frontend apphttp://localhost:5173React + Vite — register an account and try all the features
Backend APIhttp://localhost:3000Health check at /health, OpenAPI spec at /openapi.json
Swagger UIhttp://localhost:8090Interactive API explorer — try every endpoint directly from the browser
pgAdminhttp://localhost:8110Postgres GUI — login admin@todo.local.com / admin
SigNozhttp://localhost:8082Traces, logs, and pre-built dashboards — login admin@todo.local.com / Admin1234!

What the demo covers

The Todo app is intentionally comprehensive — it is designed to show how the framework pieces fit together in a real codebase, not as a toy.

Framework packages in use

PackageDemonstrated by
@cleverbrush/server30+ REST endpoints, middleware chain, request batching, health check, RFC 9457 error responses
@cleverbrush/schemaShared contract used on both server and client — body, query, header, and response schemas
@cleverbrush/clientType-safe frontend client with retry, timeout, deduplication, throttling cache, and request batching
@cleverbrush/authJWT authentication, Google OAuth login, role-based authorization (user / admin)
@cleverbrush/diDependency injection container wiring database, config, and services
@cleverbrush/server-openapiAuto-generated OpenAPI 3.1 spec with tags, webhooks, and security schemes
@cleverbrush/orm + @cleverbrush/orm-cliKnex-based ORM with schema-driven queries and migration management
@cleverbrush/otelOpenTelemetry tracing and metrics exported to SigNoz via OTLP
@cleverbrush/logStructured logging with console, file, and OTLP sinks; template-based log messages
@cleverbrush/react-formSchema-driven form fields with auto-validation — no manual rules
@cleverbrush/envTyped environment variable parsing at startup with schema validation
@cleverbrush/mapperObject mapping between database rows and API response shapes

API features you can explore

  • Full CRUD for todos — create, list (with pagination), update, delete, mark complete
  • Idempotency key header demo (X-Idempotency-Key, If-Match)
  • CSV export and bulk import (sync 207 / async 202)
  • Binary file attachment download
  • Real-time activity feed via typed WebSocket subscriptions
  • Webhook subscriptions for todo.created / todo.completed
  • Admin endpoints (user list, delete, raw activity stream)
  • Resilience demo endpoints — slow responses, flaky retries, SQL crash, runtime crash

View source

The entire demo lives in the demos/ directory of the monorepo. Browse it on GitHub to see exactly how each framework package is wired together:

For code patterns and architecture decisions, see the Examples page.