← All work
Product · 2018–19

AdonisJS Backend & Real-Time API for a Small-Business ERP

A small-business ERP

Overview

The server side of a small-business ERP: an AdonisJS REST + WebSocket API backed by PostgreSQL via the Lucid ORM. It handles authentication, business data modeling, real-time updates and push notifications to companion clients.

Why It Exists

A small business needed an ERP it could run and operate itself, including on low-cost hardware. The API is the system of record and real-time hub that the desktop client connects to, covering auth, core business entities, and live notifications.

What We Built

An AdonisJS application structured into Controllers, Models, Listeners, Notifications and Service layers. It uses @adonisjs/auth for authentication, @adonisjs/lucid over PostgreSQL (pg) with database migrations and seeds, @adonisjs/cors, and @adonisjs/websocket for real-time channels. Domain modeling leans on adonis-lucid-polymorphic for polymorphic relations and adonis-notifications for a notification system, with expo-server-sdk delivering push notifications to mobile clients. The repo ships with a Dockerfile and docker-compose.yml, plus a .env.rpi profile and deploy.sh indicating a Raspberry Pi / self-hosted deployment target.

Technologies & Approach

AdonisJS (an MVC, Laravel-inspired Node framework) gave a batteries-included structure, ORM, auth, validation, websockets, well suited to a single-team ERP. Lucid + PostgreSQL handled relational business data; the WebSocket layer and Expo push kept the desktop and mobile clients live; Docker made self-hosting (including on a Pi) straightforward.

Outcome / Impact

Provided the real-time, self-hostable backbone for a small-business ERP, pairing with the Electron desktop client to deliver a complete operational system deployable on commodity hardware.

Capabilities Demonstrated

  • Real-time API design with AdonisJS WebSockets
  • Relational modeling with Lucid ORM, migrations and polymorphic relations
  • Authentication, CORS and notification subsystems
  • Cross-platform push delivery (Expo) and Dockerized self-hosting
More work See all →