openvibers/openvibe.casino README.md

README.md

main 3.9 KB · 77 lines · markdown

1# OpenVibe.Casino
2
3> Learn it, play it, never pay it.
4
5**Live site:** https://openvibe.casino · **API docs:** https://openvibe.services · **For AI:** https://openvibe.casino/llms.txt
6**Run it:** `npm ci && npm run dev` (Node 22 or newer) · **Tests:** `npm test`
7
8**Domain:** `openvibe.casino` · **Port:** 5210 · **Service id:** `casino` · **Env prefix:** `CASINO`
9
10Every casino game with its insides showing: the rules, the exact odds and what each bet costs, tables you can play with
11chips worth nothing, and a simulator that plays a million rounds in your browser. Plan: the new-domains plan, §5.14.
12
13**No real money, ever.** Play chips are free, a fresh 1,000 arrive each day, they live in the player's browser, and they
14cannot be bought, sold, won as anything or cashed out. No operator listings and no affiliate links: those wait for the
15owner's legal review. The tables sit behind a self-declared 18+ gate, remind a player every 30 minutes, and every page
16carries one calm line pointing at free help (1-800-GAMBLER, BeGambleAware, Gamblers Anonymous).
17
18## The engines (`engine/`)
19
20Pure JavaScript, deterministic from a seed (`rng.js`, mulberry32), UMD so the same file runs on the server, at the table
21and in the simulator's Web Worker.
22
23| Engine | What it plays | How the edge is known |
24|---|---|---|
25| `blackjack.js` | 6 decks, S17, DAS, split to 4, split aces one card, peek, insurance, 3:2; basic strategy, "like the dealer", "never bust" | simulation; basic strategy checked against the published 0.40% |
26| `roulette.js` | European and American, every layout bet | exact: 2.70%, 5.26%, top line 7.89% |
27| `baccarat.js` | punto banco, 8 decks, the third-card tableau, 5% commission | exact, every six-card path weighted: 1.06 / 1.24 / 14.36% |
28| `craps.js` | pass, don't pass, odds (3-4-5x), place, field | exact from the 36 dice outcomes |
29| `slots.js` | three 24-stop reels, a paytable | exact over all 13,824 stops: RTP 93.63% |
30
31`engine/games.js` is the catalogue every page and the API read; no edge in it is typed in.
32`test/engines.test.js` checks every figure against Wizard of Odds' published one.
33
34## Pages
35
36| Path | What |
37|---|---|
38| `/` | every bet's cost on one ladder, a real bankroll chart, what you can do, questions |
39| `/play`, `/play/:game` | the tables (`public/js/table.js`), the 18+ gate, the chips (`public/js/casino.js`) |
40| `/learn`, `/learn/:game` | the rules and each bet's edge, with the engine's own tables (basic strategy, the tableau, the strips) |
41| `/simulate` | the simulator (`public/js/simulate.js`, `public/js/sim-worker.js`) |
42| `/s/:id` | a shared run (noindex) |
43| `/safe`, `/developers` | play safe; the API |
44
45## API (`/api/v1`, open, no key)
46
47- `GET /games`, `GET /games/:id`: rules, each bet's edge, how it is known and the published source.
48- `POST /simulate` `{ game, choice, rounds, seed?, share? }`: a bounded run on the server (`CASINO_SIM_MAX_ROUNDS`,
49 default 200,000; `CASINO_SIM_PER_MINUTE` per address, default 6). With `share`, the run is kept and its link answered.
50- `GET /sims/:id`: a shared run. `GET /openapi.json`: OpenAPI 3.1.
51
52## Data
53
54One table, `casino_sims` (a shared run: game, params with the seed, result). No column names a person. Casino keeps
55nothing about anyone, so an account export says so and a deletion has nothing to erase (`server/identity/account-data.js`).
56
57## The service
58
59Express, server-rendered through `openvibe-shared/shell` and the room kit (`rooms.js` id `casino`). Sign-in through
60OpenVibe.Network (OAuth client `casino`, PKCE). PostgreSQL through `openvibe-sdk/db` (`migrations/`), PGlite in
61development and tests. Deploy files: `deploy/systemd/openvibe-casino.service`, `deploy/nginx/openvibe.casino.conf`
62(Meme's, renamed). Env: `.env.example`.
63
64```bash
65npm install
66npm run dev # http://localhost:5210
67npm test # node test/run.js on PGlite
68```
69
70AGPL-3.0-only.
71
72<!-- versions:start -->
73- openvibe-contracts: v0.419.0
74- openvibe-sdk: v0.166.0
75- openvibe-shared: v4.241.0
76<!-- versions:end -->
77