Build Type-Safe Applications
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.text() }),
response: t.object({ greeting: t.string() }),
},
handler: async ({ query }) => ({
greeting: `Hello, ${query.name}!`,
}),
});
}
run(Api);
A Complete Toolkit for Modern Applications
Alepha offers a comprehensive suite of 50+ packages designed to streamline the development of type-safe applications.
Server
Core HTTP server for creating REST APIs.
OpenAPI
Generates OpenAPI documentation for APIs.
Security
Manage realms, roles, permissions.
Database ORM
A type-safe SQL query builder and ORM.
Bucket
A universal interface for object storages.
Cache
A generic key-value caching interface.
Queue
A powerful interface for message queueing systems.
Topic
A publish-subscribe messaging interface.
Scheduler
Schedule recurring tasks using cron expressions.
React
Build SSR, CSR or SSG applications.
SEO
Manages the document <head> and metadata.
Auth
Simplifies user authentication flows.
Links
Type-safe communication between services.
Locking
Resource locking and synchronization.
Retry
Simple, declarative retry for failed operations.
Batch
Efficiently process operations in groups.
Command
A versatile task runner for scripts.
Create and send templated email.