image.png

Project overview

Built with Node.js and TypeScript.

This project consists of on 2 main sections:

  1. An installable SDK (software developer kit) that developers can use to interact with a backend through simple method calls.
  2. An Express server that handles user signup, login, and token verification. You use the SDK key to interact with this server.

This is how services Clerk.com, Firabase.com, etc work. They are Backend as service (BAAS)

The goal was to make it easy for other applications to use the backend without worrying about how the API works internally. Everything is wrapped in a small SDK, and the whole setup is strongly typed using TypeScript.

Purpose

The application demonstrates how a self‑contained SDK can abstract routine user‑management flows while preserving end‑to‑end type safety (Typescript).

It serves as a template for turning any internal service into a consumable library that external projects can integrate with minimal setup.

What problem does it solve?

Imagine a developer wants to start a backend and they want to handle user management for their clients (sign-up, log-in and authentication).

Database user registration on client request

If they don't want to worry about having to run a database (or if they don't know how to handle things such as authentication with JSON-WEB tokens), they can just simply connect to this SDK server and run this code:

//  USER CREATION using SDK
const user = await userService.register({"[email protected]", "ExampleUsername", "ExamplePassword"})

The action will be directly forwarded to the SDK server and will be saved in a Postgres database without the user having to run one.

User authentication

Later The developer wants to make sure that their clients are authenticated before they perform an action that requires authentication

// USER AUTHENTICATION
const verifiedToken = await userService.verifyToken(result.token)