Files
1bis8/README.md
T

51 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 1 bis 8 Party – Mobile Web-App
Das ultimative Gesellschaftsspiel über Selbsteinschätzung, Vorurteile und echte
Offenbarungen – als mobile Multiplayer-Web-App: offizielle Spielregeln, 20
Statement-Karten in 5 Kategorien und ein interaktiver Spielleiter für 3–8
Spieler. **Jeder spielt und stimmt auf seinem eigenen Handy ab:** Ein Host
eröffnet einen Spielraum und gibt den 4-stelligen Code weiter; sobald alle
Spieler „Ready“ melden, startet das Spiel automatisch.
**Live:** https://1bis.hocks.eu/ (Alias: https://1bis8.hocks.eu/)
## Struktur
| Pfad | Inhalt |
|---|---|
| `app/` | React + TypeScript + Vite + Tailwind (Quelle der Web-App) |
| `app/src/data/game.ts` | Kategorien, 20 Statement-Karten, Regelwerk-Texte |
| `app/src/lib/api.ts` | Client für die Game-API (Räume, Ready, Rankings) |
| `server/game/api/server.js` | Game-API: Spielräume, Auto-Start, Punkteberechnung |
| `server/web/`, `server/mail/` | nginx-Web-Stack und Postfix-Relay + Mail-API |
| `docs/` | Original-Spielregeln (PDF) |
## Entwicklung
```bash
cd app
npm install
npm run dev # Dev-Server (Port 3000, --port für andere Ports)
npm run build # Produktions-Build → app/dist/
```
## Deployment (VPS 82.165.218.97, /opt/1bis8)
**Automatisch:** Bei jedem Push auf `main` baut die Gitea-Action
(`.gitea/workflows/deploy.yml`) die App und kopiert `dist/` auf den Server –
der Web-Container nutzt das Verzeichnis als Laufzeit-Mount und nimmt die
Änderungen sofort an. Anschließend läuft ein Health-Check gegen beide Domains.
**Manuell:**
```bash
cd app && npm run build
scp -P 38592 -r dist root@82.165.218.97:/opt/1bis8/web/
```
- TLS, Subdomains und Routing: Nginx Proxy Manager (`npm_default`-Netz)
- E-Mail: `onebis8-mail` (Postfix-Relay, intern) + `onebis8-mail-api`,
Kontaktformular sendet an `axel@hocks.eu` (Muster: Mieterportal-Stack)
- Konfiguration: `server/app.env` (Mail-Token) und `server/mail/mail.env`
liegen nur auf dem Server, nicht im Repo