Skip to main content

Fighter Profiles (Snapshots)

Status: ✅ Complete
Last Updated: 2026-01-26

Overview​

Fighter Profiles are snapshots of your character's state at specific points in time. They capture your character's stats, combat attributes, level, and equipped items, allowing you to track your progression over time, compare different states, and share your profiles.

Features​

Core Functionality​

  • Create Snapshots - Capture your current character state with a custom name and description
  • View Snapshots - Browse all your fighter profile snapshots in a grid layout
  • Compare Snapshots - Select two snapshots to compare and see stat differences
  • Delete Snapshots - Remove snapshots you no longer need
  • Export/Import - Export snapshots as JSON files and import them for reference
  • Share Profiles - Share your fighter profiles using Web Share API or clipboard

Implementation Details​

Backend​

Service: FighterProfileService (server/src/services/fighter-profile.service.ts)

API Endpoints:

  • POST /api/gamification/fighter-profiles - Create a new snapshot
  • GET /api/gamification/fighter-profiles - List all user's snapshots
  • GET /api/gamification/fighter-profiles/:id - Get specific snapshot details
  • DELETE /api/gamification/fighter-profiles/:id - Delete a snapshot
  • POST /api/gamification/fighter-profiles/compare - Compare two snapshots

Database Model: FighterProfile (Prisma schema)

  • Stores character stats snapshot (strength, wisdom, discipline, balance)
  • Stores combat attributes snapshot (damage, mitigation, speed, crit chance, crit multiplier, stamina)
  • Stores level and equipped items at time of snapshot
  • Includes snapshot date and user-provided name/description

Frontend​

Component: FighterProfilesTab (web/src/components/CharacterTabs/FighterProfilesTab.tsx)

Location: Gamification Page → Fighter Profiles tab

Features:

  • Create form with name and description fields
  • Grid layout displaying all snapshots with stats
  • Comparison view showing side-by-side differences
  • Export functionality (downloads JSON file)
  • Import functionality (validates and imports JSON files)
  • Share functionality (Web Share API with clipboard fallback)
  • Delete confirmation dialogs

UI Components:

  • Card-based layout for snapshot display
  • Comparison card showing stat differences
  • Action buttons for compare, export, share, delete
  • Form modal for creating new snapshots

User Guide​

Creating a Snapshot​

  1. Navigate to Gamification → Fighter Profiles tab
  2. Click Create Snapshot button
  3. Enter a name (e.g., "Week 1", "After Level 10")
  4. Optionally add a description
  5. Click Create Snapshot

The system automatically captures:

  • Your current character stats (Strength, Wisdom, Discipline, Balance)
  • Your current combat attributes (Damage, Mitigation, Speed, Crit Chance, Crit Multiplier, Stamina)
  • Your current level
  • All currently equipped items

Comparing Snapshots​

  1. Select two snapshots by clicking the compare icon on each
  2. Click Compare Selected button
  3. View the comparison showing:
    • Stat differences (strength, wisdom, discipline, balance)
    • Combat attribute differences (damage, mitigation, speed, crit chance, stamina)
    • Level difference

Exporting/Importing​

Export:

  1. Click the download icon on any snapshot
  2. A JSON file will be downloaded with the snapshot data

Import:

  1. Click Import Profile button
  2. Select a JSON file
  3. The file is validated and imported (for reference only)

Sharing​

  1. Click the share icon on any snapshot
  2. If Web Share API is available, use native sharing
  3. Otherwise, profile details are copied to clipboard

Use Cases​

  • Track Progression - Create snapshots at key milestones (e.g., "Week 1", "After Level 10", "Before Major Upgrade")
  • Historical Reference - Compare your character's stats over time to see how you've progressed
  • Battle Replays - View historical battle data using snapshots from that time period
  • Future PvP - Fighter profiles will enable battling against other players' snapshots (coming soon)

Technical Details​

Snapshot Data Structure​

interface FighterProfile {
id: string;
name: string;
description?: string;
characterStats: {
strength: number;
wisdom: number;
discipline: number;
balance: number;
};
combatAttributes: {
damage: number;
mitigation: number;
speed: number;
critChance: number;
critMultiplier: number;
stamina: number;
};
level: number;
equippedItems: Array<{
itemId: string;
itemName: string;
category: string;
rarity: string;
}>;
snapshotDate: string;
createdAt: string;
}

Comparison Result​

The comparison endpoint returns:

  • Both snapshots in full
  • Differences object showing:
    • Stat differences (snapshot2 - snapshot1)
    • Combat attribute differences
    • Level difference

Future Enhancements​

  • PvP Integration - Battle against other players' snapshots
  • Snapshot Restoration - Restore character to a previous snapshot state (with confirmation)
  • Snapshot Templates - Pre-defined snapshot names for common milestones
  • Bulk Operations - Export/import multiple snapshots at once