Build with Clarity.

Alepha is a convention-driven TypeScript framework for building robust, end-to-end type-safe applications, from serverless APIs to full-stack React apps.

import { run } from "alepha";
import { $action } from "alepha/server";

class Api {
  // define a type-safe API action
  // accessible via HTTP GET /api/greet?name=John
  greet = $action({
    schema: { query: t.object({ name: t.string() }) },
    handler: async ({ query }) => `Hello, ${query.name}!`,
  });
}

run(Api);