Type Safe APIs
ย
mion is a lightweight framework designed to build APIs that are type-safe, with automatic validation and serialization out of the box.
Bash
$npm i -D @deepkit/type-compiler$npm i @mionkit/router$npm i @mionkit/http @mionkit/aws
Click to copy
Features
RPC like
RPC like architecture for simpler and easier to consume APIs. Just use remote methods as any other local async method.
Fully Typed Client
Fully typed client with static type checking, autocompletion, automatic validation and serialization.
Fast
Quick cold starts and a simple in-memory map for route lookup makes mion extremely fast.
Automatic Validation
mion uses @deepkit/type
library that makes types available at runtime.
This allows validation without any extra boilerplate required.
Automatic Serialization
Out of the box serialization of native objects like Date, Map or Class, etc. Any JS object can be directly serialized to JSON.
End To End Type Safety
You can easily refactor your API and changes will be safely picked by the client or validate data directly on the client.
Write Once Run Everywhere
Run mion type safe APIs in Node.js, Bun or Serverless platforms like Aws Lambda and Google cloud functions.
ย