Skip to content

feunard/alepha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1,911 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Alepha logo Alepha

TypeScript Framework Made Easy

npm version license coverage downloads

What is Alepha?

Full-stack TypeScript framework for agentic era. Define your schema once β€” get database, API, types, and forms.

  • One schema, everywhere β€” Database, API validation, TypeScript types, React forms β€” all from one definition
  • Full autocomplete β€” Client calls server with complete type safety, zero codegen
  • Multi-runtime β€” Same code runs on Node, Bun, and Cloudflare Workers
  • Deploy anywhere β€” Cloudflare, Vercel, Docker, bare metal

Built on predictable conventions and typed primitives β€” works great with AI coding assistants (BYOA).

Each layer builds on the previous.

Layer Description Primitives
Core DI, lifecycle, config $inject, $env, $module, $hook, $logger
Backend Database, queues, storage, API $entity, $action, $queue, $bucket, $scheduler
Frontend React with SSR, routing, i18n $page, $head, $atom, $dictionary
Modules Users, auth, jobs, audits $realm, $job, $audit, $notification
Admin Admin panel & auth UI $uiAdmin, $uiAuth

Example

// src/Api.ts
import { t } from "alepha";
import { $action } from "alepha/server";
import { $entity, $repository, db } from "alepha/orm";

const viewEntity = $entity({
  name: "views",
  schema: t.object({
    id: db.primaryKey(),
    createdAt: db.createdAt(),
  }),
});

export class Api {
  views = $repository(viewEntity);

  inc = $action({
    schema: { // ← validates + generates OpenAPI
      response: t.object({
        count: t.number()
      })
    },
    handler: async () => {
      await this.views.create({});
      return { count: await this.views.count() };
    },
  });
}
// src/AppRouter.tsx
import { $client } from "alepha/server/links";
import { $page } from "alepha/react/router";
import type { Api } from "./Api.ts";

export class AppRouter {
  api = $client<Api>();  // ← fully typed, zero codegen

  home = $page({
    loader: () => this.api.inc(),
    component: (props) => <div>Counter: {props.count}</div>,
  });
}

Getting Started

Requirements: Node.js 22+ or Bun 1.3+

# L1: Backend only
npx alepha init my-api --api

# L2: React frontend (with or without backend)
npx alepha init my-app --react

# L3: Api, Frontend, Admin UI
npx alepha init my-saas --saas

Learn More

About

πŸƒ Easy-to-use modern TypeScript framework for building many kind of applications.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors

Languages