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.
๐ 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 opensslClone Repository
git clone https://github.com/marc12302/Poseidon-Casino.git
cd Poseidon-CasinoBuild 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:18080Access the Platform
- Open your browser and navigate to
http://localhost:18080 - Create a new account or login
- Add funds to your account (demo mode)
- 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!