Skip to Content
Admin PanelResources

Admin Resources

Resources are the core entities managed through the admin panel. Each resource has List, Show, Create, and Edit views.

Resource Structure

Each resource follows this pattern:

src/components/resources/[Resource]/ ├── index.ts # Resource export ├── List.tsx # List view ├── Show.tsx # Detail view ├── Create.tsx # Create form (optional) ├── Edit.tsx # Edit form (optional) ├── Form.tsx # Shared form fields ├── filters.tsx # List filters └── Icon.tsx # Resource icon

User Resource

Path: src/components/resources/User/

Operations: List, Show

Fields

FieldTypeDescription
idUUIDUser ID
emailStringEmail address
usernameStringDisplay name
avatarStringAvatar URL
cupNumberRanking points
expNumberExperience points
createdAtDateTimeRegistration date

Filters

  • Search by email/username
  • Filter by date range

Game Resource

Path: src/components/resources/Game/

Operations: List, Create, Edit, Show

Fields

FieldTypeDescription
idUUIDGame ID
titleStringChallenge name
descriptionStringDescription
isActiveBooleanActive status
durationDurationMatch duration
minPlayersNumberMinimum participants
maxPlayersNumberMaximum participants
maxPositionsNumberMax positions per player
startVBalanceNumberStarting virtual balance
entryFeeNumberEntry fee amount
cupNumberCup points at stake
winExpNumberWinner XP
loseExpNumberLoser XP
rewardPriceNumberPrize pool
currencyEnumUSDT/SOL/BT
coverStringCover image URL

Form Sections

  1. Basic Info: Title, description, cover
  2. Players: Min/max players, max positions
  3. Economy: Entry fee, reward, currency
  4. Progression: Cup, XP (win/lose)
  5. Settings: Duration, starting balance

GameMatch Resource

Path: src/components/resources/GameMatch/

Operations: List, Show

Fields

FieldTypeDescription
idUUIDMatch ID
gameIdUUIDParent game
statusEnumopen/pending/closed
startTimeDateTimeMatch start
endTimeDateTimeMatch end
winnerIdUUIDWinner user ID

Relationships

  • game: Parent Game
  • participants: GameMatchParticipant[]
  • positions: GameMatchPosition[]
  • winner: User

GameMatchPosition Resource

Path: src/components/resources/GameMatchPosition/

Operations: List, Show

Fields

FieldTypeDescription
idUUIDPosition ID
baseTokenStringTrading pair (e.g., BTCUSDT)
entryPriceNumberEntry price
closePriceNumberClose price
marginNumberMargin amount
leverageNumberLeverage used
sideEnumbuy/sell
typeEnummarket/limit
statusEnumopen/pending/closed/liquidated/canceled
stopLossNumberStop loss price
targetPointNumberTake profit price
sizeNumberPosition size
profitNumberRealized profit
liquidationPriceNumberLiquidation price

Wallet Resource

Path: src/components/resources/Wallet/

Operations: List, Show

Fields

FieldTypeDescription
idUUIDWallet ID
userIdUUIDOwner user
balanceNumberCurrent balance
lockedNumberLocked funds
currencyEnumUSDT/SOL/BT
addressStringBlockchain address

Relationships

  • user: User
  • transactions: Transaction[]

Transaction Resource

Path: src/components/resources/Transaction/

Operations: List, Show

Fields

FieldTypeDescription
idUUIDTransaction ID
walletIdUUIDRelated wallet
amountNumberAmount
typeEnumdeposit/withdraw
statusEnumpending/completed/failed/canceled
descriptionStringDescription
refStringReference ID
balanceAfterTransactionNumberBalance after
createdAtDateTimeCreated at

Achievement Resource

Path: src/components/resources/Achievement/

Operations: List, Create, Edit, Show

Fields

FieldTypeDescription
idUUIDAchievement ID
nameStringAchievement name
descriptionStringDescription
iconStringIcon URL
rulesJSONAchievement rules

Consumable Resource

Path: src/components/resources/Consumable/

Operations: List, Create, Edit, Show

Fields

FieldTypeDescription
idUUIDConsumable ID
nameStringItem name
descriptionStringDescription
imageStringImage URL
typeEnumItem type
valueNumberItem value

Data Provider

All resources use a custom GraphQL data provider:

Path: src/data/provider.ts

Operations

OperationDescription
getListPaginated list query
getOneSingle entity query
getManyMultiple entities by IDs
getManyReferenceRelated entities
createCreate mutation
updateUpdate mutation
deleteDelete mutation
deleteManyBulk delete
updateManyBulk update
Last updated on