How darkenergyprocessor/npps4 works
NPPS4 is a Python/FastAPI private server for SIF1. Its principal workflow is a game client request entering the server, reaching game endpoint handlers, using game-system logic and persistent account/game state, then returning a response. The repository also provides configurable client-data download backends and a separate HTML web UI. The graph preserves major domain areas visible in the tree and README; many endpoint registrations and subsystem interactions were not sampled, so those links are omitted rather than inferred.
Main entry points: game/unit.py Game endpoints · app.py ASGI entry · system/unit.py Unit management · main.py Persistent models
Components 16
Server runtime
- ASGI entry
npps4/run/app.py - HTTP application
npps4/app/app.py - Game endpoints
npps4/game/unit.py - Web views
npps4/webview/__init__.py
Game services
- Unit management
npps4/system/unit.py - Achievements
npps4/system/achievement.py - Rewards and items
npps4/system/reward.py - Game calculations
npps4/system/advanced.py
State and data
- User context
npps4/idol/session.py - Database sessions
npps4/idol/database.py - Persistent models
npps4/db/main.py - Client game data
npps4/db/unit.py
Configuration and admin
- Download backends
npps4/download/download.py - Server configuration
npps4/config/config.py - Admin web UI
npps4/webui/endpoints/unlock_backgrounds.py
Other components
- Game client
Connections 20
- Game client → ASGI entry: sends requests
README.md - ASGI entry → HTTP application: starts app
npps4/run/app.py - ASGI entry → Game endpoints: loads routes
npps4/run/app.py - ASGI entry → Web views: loads views
npps4/run/app.py - HTTP application → Server configuration: reads settings
npps4/app/app.py - Game endpoints → User context: uses context
npps4/game/unit.py - Game endpoints → Unit management: uses unit logic
npps4/game/unit.py - Game endpoints → Achievements: uses achievement logic
npps4/game/unit.py - Game endpoints → Rewards and items: uses reward logic
npps4/game/unit.py - Game endpoints → Game calculations: uses game logic
npps4/game/unit.py - User context → Database sessions: creates sessions
npps4/idol/session.py - Database sessions → Persistent models: opens main session
npps4/idol/database.py - Database sessions → Client game data: opens unit session
npps4/idol/database.py - Unit management → Persistent models: reads player state
npps4/system/unit.py - Unit management → Client game data: reads unit data
npps4/system/unit.py - Achievements → Persistent models: reads and updates
npps4/system/achievement.py - Rewards and items → Persistent models: stores incentives
npps4/system/reward.py - Game calculations → Unit management: calculates team stats
npps4/system/advanced.py - Client game data → Download backends: uses game data
npps4/db/unit.py - Server configuration → Download backends: selects backend
README.md