$MOEDADA is a web platform for heads-or-tails duels: one player challenges another, both bet fictional points, the coin is flipped on the server round by round, and the result feeds a global ranking. It is a solo project built during the Systems Development technical course at SENAI, from the requirements specification to delivery. The interface is in Portuguese.

Features
- Accounts: sign up, login and logout, with 1,000 starting points for each player.
- Challenge CRUD: create, list with opponent search and status filter, edit and cancel.
- Accept or decline: the opponent decides whether to take the challenge.
- Duels of 3, 5 or 10 rounds, with bets from 10 to 1,000 points.
- Arena that flips the coin without reloading the page, with round history.
- Automatic settlement: points only change hands when the duel ends.
- Global ranking by wins and by points.

Technical highlights
- Server-side draw with
random_int(): the browser only requests the flip and shows the result. - Consistency under concurrency: each flip runs in a transaction that locks the challenge with
SELECT ... FOR UPDATE, and a unique key prevents duplicate rounds. - Security: PDO with prepared statements, CSRF tokens on every form and on the API, passwords with
password_hash(), session regeneration on login and escaped output against XSS. - Engineering documentation: specification with 19 functional requirements, 16 non-functional requirements and 18 business rules, architecture with 12 recorded decisions, a test plan with 25 test cases and its own design system.
Stack
- PHP 7.4+ with PDO
- MySQL 8
- Bootstrap 5 with custom CSS
- JavaScript (fetch)