System Architecture

This section outlines the key frameworks, libraries, architectural decisions, and project structure behind this casino platform.

2.1 Frameworks and Libraries

Core Framework

State Management

UI and Styling

Internationalization

Form Handling

Other Notable Libraries

2.2 Build Tools

2.3 File Structure

src/
 ├── app/
 │   └── [locale]/         # Internationalized routes
 │       ├── layout.tsx
 │       ├── page.tsx
 │       ├── settings/
 │       ├── games/
 │       └── ...
 ├── components/
 │   ├── common/           # Shared components
 │   ├── modals/           # Modal components
 │   ├── originalGames/    # Game-specific components
 │   ├── pages/            # Page-specific components
 │   └── ui/               # UI library components
 ├── api/
 │   └── apiClient/        # API client implementation
 ├── hooks/                # Custom React hooks
 ├── providers/            # React context providers
 ├── queries/              # React Query definitions
 ├── stores/               # Zustand stores
 ├── styles/               # Global styles and mixins
 ├── types/                # TypeScript type definitions
 ├── utils/                # Utility functions
 ├── constants/            # Constants and configuration
 ├── i18n/                 # Internationalization setup
 └── mappers/              # Data transformation utilities
    

2.4 Styling Approach

2.5 Theming

2.6 Routing

2.7 State Management

Server State

@tanstack/react-query: Utilized for efficient data fetching, caching, and server state management.

Client State

2.8 UI Component Library

2.9 API Handling

2.10 Authentication

2.11 Third-Party Integrations

2.12 Responsive Design

The project implements responsive design through:

2.13 BE-api General Information

1. Main API

2. WebSocket Service

3. Standalone Game Services (BlackJack & Speed Roulette)