The application includes the following core components:
-
User Authentication: Secure login and registration system to manage individual player accounts.
-
Main Menu Interface: A central hub for users to access game modes, settings, and statistics.
-
Game Modes:
- Play with Friends: Create and join private game rooms using custom IDs and passwords.
- Play Online: Match with random players through a smart matchmaking system.
- Play with AI: Option to play against computer-controlled opponent.
-
Statistics & Achievements Page: Tracks wins, losses, game history, and unlockable achievements to enhance engagement and competition.
-
Rules Page: Provides users with clear instructions and gameplay rules.
-
Settings Page: Allows users to update profile data, change their avatar, switch languages, and log out.
-
Real-Time Multiplayer Infrastructure: A database system to store user accounts and manage the state of live games, ensuring synchronization across devices.
-
Error Handling and UI Feedback: Friendly error messages and loading states for smoother UX.
-
If needed, check the documentation:
- Backend API Documentation: https://7red.ru/api/docs
- Alternative API Documentation: https://7red.ru/api/redoc
-
Access the game website at: https://7red.ru
-
Log in and play! (In case of any questions, refer to Testing Scenarios in Docker Usage Instructions below)
-
Clone the Repository
-
Ensure you have the following installed on your system:
- Docker and Docker Compose (required for containerized deployment)
- Python 3.8+ (for local backend development)
- Flutter SDK (for local frontend development)
- Git (for version control)
-
Copy the environment template from .env.example and add to the root of the project .env file with needed configuration
-
Build and start the project with Docker, using:
Option A: Using Pre-built Images from DockerHub spalkkina/7red
Build and start all services with
docker-compose up --build
Option B: Local Development Build
Use the local development configuration
docker-compose -f docker-compose.local.yml up --build
Local access to the website at: http://localhost:8080
-
Testing Scenarios:
5.1 For Multiplayer Testing:
-
Open 2-4 browser tabs
-
Create different accounts in each tab (Sign In/Sign Up)
-
From one account: Create private room (Start new game → Create private room)
-
From other accounts: Join using room ID and password (Start new game → Connect private room)
-
Click "Get Ready" button in each tab
-
Start playing by dragging cards and submitting moves
-
If you want to read the rules, click the ? button in the lower right corner
-
If you lose, stay as a spectator and watch the rest of the game (if you're interested)
-
If you want to leave the game, click the "Exit" button in the upper left corner
-
After the game is over, see the statistics by clicking the button in the lower right corner of the main page
5.2 For Bot Testing:
-
Open a browser tab
-
Log in to your account
-
Start a game against the bot (Start new game → Vs Bot)
-
Play against the AI opponent
-
If you want to leave the game, click the "Exit" button in the upper left corner
5.3 For Random Opponents Search Testing:
-
Open a browser tab
-
Log in to your account
-
Search for random opponents (Start new game → Random Opponents)
-
When in an Online Room, click "Get Ready" button
-
Start playing by dragging cards and submitting moves
-
If you want to read the rules, click the ? button in the lower right corner
-
If you lose, stay as a spectator and watch the rest of the game (if you're interested)
-
If you want to leave the game, click the "Exit" button in the upper left corner
-
After the game is over, see the statistics by clicking the button in the lower right corner of the main page
5.4 For Settings Testing:
-
Open a browser tab
-
Log in to your account
-
Enter Settings (click the ⚙️ button in the upper right corner of the main page)
-
Set up the website and your profile as you wish
-
If you want to log out of your account, use the same button
5.5 DQN Testing in Console (if you want to see bot's cards):
-
Upload the file DON.py
-
There should also be enviroment.py and final_agent (4) files in the same directory as DON.py
-
Install torch
-
Write in the console in the directory where the file DQN.py is located
python DQN.py
-
-
Monitor Docker logs with
docker-compose logs -f
Or, to check the logs saved in files, use
docker exec -it <backend_container_id> /bin/bash -c "cd /app/logs && tail -f server.log"
-
Stop Docker containers using
docker-compose down -v