Skip to content

Semitra

Rails-inspired application architecture for Cloudflare Workers with TypeScript-first contracts, JSON-first APIs, React Router 7 + Vite + Tailwind frontend defaults, and built-in subsystems for records, jobs, storage, mail, realtime, cache, and tenancy.

Semitra is not a Rails clone.

It is Rails architecture + TypeScript contracts + Cloudflare-native execution, with opinionated backend and frontend choices made for you.

  • A conventional app layout with controllers, records, resources, policies, jobs, mailers, mailboxes, and channels.
  • Runtime-validated contracts shared across request params, models, jobs, mail, and realtime messages.
  • Direct mapping to Cloudflare primitives instead of an abstraction that hides the platform.
  • React Router 7 framework mode, Vite, Tailwind CSS, and typed frontend models in generated starter apps.
  • A request lifecycle that stays explicit from route match to serialized response.

Semitra is a strong fit for:

  • multi-tenant SaaS applications
  • internal operations dashboards
  • customer portals with uploads and notifications
  • workflow apps with jobs, mail, and event fan-out
  • realtime notification or collaboration features
  • JSON APIs paired with a generated React Router frontend

Every Semitra request follows the same path:

Request -> Router -> Controller -> Policy -> Model -> Events -> Resource -> Response

That order is not branding. It is the framework boundary model:

  • the router finds the action
  • the controller coordinates request work
  • the policy authorizes and scopes
  • the model reads and writes state
  • events and jobs handle side effects
  • resources define response shape
  • D1 -> database
  • R2 -> storage
  • Queues -> jobs
  • Durable Objects -> realtime
  • KV -> cache