Numen

A platform for the Numen token, built end to end: from the database architecture and financial ledgers to DevSecOps and monitoring.

Type
Crypto platform for a token
Status
Live
Our role
Architecture, backend, frontend, DevOps
Stack
Next.js, NestJS, PostgreSQL, Drizzle, Redis, BullMQ
Numen: Platform website

The goal

The Numen token needed a complete platform: user accounts, balances and financial operations, blockchain interaction, an admin panel and the infrastructure behind it. Deadlines were tight, and there was zero tolerance for accounting errors.

Tech stack

Frontend
Next.js (React, TypeScript)
Backend
NestJS (Fastify), TypeScript
Database / ORM
PostgreSQL, Drizzle ORM
State / Queues / Cache
Redis, BullMQ
Security / Contracts / Math
Zod, Decimal.js, argon2
Storage
MinIO (S3)
Testing
Jest (unit, integration)
Logging / Monitoring
Pino, Prometheus, Grafana, Loki, Promtail, Sentry, cAdvisor, Node-Exporter, AlertManager

Architecture: CQRS and event-driven

Every module follows Clean Architecture with separate Domain, Use Cases, Infrastructure and Presentation layers. The backend is split into three NestJS applications.

APIHandles incoming REST/WS requests, validates DTOs, authenticates users and executes commands and queries.
PublisherThe domain event bus. Reliably publishes events whenever the system state changes.
WorkerProcesses jobs and events from BullMQ queues asynchronously: blockchain interaction, notifications, background statistics recalculation.

Financial accounting

To rule out race conditions and guarantee financial integrity, every transaction goes through a double-entry bookkeeping system.

Every financial operation creates two balanced entries, a debit and a credit. The sum of all assets and liabilities nets to zero at any moment.

Calculations run on Decimal.js, which fully eliminates floating-point rounding errors.

All operations run inside atomic PostgreSQL transactions: no balance drift, no phantom charges, and a full audit trail for any wallet.

Frontend

The frontend is built with Next.js. We are a full-stack team leaning towards the backend, and with strict deadlines we actively used Claude Opus to speed things up. This wasn’t vibe coding: we kept full control over every action of the agent, and contracts constrained what it could do.

DevOps and security

Key infrastructure requirements: high speed, security, DDoS protection and full control over the servers.

Network isolation: servers run in a private mesh network, their public addresses are completely hidden from the internet.

Orchestration and proxying: containers are managed centrally through Dokploy, with Traefik as the web server issuing Let’s Encrypt certificates.

Origin protection: Cloudflare in Full Proxy mode. UFW only allows inbound connections from Cloudflare ranges and the private network, direct access to the origin servers is blocked.

Result

The platform is live in production. Every financial operation goes through the double-entry ledger, the servers sit behind Cloudflare, and monitoring and alerts show the state of the system in real time.

Screens

Other projects

All projects

Let’s discuss your project

Tell us about the task and we’ll come back with a time and cost estimate. We reply within one business day.