How cradlock/ng-live works
nglive combines a Svelte web interface with a Vert.x backend. The backend starts HTTP and WebSocket gateways; the HTTP gateway mounts authentication routes, while the WebSocket gateway mounts a device-chat route. The web tree also contains messenger, profile, and control pages, but the sampled files do not show how they communicate with the backend. Account, messenger-service, and several auth-provider modules are present, though their implementation or wiring is not established by the excerpts. Database initialization exists but is commented out at startup.
Main entry points: MainVerticle.java Application startup · HttpGatewayVerticle.java HTTP gateway · WsGatewayVerticle.java WebSocket gateway · AuthRouter.java Auth routes
Components 18
Web interface
- Web shell
apps/web/src/routes/+layout.svelte - Landing page
apps/web/src/routes/+page.svelte - Messenger pages
apps/web/src/routes/messenger/+page.svelte - Chat page
apps/web/src/routes/messenger/[chatUUID]/+page.svelte - Profile page
apps/web/src/routes/profile/+page.svelte - Control layout
apps/web/src/routes/control/+layout.svelte
Backend gateways
- Application startup
server/src/main/java/com/nglive/MainVerticle.java - HTTP gateway
server/src/main/java/com/nglive/gateways/HttpGatewayVerticle.java - WebSocket gateway
server/src/main/java/com/nglive/gateways/WsGatewayVerticle.java
Identity and accounts
- Auth routes
server/src/main/java/com/nglive/auth/AuthRouter.java - Cookie validation
server/src/main/java/com/nglive/auth/AuthHandler.java - Auth service
server/src/main/java/com/nglive/auth/AuthService.java - Signup providers
server/src/main/java/com/nglive/auth/providers - Account module
server/src/main/java/com/nglive/account
Chat and persistence
- Device chat route
server/src/main/java/com/nglive/devconnect/DeviceChatRouter.java - Messenger module
server/src/main/java/com/nglive/messenger - Database clients
server/src/main/java/com/nglive/shared/DatabaseHolder.java
Other components
- Browser user
Connections 6
- Web shell → Application startup: renders children
apps/web/src/routes/+layout.svelte - Application startup → HTTP gateway: deploys
server/src/main/java/com/nglive/MainVerticle.java - Application startup → WebSocket gateway: deploys
server/src/main/java/com/nglive/MainVerticle.java - HTTP gateway → Auth routes: mounts routes
server/src/main/java/com/nglive/gateways/HttpGatewayVerticle.java - Auth routes → Cookie validation: invokes
server/src/main/java/com/nglive/auth/AuthRouter.java - WebSocket gateway → Device chat route: mounts routes
server/src/main/java/com/nglive/gateways/WsGatewayVerticle.java