How danburen/nitrowater works
NitroWater is a Minecraft-server-owner platform: users enter through the portal, authenticate via the self-hosted identity centre, then use account-gated services such as the plugin centre, cloud code runner, and NitroBot. A separate toolbox runs locally in the browser. The graph preserves these documented capabilities and the BFF’s server-side token boundary. README relationships are documented; sampled source adds detail for AI turns, storage, and account/session behavior. Other subsystem internals are represented at directory level because their source was not sampled.
Main entry points: src Portal SPA · AgentTurnService.java Agent turn orchestration · bff BFF session and proxy · service File and JAR storage
Components 20
Identity and access
- OIDC identity centre
nitrowater-account/src/main/java/cn/nitrowater/account - Login and registration UI
nitrowater-account/auth-ui/src - Account admin UI
nitrowater-account/admin-ui/src
Portal and BFF
- Portal SPA
nitrowater-web/src - Auth state
nitrowater-web/src/auth/useAuth.ts - BFF session and proxy
nitrowater-bff/src/main/java/cn/nitrowater/bff
Platform services
- Platform API
nitrowater-server/src/main/java/cn/nitrowater/server - Plugin centre
nitrowater-server/src/main/java/cn/nitrowater/server/service/plugin - Cloud code runner
nitrowater-server/src/main/java/cn/nitrowater/server/service/sandbox - File and JAR storage
nitrowater-resource/src/main/java/cn/nitrowater/resource/service - Local storage backend
nitrowater-resource/src/main/java/cn/nitrowater/resource/service/LocalFileStorageService.java - Tencent COS backend
nitrowater-resource/src/main/java/cn/nitrowater/resource/service/CosFileStorageService.java
NitroBot
- Agent turn orchestration
nitrowater-server/src/main/java/cn/nitrowater/server/service/ai/agent/AgentTurnService.java - Conversation history
nitrowater-server/src/main/java/cn/nitrowater/server/service/ai/conversation/ConversationService.java - AI quotas and usage
nitrowater-server/src/main/java/cn/nitrowater/server/service/ai/ops/AiUsageService.java
Browser tools
- Local toolbox
nitrowater-tools/src - In-browser runtimes
nitrowater-tools/src/features/tools/code-runner/lib/runtimes/runtimeManager.ts
Other components
- Portal user
- Administrator
- External OIDC / model services
Connections 21
- Portal user → Portal SPA: uses
README.md - Portal SPA → Auth state: reads session
nitrowater-web/src/auth/useAuth.ts - Auth state → BFF session and proxy: checks session
nitrowater-web/src/auth/useAuth.ts - Portal SPA → BFF session and proxy: proxies API calls
README.md - BFF session and proxy → OIDC identity centre: OIDC login
README.md - OIDC identity centre → Login and registration UI: serves login UI
README.md - Administrator → Account admin UI: manages accounts
README.md - Account admin UI → OIDC identity centre: administers users
README.md - BFF session and proxy → Platform API: proxies bearer API
README.md - Portal SPA → Plugin centre: browses catalogue
README.md - Portal SPA → Cloud code runner: submits code
README.md - Administrator → File and JAR storage: uploads assets
README.md - Plugin centre → File and JAR storage: stores plugin files
README.md - File and JAR storage → Local storage backend: stores bytes
nitrowater-resource/src/main/java/cn/nitrowater/resource/service/FileStorageService.java - File and JAR storage → Tencent COS backend: optional backend
nitrowater-resource/src/main/java/cn/nitrowater/resource/service/FileStorageService.java - Portal SPA → Agent turn orchestration: sends chat
README.md - Agent turn orchestration → Conversation history: persists turns
nitrowater-server/src/main/java/cn/nitrowater/server/service/ai/agent/AgentTurnService.java - Agent turn orchestration → AI quotas and usage: reserves quota
- Agent turn orchestration → External OIDC / model services: uses AI tools
README.md - Portal user → Local toolbox: opens toolbox
README.md - Local toolbox → In-browser runtimes: runs code locally
README.md