Commit Graph

7 Commits

Author SHA1 Message Date
4736637c3c Add Events Service - Career mode unlocked! (96% complete)
EVENTS SERVICE (4/4 endpoints - 100%):
- GET  /synergy/events/active - List active events with player progress
- GET  /synergy/events/{eventId} - Event details and requirements
- POST /synergy/events/{eventId}/start - Start event attempt
- POST /synergy/events/{eventId}/complete - Submit results, award rewards

Features:
- Track player progression through career events
- Personal best detection with improvement bonuses
- Reduced rewards on replays (prevents farming)
- Full integration with user/session system

Database:
- Events table (16 columns) with series/event organization
- EventCompletions table for player progress tracking
- EventAttempts table for session management
- Migration AddEventsSystem applied successfully

Documentation:
- AUTHENTICATION-ANALYSIS.md - Proof .NET implementation is correct
- BINARY-PATCH-ANALYSIS.md - ARM64 patch analysis

Server progress: 70/73 endpoints (96%)
Career mode now fully functional!

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-23 12:10:31 -08:00
a6167c8249 Complete Records/Leaderboards + Time Trials systems (100%)
RECORDS & LEADERBOARDS (5/5 endpoints - 100%):
- Created LeaderboardsController with 5 endpoints
- GET /synergy/leaderboards/timetrials/{trialId}
- GET /synergy/leaderboards/career/{series}/{event}
- GET /synergy/leaderboards/global/top100
- GET /synergy/leaderboards/player/{synergyId}/records
- GET /synergy/leaderboards/compare/{synergyId1}/{synergyId2}

Added LeaderboardEntry and PersonalRecord models and database tables.
Migration applied: AddLeaderboardsAndRecords

Updated RewardsController.SubmitTimeTrial to track personal bests,
update leaderboards, and award 50 gold bonus for improvements.

Updated ProgressionController.CompleteCareerEvent similarly for
career event personal records.

TIME TRIALS (6/6 endpoints - 100%):
- GET /synergy/rewards/timetrials - List with time remaining
- GET /synergy/rewards/timetrials/{id} - Details with stats
- POST /synergy/rewards/timetrials/{id}/submit - Submit with PB tracking
- GET /synergy/rewards/timetrials/player/{synergyId}/results - History
- POST /synergy/rewards/timetrials/{id}/claim - Claim bonuses
- GET /synergy/leaderboards/timetrials/{id} - Leaderboards (above)

Added navigation properties to TimeTrialResult for easier queries.

Server progress: 66/73 endpoints (90%)
Two complete systems: Records/Leaderboards + Time Trials

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-22 17:49:23 -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
dd2c23000f Add game version management system with manifest support
Features:
- Version dropdown in single/ZIP upload (9.3.0, 9.2.0, etc.)
- Patch-compatible matching (9.3.x assets work with 9.3.0)
- manifest.json/xml support for automatic metadata detection
- Smart category auto-detection from folder structure
- Version field stored in GameAssets table

Manifest support:
- JSON format with gameVersion, category, assets array
- Per-file metadata overrides (type, required, description)
- Auto-detect falls back if no manifest present
- See ASSET-MANIFEST-SPECIFICATION.md for full spec

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-20 09:55:05 -08:00
f1d0d43cb7 Add asset management migration
- UpdateGameAssetFields migration for new columns
- Added Description, IsRequired, UploadedAt to GameAssets
- Fixed nullable LocalPath and FileSha256

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-19 15:39:28 -08:00
8ba7c605f1 Add device settings management and web panel sync API
Features:
- New DeviceSettings admin page at /devicesettings
- Manage device server configurations (URL, mode, deviceId)
- 3 new API endpoints for APK sync functionality
- UserSettings database model with SQLite storage

Implementation:
- ServerSettingsController.cs with getUserSettings, updateUserSettings, getAllUserSettings
- DeviceSettings.cshtml Razor page with add/edit/delete UI
- DeviceSettings.cshtml.cs page model with CRUD operations
- UserSettings model added to ApiModels.cs
- UserSettings DbSet added to RR3DbContext
- EF Core migration: 20260219180936_AddUserSettings
- Link added to Admin dashboard

API Endpoints:
- GET /api/settings/getUserSettings?deviceId={id} - APK sync endpoint
- POST /api/settings/updateUserSettings - Web panel update
- GET /api/settings/getAllUserSettings - Admin list view

Database Schema:
- UserSettings table (Id, DeviceId, ServerUrl, Mode, LastUpdated)
- SQLite storage with EF Core migrations

Integration:
- Works with APK SettingsActivity sync button
- Real-time configuration updates
- Emoji logging for all operations
- Device-specific server URL management

Usage:
1. Admin configures device settings at /devicesettings
2. User opens RR3 APK and taps Sync from Web Panel
3. APK downloads settings via API
4. Settings saved to SharedPreferences
5. Game restart applies configuration

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-19 10:15:02 -08:00
7a683f636e Fix database bugs and add comprehensive test report 🔧📋
Bugs Fixed:
- Fixed SQLite missing column errors (Cash, Gold, Level, etc.)
- Fixed LINQ translation error in AssetsController (File.Exists)
- Fixed type mismatch in ModdingController (null coalescing)
- Applied database migrations for complete schema

Database Changes:
- Added User currency columns (Gold, Cash, Level, XP, Reputation)
- Added Car custom content fields (IsCustom, CustomAuthor, CustomVersion)
- Added GameAsset metadata fields (Md5Hash, CompressedSize)
- Added ModPacks table for mod bundling

Testing:
- Comprehensive test report: COMPREHENSIVE_TEST_REPORT.md
- 9/9 critical endpoints passing
- All APK-required functionality verified
- Database operations validated
- Response format compatibility confirmed

Status:  Server is production-ready (pending assets)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 02:00:52 -08:00