Admin Panel
The BattlesBit Admin Panel is a web-based administration interface for managing the platform. Built with React Admin, it provides CRUD operations for all platform entities.
Tech Stack
| Technology | Purpose |
|---|---|
| React 19 | UI Framework |
| React Admin 5 | Admin framework |
| MUI 7 | UI Components |
| URQL | GraphQL client |
| Vite | Build tool |
| TypeScript | Type safety |
Features
- Full CRUD for all entities
- Real-time data via GraphQL
- JWT authentication
- Persian (Farsi) language support
- Custom field components
- Image upload via S3
Project Structure
admin/
├── src/
│ ├── App.tsx # App entry with providers
│ ├── Admin.tsx # React Admin configuration
│ ├── auth/ # Authentication
│ │ ├── provider.ts # Auth provider
│ │ └── jwt-manager.ts # JWT handling
│ ├── components/
│ │ ├── atoms/ # Base components
│ │ ├── molecules/ # Composite components
│ │ ├── organisms/ # Complex components
│ │ └── resources/ # Entity CRUD views
│ ├── data/ # GraphQL data layer
│ │ ├── client.ts # URQL client
│ │ ├── provider.ts # React Admin data provider
│ │ └── fields/ # Field definitions
│ ├── theme/ # MUI theming
│ ├── i18n/ # Translations
│ └── store/ # State management
└── public/ # Static assetsResources (Entities)
| Resource | Operations | Description |
|---|---|---|
| User | List, Show | User management |
| Game | List, Create, Edit, Show | Challenge templates |
| GameMatch | List, Show | Match instances |
| GameMatchPosition | List, Show | Trading positions |
| Wallet | List, Show | User wallets |
| Transaction | List, Show | Wallet transactions |
| Achievement | List, Create, Edit, Show | Achievement definitions |
| Consumable | List, Create, Edit, Show | Consumable items |
Running Locally
cd admin
yarn install
yarn devOpens at http://localhost:5173
Environment Variables
VITE_GRAPHQL_URI=http://localhost:8080/graphql
VITE_GRAPHQL_WS_URI=ws://localhost:8080/graphql
VITE_S3_BUCKET_URL=https://...Current Progress
Overall: ~70%
See Feature Tracking for details.
Last updated on