Hello DEV Community!
If you have ever written PHP using Laravel, you already know how incredible the Developer Experience (DX) is. Everything you need—Routing, ORM, Dependency Injection, Queues, and Authentication—is beautifully integrated out of the box. You just type a command and start building your business logic.
But when modern projects require high throughput, real-time concurrency, and asynchronous processing, we often migrate to Node.js.
And that is when the "Blank Canvas Fatigue" hits.
If you use Express, Koa, or even Fastify, you are handed a blank slate. You spend your first week arguing about folder structures, trying to wire up an ORM, setting up WebSockets, and piecing together a dozen different libraries, praying they play nicely together in production.
I wanted the blazing-fast asynchronous performance of Node.js (specifically Fastify), but I craved the elegant, structured, and highly productive architecture of Laravel.
Since I couldn't find exactly what I was looking for, I spent the last few months building it.
Introducing StruxJS
StruxJS is a modern, TypeScript-first Node.js enterprise framework designed for developer happiness.
Under the hood, it is powered entirely by Fastify, meaning it handles massive traffic effortlessly. But on the surface, the API is designed to feel like writing poetry.
Here are a few things StruxJS gives you out of the box:
1. True Dependency Injection (IoC Container)
No more manually instantiating classes or passing massive context objects around.
import { MailService } from "./MailService";
export class UserController {
constructor(private mailService: MailService) {}
public async register(request: Request) {
// Business logic...
await this.mailService.sendWelcomeEmail(request.body.email);
}
}
2. An Elegant Active Record ORM
Inspired directly by Eloquent, interacting with your database is beautiful.
import { BaseModel, HasMany, belongsTo } from "struxjs";
export class User extends BaseModel {
@HasMany(Post)
public posts() {
return this.hasMany(Post);
}
}
// In your controller:
const users = await User.with('posts').where('status', 'active').get();
3. Redis-Backed Background Queues
Sending emails or resizing images shouldn't block your HTTP response.
// Dispatch a job to the background queue instantly
SendWelcomeEmailJob.dispatch(user);
4. Zero-Config Concurrency
StruxJS comes with a built-in ThreadPool and ClusterManager. Have a heavy CPU-bound task like PDF generation? Offload it to a worker thread with one line of code so your Node event loop never gets blocked.
5. Start in 3 seconds
You don't need to configure anything to get started.
npx create-struxjs-app my-awesome-app
cd my-awesome-app
npm run dev
Why StruxJS instead of NestJS or AdonisJS?
The Node.js ecosystem is rich, and both of those frameworks are incredible.
However, NestJS is heavily influenced by Angular. While it's immensely powerful, it can sometimes feel overly verbose and heavily boilerplate-driven for rapid product development.
AdonisJS is fantastic and is the closest thing to Laravel in Node, but it relies on its own custom HTTP server.
StruxJS takes a different path. It sits directly on top of Fastify—leveraging one of the fastest web engines in the world—while providing an incredibly clean, accessible, and structured API to help you ship products faster.
I would love your feedback!
The project is entirely Open Source. Whether you are a Laravel developer dipping your toes into Node.js, or a seasoned Node veteran looking for a structured architecture, I would love for you to try it out.
- Official Documentation: struxjs.vercel.app
- GitHub Repository: Strux-Team/struxjs (If you like the idea, a star would mean the world to me!)
I am actively looking for contributors, feedback, and yes, even roasts of my codebase. Let me know what you think in the comments!
Top comments (0)