sethucms
Build on it

SDKs

Every client stack uses the same API. SDKs are generated from openapi.yaml so they never drift, with a small hand-written layer for ergonomics.

Drawing diagram…

Language matrix

LanguagePackageApproach
TypeScript / JavaScript@sethucms/sdkHand-tuned, first class
Dart / Fluttersethucms (pub.dev)Generated models + hand-written client
Pythonsethucms (PyPI)Generated models + hand-written client
Kotlin / JavageneratedAndroid and JVM
SwiftgeneratediOS
Go, C#, PHP, Ruby, RustgeneratedOn demand

Check package names on npm, pub.dev and PyPI before committing to them.

Hand-written layer

Each first-party SDK adds the same small set of behaviours:

FilePurpose
clientBase URL, token, request pipeline
authToken refresh
query_builderBuild filters and sorts in the language's idiom
paginationAsync iterator over cursors
realtimeOptional subscription helper
errorsTyped error classes from the API error codes

Dart example (shape only)

final client = SethuClient(baseUrl: url, token: token);
final page = await client
    .collection('c1', 'orders')
    .where('status', eq: 'paid')
    .orderBy('created_at', desc: true)
    .limit(50)
    .list();

Python example (shape only)

client = SethuClient(base_url=url, token=token)
for order in client.collection("c1", "orders").where("status", "eq", "paid").iterate():
    print(order["id"])

Rules

  1. SDKs never hold database credentials. They only hold API tokens.
  2. Browser and mobile SDKs use short-lived user tokens, never service tokens.
  3. CI regenerates SDKs on every API release and fails if generated code is out of date.
  4. Semantic versioning follows the API version.