API Documentation
Accelerate your application and integration development with a unified TypeScript SDK for modern cloud platforms.
Overview
@aerokit/sdk provides a modular, server-side TypeScript runtime API designed for developing lightweight applications, automation scripts, and extensions across cloud or on-premise environments.
Core Features
- TypeScript-first API – Rich type definitions and IDE autocompletion for productive, safe scripting.
- Unified platform model – Common abstractions for HTTP, I/O, Database, Filesystem, Security, Jobs, and Messaging.
- Built-in decorators – Simplify development with
@Controller,@Entity,@Scheduled,@Component,@Injected, and more. - Seamless dependency injection – Lightweight IoC mechanism for connecting modular business logic.
- Pluggable persistence – Work with SQL and NoSQL through the
sdk/sdk/dbAPI. - Enterprise-ready HTTP layer – Build APIs and web services with
sdk/sdk/http. - Background jobs and listeners – Schedule recurring tasks using
sdk/sdk/jobor event-driven listeners withsdk/component. - Extensible runtime – Deploy, extend, and run modules dynamically without redeployment.
Example
CountryEntity.ts
typescript
import { Entity, Table, Id, Generated, Column, Documentation } from "@aerokit/sdk/db";
@Entity("CountryEntity")
@Table("SAMPLE_COUNTRY")
@Documentation("Sample Country Entity")
export class CountryEntity {
@Id()
@Generated("sequence")
@Column({ name: "COUNTRY_ID", type: "long" })
@Documentation("My Id")
public Id?: number;
@Column({ name: "COUNTRY_NAME", type: "string" })
@Documentation("My Name")
public Name?: string;
@Column({ name: "COUNTRY_CODE2", type: "string" })
public Code2?: string;
@Column({ name: "COUNTRY_CODE3", type: "string" })
public Code3?: string;
@Column({ name: "COUNTRY_NUMERIC", type: "string" })
public Numeric?: string;
}CountryRepository.ts
typescript
import { Repository, EntityConstructor } from "@aerokit/sdk/db";
import { Component } from "@aerokit/sdk/component";
import { CountryEntity } from "./CountryEntity";
@Component('CountryRepository')
export class CountryRepository extends Repository<CountryEntity> {
constructor() {
super((CountryEntity as EntityConstructor));
}
}
CountryRepository;CountryController.ts
typescript
import { Controller, Get, Documentation } from "@aerokit/sdk/http"
import { HttpUtils } from "@aerokit/sdk/http/utils";
import { Options } from "@aerokit/sdk/db";
import { Injected, Inject } from "@aerokit/sdk/component";
import { CountryEntity } from "./CountryEntity";
import { CountryRepository } from "./CountryRepository";
@Controller
@Documentation("Sample Country Controller")
@Injected()
class CountryController {
@Inject('CountryRepository')
private readonly repository!: CountryRepository;
@Get("/")
@Documentation("Sample Get All Countries")
public getAll(): CountryEntity[] {
try {
const options: Options = {limit: 20, offset: 0};
return this.repository.findAll(options);
} catch (error: any) {
HttpUtils.sendInternalServerError(error.message);
}
return [];
}
}Use Cases
- API-first business logic for internal or customer apps.
- Lightweight integrations between enterprise systems.
- Automation scripts (scheduled or event-driven).
- Custom platform extensions in modular runtimes.
Philosophy
@aerokit follows a code-as-configuration philosophy — instead of XML or JSON descriptors, you define services, entities, and jobs directly in TypeScript using decorators. This makes your code self-documenting, testable, and portable across environments.
Getting Started
npm install @aerokit/sdk
Then import only what you need:
javascript
import { Request, Response } from "@aerokit/sdk/http";
import { Entity, Column } from "@aerokit/sdk/db";