2 Commits

Author SHA1 Message Date
182026a32c Wire up real implementations for Tracking & Config controllers
- TrackingController: Added database persistence for analytics events
  * Created AnalyticsEvent entity with user/session tracking
  * Store event type, data (JSON), and timestamp
  * Graceful fallback if DB write fails (game doesn't break)

- ConfigController: Added real player counting
  * Query active sessions from last 15 minutes
  * Return actual player count instead of hardcoded 0
  * Real-time server status with DB metrics

- Added AnalyticsEvents table migration
  * Stores all game telemetry for analytics
  * Indexed by UserId for performance
  * JSON event data for flexibility

Controllers now fully wired to database:
- 11/18 controllers REAL implementation 
- 5/18 controllers STUB (config-based) ⚠️
- 2/18 controllers SERVICE (delegated) ⚠️

Total: 95 endpoints, improving from demo to production

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 17:03:36 -08:00
e839064b35 Add Phase 1 critical endpoints: Config & Save/Load system
- Added ConfigController with 4 endpoints:
  - getGameConfig: Server config, feature flags, URLs
  - getServerTime: UTC timestamps
  - getFeatureFlags: Feature toggles
  - getServerStatus: Health check

- Added save/load system to ProgressionController:
  - POST /save/{synergyId}: Save JSON blob
  - GET /save/{synergyId}/load: Load JSON blob
  - Version tracking and timestamps

- Added PlayerSave entity to database:
  - Stores arbitrary JSON game state
  - Version tracking (increments on save)
  - LastModified timestamps

- Updated appsettings.json:
  - ServerSettings section (version, URLs, MOTD)
  - FeatureFlags section (7 feature toggles)

- Created migration: AddPlayerSavesAndConfig
- Updated ApiModels with new DTOs
- All endpoints tested and working

Phase 1 objectives complete:
 Synergy ID generation (already existed)
 Configuration endpoints (new)
 Save/load system (new)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-21 23:53:43 -08:00