version 0.8.0

This commit is contained in:
danny 2026-09-18 06:46:56 +02:00
parent f22007003a
commit e5ca9ef194
95 changed files with 5601 additions and 4042 deletions

View file

@ -64,22 +64,35 @@ No frontend framework, no build step — everything runs directly in the browser
## Project Structure
Modern OOP front-controller architecture. The **document root points to `public/`**;
everything else lives above it and is not web-accessible.
```
black-sheep-bluff/
├── index.html # Entire frontend (lobby, player view, host view)
├── api.php # REST API for all game actions
├── auth.php # Login, session management, PIN handling
├── migrate.php # Automatic DB migration system (V1–V8)
├── setup.php # One-time admin setup (self-deletes after use)
├── login.php # Login page
├── profile.php # Player profile & lifetime statistics
├── admin.php # Admin panel (user management)
├── config.php # DB credentials — not in repo, copy from below
├── config.example.php # Credential template (safe to commit)
├── schema.sql # Initial DB schema reference
└── identity/ # Logo & favicon (PNG + PSD)
├── public/ # ← Docroot (only this folder is public)
│ ├── index.php # Front controller — single entry point
│ ├── .htaccess # Clean-URL routing + 301 redirects
│ ├── assets/{css,js}/ # Global (base.css/site.js) + per-page assets
│ ├── identity/ images/ sounds/ # static media
│ ├── uploads/ # user avatars & stickers (gitignored)
│ └── config.js # Client config (Giphy key, donation URL)
├── app/
│ ├── Core/ # Kernel, Router, Config, Database, Controller
│ ├── Controllers/Pages/ # Home, Regeln, Legal, Play, Login, Profile, Admin
│ ├── Controllers/Api/ # Auth, Room, Game, Voting, Chat, Group, Ad, Presence
│ ├── Services/ # RoomService, AuthService (game & auth logic)
│ ├── Database/ # Migrator + versioned migration definitions
│ ├── Support/ # Global helper functions
│ ├── Views/ # layout.php, partials/, pages/
│ └── routes/ # web.php (pages) + api.php (API actions)
├── config/ # config.php (DB creds, gitignored) + example
├── bin/migrate.php # CLI migration runner (`php bin/migrate.php`)
└── schema.sql # Initial DB schema reference
```
> **Add a new SEO page:** drop a view in `app/Views/pages/`, add a controller in
> `app/Controllers/Pages/`, and one line in `app/routes/web.php`.
---
## Database Schema
@ -100,7 +113,7 @@ The migration system runs automatically on first request — no manual setup req
## API Reference
All actions go through `api.php?action=<name>` (GET or POST with a JSON body).
All actions go through `/api/<name>` (auth actions: `/api/auth/<name>`), GET or POST with a JSON body.
| Action | Description |
|---|---|