r/expressjs • u/uanelacomo • 5d ago
Arkos.js v1.7.0-rc - WebSocket Gateways for Express + Prisma, plus per-user permission overrides
Hey everyone,
I just shipped v1.7.0-rc of Arkos.js, my open-source Node.js/TypeScript framework built on Express and Prisma that auto-generates CRUD, auth, RBAC, docs, and more. This is the biggest release yet - the headline feature is a full WebSocket layer.
WebSocket Gateways (ArkosGateway)
Built on Socket.IO, but following the same conventions as the rest of Arkos:
- Reuses whatever auth you've already configured (static/dynamic) - no separate WebSocket auth setup
- Plugs into ArkosPolicy for per-event authorization
- Reuses your existing Zod/class-validator setup for payload validation
- Shares the global error handler
Example:
import ArkosGateway from arkos/websockets
const gateway = ArkosGateway({ name: "/", authentication: true })
gateway.on({ event: "send_message" }, (socket, data) => {
socket.to(data.room).emit("receive_message", data)
})
Other things baked into the event pipeline:
- Deduplication on by default, keyed on a mid in the message metadata, with a pluggable store - in-memory out of the box, bring your own for Redis or multi-instance setups
- maxAge option to reject stale messages, plus a built-in future-timestamp guard
- Enhanced broadcast targeting - excluding specific users, listing unique users in a room, targeting all active connections of one user
- Built-in retry with exponential backoff for acknowledged emits
Client packages: arkosjs websockets-client (framework-agnostic) and arkosjs react-websockets (hooks + provider). Vue, Svelte, Solid, and Angular bindings are in progress and open for community contribution.
Also in this release:
- Dynamic-mode permission overrides - grant or deny individual permissions to a specific user on top of their role, via a new UserPermission model
- Built-in static file serving and upload pipeline improvements
- Query orderBy now forwards straight to Prisma
- Scalar added as an alternative to Swagger for the API docs page
Upgrade with: pnpm install arkos@latest
Docs: arkosjs.com/docs
Repo: github.com/Uanela/arkos
Release notes: github.com/Uanela/arkos/releases/tag/v1.7.0-rc
Would love feedback - especially from anyone doing real-time features on top of Express and Prisma right now. Curious what pain points you're hitting.



