feat: UNO-style table, social hub, cosmetics, speed mode, store IAB

Game table & play
- UNO-style restyle: suit-aware bolder cards (+xl size), pulsing playable glow,
  big "YOUR TURN" pill, active-seat ring, trick-win particle burst, round
  confetti, match coin-rain.
- Per-league turn time via turnMsForStake: 15s starter/AI, 10s pro, 7s expert;
  mirrored server-side in GameRoom.TurnMs.
- Speed (Blitz) mode for vs-AI/private: 5s turns, race to 5, ~halved pacing.
- Matchmaking waits ~15s (randomized 12-18s) then fills bots; elapsed timer + hint.

Rewards / gifts
- Richer post-match modal (floating coins, XP bar), celebration overlay reveals
  the unlocked sticker pack, boosted daily rewards (client+server synced),
  themed 7-day daily with special day-7.

Social
- Public profile modal (identity, stats, achievement board) from leaderboard /
  friends / discover / end-of-game roster; rate-limited add-friend (10/hour).
- Social hub: Friends / Discover (player search + suggestions) / Messages inbox.
- Profile gender (shown in finder/profile) + social links with public/friends/
  hidden visibility, enforced server-side.

Cosmetics
- Distinct card backs: per-design pattern families (stripes/argyle/grid/dots/
  rays/scales/crosshatch/royal/filigree/gem) + luxury motifs (lib/cardBack.ts),
  consistent on table/shop/profile; +Peacock/Rose-Gold backs.
- Purchasable titles (shop Titles section); title shown under the seat on the
  table and in discover/public profile.
- 10 new sticker packs (banter/kol-kol, Persian trends, court cards, moods).
- Persistent level+XP bar on Home and every inner screen.

Payments
- Buy-coins gateway opens in a new tab (no SPA dead-end) + focus refresh.
- Store IAB scaffolding: Cafe Bazaar deep-link purchase + redirect-token capture,
  Myket native-bridge contract, server-side IabService.Verify for both stores,
  config-driven via Iab__* env. POST /api/coins/iab/verify (JWT).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-06 18:39:24 +03:30
parent e450a6a2ed
commit cb27a16dc1
49 changed files with 3438 additions and 592 deletions
@@ -18,6 +18,15 @@ public class StatsDto
public int RoundsWon { get; set; }
}
/// <summary>Optional social-media handles a player chooses to share.</summary>
public class SocialLinksDto
{
public string? Instagram { get; set; }
public string? Telegram { get; set; }
public string? X { get; set; }
public string? Youtube { get; set; }
}
/// <summary>Mirrors the client UserProfile (camelCase JSON).</summary>
public class ProfileDto
{
@@ -48,11 +57,42 @@ public class ProfileDto
public List<string> Unlocked { get; set; } = new();
public long CreatedAt { get; set; }
// social
public string Gender { get; set; } = ""; // "" | male | female | other
public SocialLinksDto Socials { get; set; } = new();
public string SocialsVisibility { get; set; } = "public"; // public | friends | hidden
// daily reward streak
public int DailyDay { get; set; } = 1;
public string? DailyLastClaimed { get; set; } // yyyy-MM-dd
}
/// <summary>
/// Public-facing view of another player (no coins/phone/email). Mirrors the
/// client <c>PublicProfile</c>. Returned by <c>GET /api/profile/{id}/public</c>.
/// </summary>
public class PublicProfileDto
{
public string Id { get; set; } = "";
public string DisplayName { get; set; } = "";
public string Avatar { get; set; } = "a-fox";
public string? AvatarImage { get; set; }
public string Plan { get; set; } = "free";
public string? Title { get; set; }
public int Level { get; set; } = 1;
public int Rating { get; set; } = 1000;
public StatsDto Stats { get; set; } = new();
public Dictionary<string, int> Achievements { get; set; } = new();
public List<string> Unlocked { get; set; } = new();
public long CreatedAt { get; set; }
public string Gender { get; set; } = "";
/// <summary>Only populated when the viewer is allowed to see them (public / friend / self).</summary>
public SocialLinksDto? Socials { get; set; }
public bool IsFriend { get; set; }
public bool IsYou { get; set; }
public bool RequestSent { get; set; }
}
public class MatchSummaryDto
{
public bool Ranked { get; set; }