steedos-server-internals

Explains Steedos Server internals covering NestJS modules, Moleculer broker, and Socket.IO gateways.

1.6k|414|Updated Mar 4, 2019
One-click install
npx skills add https://github.com/steedos/steedos-platform --skill steedos-server-internals
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: steedos-server-internals
Source: https://github.com/steedos/steedos-platform/tree/main/skills/steedos-server-internals
Command: npx skills add https://github.com/steedos/steedos-platform --skill steedos-server-internals

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers working on the Steedos Platform backend often struggle to understand how its hybrid NestJS + Moleculer architecture fits together, making debugging, extending modules, and wiring real-time events error-prone.

Core Features & Use Cases

  • Architecture Reference: Documents the NestJS 11 module layout, bootstrap sequence, middleware stack, and authentication guards used by builder6/server.
  • Moleculer Integration Guide: Explains broker configuration, inter-service calls via broker.call/broker.emit, and AppMoleculer event handlers such as $packages.changed and $metadata.*.
  • WebSocket Room System: Details Socket.IO gateway authentication, tenant-scoped rooms, and the Moleculer-to-WebSocket event mapping.
  • Use Case: When adding a new microservice that must notify connected clients of record changes, use this Skill to correctly emit @objectRecordEvent events and map them to the right Socket.IO rooms.

Quick Start

Explain how the Steedos server bootstrap sequence and Moleculer event flow work so I can add a new service that broadcasts record changes over WebSocket.

Frequently Asked Questions about steedos-server-internals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does Steedos Server combine NestJS and Moleculer?

Steedos Server uses NestJS 11 for HTTP/REST handling and Moleculer 0.14 for microservice orchestration. The MoleculerModule from @builder6/moleculer registers the broker in the root AppModule, and services inject it via @InjectBroker().

How do I call another Moleculer service from NestJS?

Inject the ServiceBroker with @InjectBroker() and use broker.call for synchronous requests like objectql.directFind, broker.emit for events, or broker.broadcast for cluster-wide notifications such as @steedos/server.started.

How does Socket.IO authentication work in Steedos?

The AppGateway parses the cookie header from the socket handshake to extract X-Space-Id and X-Auth-Token, then validates the token through AuthService.getUserByToken before allowing room subscriptions.

What Moleculer events map to WebSocket messages?

$metadata.* events become s:metadata:change broadcasts, $broadcast.$notification.users becomes per-user s:notification-change, and @objectRecordEvent.*.* maps to s:record:{obj}:change-{id} room events.

What is the difference between Steedos community and enterprise editions?

The community edition runs @steedos/service-community by default. Setting the STEEDOS_LICENSE environment variable activates the enterprise edition, which additionally loads @steedos/service-license and @steedos/service-enterprise.