GitHunt
MA

marc12302/Poseidon-Casino

Poseidon Casino is a modern online gambling platform that blends C++ performance with modern web technologies, offering an immersive ocean-themed design with stunning visual effects.

madafaca

๐ŸŒŠ Poseidon Casino - Modern Online Gaming Platform

โšก A high-performance online casino platform built with C++ backend and modern web technologies

Features โ€ข Tech Stack โ€ข Installation โ€ข Usage โ€ข API โ€ข Screenshots


๐ŸŽฏ Overview

Poseidon Casino is a cutting-edge online gambling platform that combines the raw performance of C++ with modern web technologies to deliver an exceptional gaming experience. Named after the Greek god of the seas, the platform features an immersive ocean-themed design with stunning visual effects and smooth animations.

โœจ Features

๐Ÿ” Secure Authentication System

  • JWT-based authentication with 2-hour token expiration
  • Secure user registration and login
  • Password hashing (ready for production)
  • Persistent sessions with "Remember Me" functionality

๐ŸŽฎ Interactive Games

  • ๐ŸŽฒ Poseidon's Dice - Classic dice game with multipliers up to 35x

    • Predict the sum of two dice
    • Real-time animations
    • Detailed betting history
  • ๐Ÿš€ Rocket Crash - Exciting multiplier game

    • Progressive multiplier system
    • Auto cash-out feature
    • Live bets from other players
    • Real-time crash animation

๐Ÿ“Š Comprehensive Dashboard

  • Real-time balance tracking
  • Detailed gaming statistics
    • Total games played
    • Win rate percentage
    • Biggest win tracking
    • Session history
  • Quick fund management
  • Responsive design for all devices

๐Ÿค– Intelligent House Edge System

  • Advanced supervisor algorithm
  • Dynamic probability adjustment
  • Player retention optimization
  • Maintains 5% house edge
  • Fairness with profitability balance

๐ŸŽจ Modern UI/UX

  • Ocean-themed design with Poseidon aesthetics
  • Neon blue color scheme (#00D4FF, #0066FF)
  • Smooth animations and transitions
  • Dark mode for comfortable gaming
  • Fully responsive layout

๐Ÿ› ๏ธ Tech Stack

Backend

  • C++20 - Core backend language
  • Crow Framework - Fast HTTP server
  • SQLite3 - Lightweight database
  • JWT-CPP - Token authentication
  • OpenSSL - Cryptography

Frontend

  • HTML5 - Semantic markup
  • CSS3 - Modern styling with animations
  • JavaScript ES6+ - Interactive functionality
  • Vanilla JS - No framework dependencies

Architecture

  • RESTful API design
  • MVC pattern implementation
  • Modular component structure
  • Responsive mobile-first approach

๐Ÿ“ฆ Installation

Windows

  • Download this => OpenSSL
  • Install OpenSSL with defalut settings and make sure it's installed in Program Files (C:)

Prerequisites

# Ubuntu/Debian
sudo apt-get update
sudo apt-get install g++ cmake libsqlite3-dev libssl-dev

# macOS
brew install gcc cmake sqlite openssl

Clone Repository

git clone https://github.com/marc12302/Poseidon-Casino.git
cd Poseidon-Casino

Build Backend

# Create build directory
mkdir build && cd build

# Compile
g++ -std=c++20 ../src/main.cpp -lcrow -lsqlite3 -lssl -lcrypto -pthread -o casino_server

# Or using CMake
cmake ..
make

๐Ÿš€ Usage

Start the Server

./casino_server
# Server starts on http://localhost:18080

Access the Platform

  1. Open your browser and navigate to http://localhost:18080
  2. Create a new account or login
  3. Add funds to your account (demo mode)
  4. Start playing!

๐Ÿ“ก API Documentation

Authentication Endpoints

Register

POST /api/register
Content-Type: application/json

{
  "username": "player123",
  "password": "securepassword",
  "email": "player@example.com"
}

Login

POST /api/login
Content-Type: application/json

{
  "username": "player123",
  "password": "securepassword"
}

Game Endpoints

Get Balance

GET /api/balance
Authorization: Bearer <token>

Play Dice

POST /api/games/dice
Authorization: Bearer <token>
Content-Type: application/json

{
  "bet": 50,
  "target": 7,
  "username": "player123"
}

Play Rocket

POST /api/games/rocket
Authorization: Bearer <token>
Content-Type: application/json

{
  "action": "start",
  "bet": 100,
  "username": "player123"
}

๐ŸŽฎ Game Rules

๐ŸŽฒ Poseidon's Dice

  • Choose a target sum (2-12)
  • Place your bet
  • Roll two dice
  • Win if the sum matches your prediction
  • Payouts vary by probability (2 and 12 pay 35:1)

๐Ÿš€ Rocket Crash

  • Place your bet before launch
  • Watch the multiplier increase
  • Cash out before the rocket crashes
  • Auto cash-out option available
  • Higher risk = higher reward

๐Ÿ”’ Security Features

  • JWT Authentication - Secure token-based auth
  • CORS Protection - API security headers
  • Input Validation - Client and server-side
  • SQL Injection Prevention - Prepared statements
  • Rate Limiting - (Implement in production)
  • HTTPS Support - (Configure for production)

๐Ÿ“ˆ Performance

  • High-Performance Backend - C++ for maximum speed
  • Optimized Database Queries - Indexed tables
  • Efficient WebSocket - Real-time updates
  • Lazy Loading - Resources loaded on demand
  • Minified Assets - Reduced payload size

๐ŸŽจ Customization

Themes

Modify color scheme in common.css:

:root {
    --primary: #00D4FF;
    --secondary: #0066FF;
    --dark: #0A0E1B;
    --success: #00FF88;
    --error: #FF4444;
}

Game Settings

Adjust house edge in main.cpp:

struct SupervisorSystem {
    double house_edge = 0.05; // 5% default
    double player_retention_factor = 0.85;
}

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Crow Framework for the excellent C++ web framework
  • SQLite for the reliable database engine
  • The open-source community for inspiration

Made with โค๏ธ and โ˜• by Lenny

โญ Star this repository if you find it helpful!