Nile Js

0 views

Problem

Building a production-ready TypeScript backend often means stitching together validation, routing, database access, and error handling from scratch every time.

Core Idea

A TypeScript-first backend framework built on Hono, Zod, Bun, and Drizzle. Organized around services and actions with AI-readiness as a first-class concern.

Guarantees

Type safety from route definition to database query. Validation at every boundary. Consistent error handling through the result pattern.

Tradeoffs

Tightly coupled to Bun as the runtime. Opinionated project structure may not fit all team preferences. Still in early development with a small user base.

typescriptbackendopen-source

Overview#

Nile Js is a backend framework I am building at Nile Squad Labs. It is designed around two core primitives: services and actions.

A service groups related functionality. An action is a single unit of work within a service, validated inputs in, typed result out.

Architecture#

The framework sits on top of Hono for HTTP handling, Zod for validation, and Drizzle for database access. Bun is the expected runtime, chosen for its speed and native TypeScript support.

Key architectural decisions:

  • Services over controllers to encourage domain-driven organization
  • Actions over route handlers to make each endpoint independently testable
  • Result pattern throughout, every action returns success or failure, never throws

Why This Framework#

I kept rebuilding the same backend scaffolding across projects, so I extracted the common patterns into a reusable framework. It is opinionated where it helps and flexible where it matters.