Commit Graph

6 Commits

Author SHA1 Message Date
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
a6bab92282 Add user authentication and account management system
Features:
- User registration with username, email, password
- Login with JWT token authentication
- Password hashing with BCrypt
- Account settings & management
- Device linking to accounts
- Change password & password reset
- Account-User relationship (1-to-1 with game data)

Database entities:
- Account: User accounts with credentials
- DeviceAccount: Link devices to accounts (many-to-many)

API endpoints:
- POST /api/auth/register
- POST /api/auth/login
- POST /api/auth/change-password
- POST /api/auth/forgot-password
- POST /api/auth/reset-password
- GET /api/auth/me
- POST /api/auth/link-device
- DELETE /api/auth/unlink-device/{deviceId}

Starting resources for new accounts:
- 100,000 Gold
- 500,000 Cash
- Level 1

Ready for VPS deployment with HTTPS.
2026-02-19 15:00:16 -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
934fa51524 Add Complete Game Progression System
MAJOR UPDATE - Full game systems based on APK analysis:

CAR SYSTEM:
- Purchase cars with Gold or Cash
- 5 starter cars across all classes (C,B,A,S,R)
- Car database with manufacturers and performance ratings
- Garage management and inventory tracking

UPGRADE SYSTEM:
- 5 upgrade types (Engine, Tires, Suspension, Brakes, Drivetrain)
- Progressive Performance Rating increases
- Cash-based upgrade economy
- Per-car upgrade tracking

PROGRESSION SYSTEM:
- Experience Points and leveling (1000 XP per level)
- Level-up rewards (10 Gold + 5K Cash)
- Reputation tracking
- Complete player profile management

CAREER MODE:
- Career series and event tracking
- Star rating system (1-3 stars per event)
- Best time tracking
- Star-based rewards (10G/2KC/100XP per star)

ECONOMY:
- Balanced F2P progression
- ~350 Gold + \ daily earning potential
- Fair pricing for cars and upgrades
- Multiple currency sources

NEW ENDPOINTS:
- GET /synergy/progression/player/{id} - Player profile
- POST /synergy/progression/player/{id}/update - Update stats
- POST /synergy/progression/car/purchase - Buy cars
- POST /synergy/progression/car/upgrade - Upgrade cars
- POST /synergy/progression/career/complete - Finish events

DATABASE:
- Cars table - Vehicle catalog
- OwnedCars table - Player garage
- CarUpgrades table - Upgrade options
- CareerProgress table - Event completion
- User table extended with Level/XP/Reputation

SEEDED DATA:
- 5 cars (Nissan Silvia to McLaren P1 GTR)
- 5 upgrades for starter car
- Time trials and gold packages from previous update

This creates a COMPLETE single-player experience with:
✓ Daily rewards + time trials
✓ Car ownership + garage
✓ Upgrade system
✓ Career progression
✓ Level/XP system
✓ Full economy

Based on actual RR3 game analysis!

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-17 22:21:36 -08:00
0a327f3a8b Initial commit: RR3 Community Server with web admin panel
- ASP.NET Core 8 REST API server
- 12 API endpoints matching EA Synergy protocol
- SQLite database with Entity Framework Core
- Web admin panel with Bootstrap 5
- User, Catalog, Session, Purchase management
- Comprehensive documentation

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