High-quality TypeScript libraries and next-gen backend framework.
Leverage TypeScript types to the fullest, in completely new ways.
RUNTIME TYPES
A runtime type system for JavaScript, powered by TypeScript types. Deepkit's type compiler makes it possible to use the whole TypeScript type system in any JavaScript runtime for the first time enabling completely new ways of writing data driven applications.
type status = 'pending' | 'running' | 'finished'; // ['pending', 'running', 'finished'] valuesOf<status>(); interface User { id: integer & PrimaryKey; created: Date; username: string & MinLength<3> & Unique; email: Email; firstName?: string; lastName?: string; } // Full access to all computed type information const reflection = ReflectionClass.from<User>(); // Type information of arbitrary type expressions // {kind: ReflectionKind.class, types: [...] typeOf<Pick<User, 'id' | 'username'>>();
ORM MySQL, PostgreSQL, SQLite, MongoDB | Runtime Types | Validation | Reflection | |
Serialization | Workflow Engine | |||
HTTP Router | FRAMEWORKA framework that brings aligned libraries together to make web application development faster, more productive, and easier than ever. | Event System | ||
Configuration | Broker | Modules | ||
Profiler | Debugger | BSON | ||
Template Engine | Dependency Injection | RPC | CLI |
THE BEAUTY OF TYPES
Powerful dependency injection container with type expressions to make HTTP routes, CLI commands, and RPC controllers safe, fast, and easy to write.
No json configuration files, unnecessary boilerplate, schema files, or code generation: TypeScript utilized to its fullest capabilities.
Don't like classes? Functional routes are supported as well.
class UserAPI { constructor(private database: Database) { } @http.GET('/user/:id') async user(id: integer & Positive): Promise<User> { return await this.database.query(User) .filter({id}) .findOne(); } @http.GET('/user') async users( limit: HttpQuery<integer> & Maximum<100> = 10 ): Promise<User[]> { return await this.database.query(User) .limit(limit) .find(); } } new App({ controllers: [UserAPI], imports: [new FrameworkModule()] }) .run();
CLI
Write CLI commands with TypeScript types and dependency injection. Fully integrated into the framework with automatic serialization and validation of arguments.
new App({ providers: [Database] }) .command('user:find', async ( name: string & MinLength<3>, database: Database ) => { const users = await database.query(User) .filter({name: {$like: name + '%'}) .find(); }) .run();
RPC
High-Performance RPC via WebSockets or TCP with type-safe controllers.
A binary protocol with automatic serialization, deserialization, and validation of arguments and return values. Again, entirely based on runtime TypeScript types.
//@app/server/main.controller @rpc.controller('/main') class MainController { @rpc.action() hello(name: string): string { return 'Hello ' + name; } } //@app/frontend/main.ts import type {MainController} from '@app/server/main.controller' const client = new RpcClient(); const controller = client.controller<MainController>('/main'); const answer = await controller.hello('Peter');
Dependency Injection
The most powerful dependency injection container for TypeScript, entirely based on runtime types. No decorators, no custom tokens, or any other boilerplate.
Dependency Injection is possible not only for classes, but all functions as well. Functional HTTP routes, CLI commands, and RPC controllers, all can be injected with dependencies.
interface DatabaseInterface { query<T>(model: Class<T>): Query<T>; } class Database implements DatabaseInterface { query<T>(model: Class<T>): Query<T> { // ... } } class UserAPI { // database is automatically injected by type constructor(private database: DatabaseInterface) { } @http.GET('/user/:id') async user(id: integer & Positive): Promise<User> { return await this.database.query(User) .filter({id}) .findOne(); } }
API CONSOLE
Debug HTTP and RPC APIs directly in the browser without any external tools. Automatic API documentation from TypeScript types, for public or private audiences.
ISOMORPHIC TYPESCRIPT
Dual stack is a relic from the past. Isomorphic TypeScript empowers you to write frontend, backend, cli tools, micro-service, apps, and much more with the very same language. Its single stack nature has huge potential to share code, knowledge, and interfaces across the whole application landscape.
Deepkit provides solutions, libraries, and tools that are highly optimized and interoperate perfectly together to make isomorphic Typescript project a success — for browser and Node.
HIGH PERFORMANCE
High performance in every fiber. From execution time to development time.
We are committed to building a framework that utilizes the power of isomorphic TypeScript and an ecosystem of libraries that are perfectly optimized to work with each other to empower you to build applications faster than ever before.