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);
A Complete Toolkit for Modern Applications
Server
Core HTTP server for creating REST APIs.
OpenAPI
Generates OpenAPI documentation and a Swagger UI for APIs.
Security
Manage realms, roles, permissions, and JWT-based authentication.
Database ORM
A type-safe SQL query builder and ORM using Drizzle.
Bucket
A universal interface for object and file storage providers.
Cache
A generic key-value caching interface with in-memory implementation.
Queue
A simple, powerful interface for message queueing systems.
Topic
A publish-subscribe (pub/sub) messaging interface for eventing.
Scheduler
Schedule recurring tasks using cron expressions or fixed intervals.
React
Build server-side rendered (SSR) or single-page React applications.
SEO
Manages the document <head> for SEO and metadata.
Auth
Simplifies user authentication flows in React applications.
Links
Enables type-safe communication between different services.
Locking
Distributed mutex and semaphore for resource locking and synchronization.
Retry
Simple, declarative, and powerful automatic retry for failed operations.
Batch
Efficiently process operations in groups by size or time.
Command
A versatile task runner for scripts and automation workflows.
Notification
Create and send templated email or mobile notifications.