15 - Konfiguration & Umgebungsvariablen
Dokument: Konfigurations-Referenz
Stand: 28.02.2026
Scope: .env, next.config, tsconfig, Tailwind
Status: Audit-ready
1. Umgebungsvariablen (.env)
Hinweis: Variablen mit NEXT_PUBLIC_ Prefix sind im Browser sichtbar (Client-seitig).
1.1 RPC & Netzwerk
| Variable |
Scope |
Beschreibung |
RPC_URL |
Server |
Primärer RPC-Endpoint (Alchemy) |
NEXT_PUBLIC_RPC_URL |
Client |
Client-seitiger RPC |
PRIMARY_RPC_URL |
Server |
Backup RPC |
RPC_URL_WS |
Server |
WebSocket RPC |
ARBITRUM_SEPOLIA_RPC |
Server |
Arbitrum Sepolia RPC |
ARBITRUM_SEPOLIA_CHAINID |
Server |
Chain ID (421614) |
NEXT_PUBLIC_CHAIN_ID |
Client |
Chain ID (Client) |
NEXT_PUBLIC_EXPLORER_URL |
Client |
Block Explorer URL |
EXPLORER_URL |
Server |
Explorer URL (Server) |
ARBISCAN_API_KEY |
Server |
Arbiscan API Key |
1.2 Smart Contracts
| Variable |
Beschreibung |
GAMEMANAGER / GAME_MANAGER |
GameManager Contract |
SETTLEMENT |
Settlement Contract |
RESERVE_VAULT / RESERVEVAULT |
ReserveVault Contract |
PRIZE_VAULT_V2 |
PrizeVault V3 Contract |
AFFILIATE_VAULT |
AffiliateVault Contract |
CLAIM_ROUTER |
ClaimRouter Contract |
GAME_TREASURY |
GameTreasury Contract |
CHARITY_VAULT |
CharityVault Contract |
VRF_RECEIVER |
VRF Receiver Contract |
VRF_COORDINATOR |
Chainlink VRF Coordinator |
VRF_KEY_HASH / VRF_KEYHASH |
VRF Key Hash |
VRF_SUBSCRIPTION_ID |
VRF Subscription ID |
NEXT_PUBLIC_USDT / USDT |
USDT Token Contract |
NEXT_PUBLIC_ZERO |
Zero Address (0x0) |
1.3 Wallet-Keys (KRITISCH)
| Variable |
Beschreibung |
DEPLOYER |
Deployer-Wallet-Adresse |
PRIVATE_KEY |
Deployer Private Key |
OPERATOR |
Operator-Wallet-Adresse |
OPERATOR_KEY |
Operator Private Key |
OPERATOR_FEE_RECEIVER |
Fee-Empfänger-Adresse |
RELAYER_ADDRESS |
Relayer-Wallet-Adresse |
RELAYER_PK / RELAYER_PRIVATE_KEY |
Relayer Private Key |
BONUS_SIGNER |
Bonus-Signatur-Wallet |
BONUS_SIGNER_PK |
Bonus-Signatur Private Key |
SICHERHEITSHINWEIS: Private Keys NIEMALS in NEXT_PUBLIC_ Variablen!
1.4 Authentifizierung
| Variable |
Scope |
Beschreibung |
NEXT_PUBLIC_WEB3AUTH_CLIENT_ID |
Client |
Web3Auth Client ID |
1.5 Datenbank
| Variable |
Beschreibung |
DB_HOST |
PostgreSQL Host (Default: localhost) |
DB_PORT |
PostgreSQL Port (Default: 5432) |
DB_NAME |
Datenbankname (Default: chainbets) |
DB_USER |
DB-Benutzer (Default: chainbets) |
DB_PASSWORD |
DB-Passwort |
DATABASE_URL |
Connection String |
DATABASE_URL_RO |
Read-Only Connection String |
1.6 Telegram
| Variable |
Scope |
Beschreibung |
WATCHDOG_TELEGRAM_BOT_TOKEN |
Server |
Bot API Token |
NEXT_PUBLIC_TELEGRAM_BOT_USERNAME |
Client |
Bot Username |
TELEGRAM_WEBHOOK_SECRET |
Server |
Webhook-Geheimnis |
WATCHDOG_TELEGRAM_CHAT_ID |
Server |
Alert-Chat-ID |
1.7 Web Push (VAPID)
| Variable |
Scope |
Beschreibung |
NEXT_PUBLIC_VAPID_PUBLIC_KEY |
Client |
VAPID Public Key |
VAPID_PRIVATE_KEY |
Server |
VAPID Private Key |
VAPID_SUBJECT |
Server |
VAPID Subject (mailto:) |
1.8 Test-Accounts
| Variable |
Beschreibung |
PLAYER_A - PLAYER_F |
Test-Wallet-Adressen |
PLAYER_1 - PLAYER_6 |
Test-Private-Keys |
2. Next.js Konfiguration
Datei: next.config.ts
// next-intl Plugin für Internationalisierung
import createNextIntlPlugin from 'next-intl/plugin';
const withNextIntl = createNextIntlPlugin('./i18n/request.ts');
export default withNextIntl({
async headers() {
return [{
source: '/:path*',
headers: [{
key: 'Content-Security-Policy',
value: "frame-ancestors 'self' https://web.telegram.org https://*.telegram.org"
}]
}];
}
});
3. TypeScript Konfiguration
Datei: tsconfig.json
| Einstellung |
Wert |
Beschreibung |
| target |
ES2020 |
Kompilierungsziel |
| module |
esnext |
Modul-System |
| strict |
true |
Strict Mode aktiviert |
| paths |
@/* → "./*" |
Path-Alias |
| lib |
dom, dom.iterable, esnext |
Verfügbare Typen |
| jsx |
preserve |
JSX-Handling |
| moduleResolution |
bundler |
Import-Auflösung |
4. Tailwind CSS Konfiguration
Datei: tailwind.config.js
content: [
'./app/**/*.{js,ts,jsx,tsx,mdx}',
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./lib/**/*.{js,ts,jsx,tsx,mdx}'
]
Kein Custom Theme - Design Tokens werden über lib/colors.ts verwaltet.
5. Design Tokens (lib/colors.ts)
5.1 Farbpalette
| Token |
Wert |
Verwendung |
| primary |
#5DBE5D |
Haupt-Grün |
| accent |
#D4A528 |
Gold/Accent |
| bg |
Dunkel |
Hintergrund |
| text |
Hell |
Textfarbe |
| danger |
Rot |
Fehler/Warnung |
5.2 Game-Config
| Parameter |
Wert |
| Zahlen pro Tip |
6 |
| Zahlenbereich |
1 - 40 |
| Max bezahlte Tips/TX |
100 |
| Max Tips gesamt |
9.999 |
5.3 Helper-Funktionen
| Funktion |
Beschreibung |
calculateBonus(tipCount) |
Bonus-Formel |
getBonusInfo(tipCount) |
Bonus + Next-Bonus-Info |
formatUsdt(value, decimals) |
USDT-Formatierung (6 Dec) |
generateRandomTip() |
6 Random Unique Numbers |
validateTip(numbers) |
Tip-Validierung |
6. PWA-Manifest
Datei: public/manifest.json
| Parameter |
Wert |
| name |
ChainBETs.win |
| short_name |
ChainBETs |
| display |
standalone |
| theme_color |
#0d1f0d |
| background_color |
#0d1f0d |
| categories |
games, entertainment |
| lang |
en |
Icons: 48x48, 96x96, 192x192 (maskable), 512x512 (maskable)
7. Service Worker
Datei: public/sw.js
| Feature |
Beschreibung |
| Push Events |
Notification anzeigen |
| Notification Click |
App öffnen/fokussieren |
| Icon |
/icons/icon-192.png |
| Badge |
/favicon-96x96.png |
| Tag |
chainbets-win (Deduplizierung) |
| Renotify |
true |
8. ESLint Konfiguration
Datei: eslint.config.mjs
Verwendet Next.js ESLint-Preset mit TypeScript-Unterstützung.
Weiterführende Dokumente:
- 01 - Systemübersicht
- 08 - Blockchain
- 10 - Sicherheit