Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Ashokaas/BeeHex/llms.txt

Use this file to discover all available pages before exploring further.

Creating Your Account

BeeHex allows you to play locally without an account, but creating one unlocks online multiplayer and competitive ranked games.
1

Navigate to Login Page

Click the “Se connecter” (Login) button in the bottom navigation bar, or visit /login_register directly.
2

Enter Your Credentials

Provide a username and password in the form fields:
  • Username: Your unique display name (e.g., “Jean Michel”)
  • Password: A secure password for your account
3

Register Your Account

Click the “Inscription” (Register) button to create your new account. The system will:
  • Create your account in the database
  • Assign you a unique user ID
  • Set your initial MMR (Match Making Rating) to 500
  • Store authentication cookies for automatic login
4

Automatic Login

After successful registration, you’ll be automatically redirected to the home page (/home) and logged in. Your username will appear in the bottom navigation bar.
If you already have an account, click “Connexion” (Login) instead of “Inscription” to sign in with your existing credentials.

Account Features

Once logged in, your account provides access to:

Online Multiplayer

Play against other players worldwide in real-time matches

Ranked Games

Compete in ranked matches to increase your MMR and climb the leaderboard

Game History

Review all your past games with full move history and results

Private Rooms

Create custom games and invite friends using room codes

Authentication System

How Login Works

BeeHex uses a secure token-based authentication system:
  1. Your credentials are sent to the server at http://[IP_HOST]:3001/login or /register
  2. Upon successful authentication, the server issues an authentication token
  3. This token is stored as a cookie (token) in your browser
  4. All subsequent requests include this token to verify your identity
The authentication cookie is set with withCredentials: true, ensuring secure cross-origin requests.

Session Persistence

Your login session persists across browser sessions using cookies:
  • token: Authentication token for API requests
  • username: Your display name (shown in navigation)
  • userId: Your unique user identifier
These cookies allow you to stay logged in even after closing your browser.

Error Handling

If you encounter login errors:
Common Error: “An error occurred” alert appears when:
  • Username is already taken (during registration)
  • Invalid username/password combination (during login)
  • Server connection issues
  • Network timeout

Troubleshooting Steps

  1. Double-check your credentials: Ensure username and password are entered correctly
  2. Try a different username: If registering, your chosen username may already exist
  3. Check your connection: Verify you have an active internet connection
  4. Clear browser cookies: Sometimes stale cookies can cause authentication issues

Playing Without an Account

You can still enjoy BeeHex without creating an account:
Local Mode allows you to play offline games against another player on the same device. Visit the game mode page and select “Hors-Ligne” (Offline) to start playing immediately without login.
Local games support:
  • All board sizes (5×5, 7×7, 9×9)
  • Custom time limits
  • Full game analysis and move review
However, local games are not saved to your history and don’t affect your ranking.

Managing Your Account

Account Page

Access your account management page at /my_account by clicking “Mon compte” (My Account) in the bottom navigation bar. The account page displays:
  • Welcome message: Personalized greeting with your username
  • MMR History Graph: Interactive line chart showing your rating progression over time
    • View your MMR after each game
    • See your rank evolution across games
    • Hover over data points for detailed information
  • Password Management: Change your password securely
  • Logout: Sign out of your account

Changing Your Password

To update your password:
1

Navigate to My Account

Click “Mon compte” in the bottom navigation bar
2

Enter Password Details

Fill in the password change form:
  • Current password: Your existing password
  • New password: Your desired new password
3

Submit Changes

Click “Mettre à jour le mot de passe” (Update Password) button
4

Confirmation

A success message confirms your password has been updated
If the password change fails, verify your current password is correct. The system will show an error alert if the current password doesn’t match.

Viewing Your MMR History

The MMR History Graph on your account page shows your ranking progression:
// MMR data structure displayed in the graph
interface GameData {
  mmrAfterGame: number;  // Your MMR after the game
  gameDate: number;       // Timestamp of the game
}
The graph displays:
  • X-axis: Game number (Game 1, Game 2, etc.)
  • Y-axis: Your MMR value
  • Tooltip: Shows exact MMR and rank on hover
This helps you track your improvement over time and see how individual games affected your rating.

Logging Out

To log out of your account:
  1. Navigate to the My Account page (/my_account)
  2. Click the “Se déconnecter” (Logout) button at the bottom
  3. Your session will be cleared and you’ll be redirected to the home page
Logging out removes the following cookies: token, userId, and username. You’ll need to log in again to access online features.

Game History

View all your past games on the History page (/history) by clicking “Historique” in the navigation bar. Each game entry shows:
  • Result: Victory or defeat with colored status
  • Opponent: Username of your opponent
  • MMR Change: Rating points gained or lost (e.g., +15 → 515 MMR)
  • Date: When the game was played
  • Move Count: Total number of moves in the game
  • Analysis Button: Click “Analyse” to review the game and see AI move recommendations
Click the “Analyse” button on any past game to open it in review mode, where you can navigate through moves and see optimal play suggestions.

Account Security

Important Security Notes:
  • Choose a strong, unique password
  • Don’t share your account credentials
  • Log out on shared devices using the account page
  • Change your password regularly for better security
  • Contact support if you suspect unauthorized access

Next Steps

Now that your account is set up:

Start Playing

Learn how to start your first online game

Understanding Ranks

Discover how the ranking system works

Build docs developers (and LLMs) love