- 03 Jun, 2026 23 commits
-
-
Mahmoud Aglan authored
Admin panel (/admin/branding.php): - Hardcoded login (admin / El3ab@Brand2024) - Color editor for all 13 platform colors with live preview - Game color editor (8 game-specific colors) - Chess board color editor (5 board theme colors) - Animation/motion settings (speeds, scale, radius) - 19 asset upload slots with size hints: - Logo (200×60), Icon (64×64), Splash (1080×1920) - Coin/Gem/XP icons (24×24) - Game icons (64×64 each) - Win/Loss/Draw icons (128×128) - Medals (32×32), Avatar default (128×128) - Each upload shows expected dimensions in Arabic - Changes save to theme.json and appear as platform defaults - Does NOT override user skins/cosmetics Asset Registry (ASSET_REGISTRY.md): - 44 emojis cataloged with file locations - 71 colors mapped - 9 gradients - 17 animations - 5 board visual configs - 1 piece renderer (vector paths) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Scene transitions: scale+slide (game-like) instead of horizontal slide (web-like) - Buttons: more aggressive scale on press (0.92 in 50ms) - Cards: snappier press response (0.96 in 80ms) - New animation classes: .shake, .pop-in, .bounce-in, .slide-up - Toast: spring bounce entrance, reward/error variants - Keyframes: coinFly, bounceIn, popIn, shake for game events Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Canvas coords: scale CSS pixels to logical canvas coordinates properly (fixes the offset between where you tap and what gets selected) - Canvas touchAction:none prevents browser gestures interfering - Canvas width/height explicitly set in style to match logical size Home screen redesign: - Games as 2x2 grid of large colorful tiles (center stage) - Tap game → bottom sheet menu slides up with: - Single Player (bots + local play) - Multiplayer (online ranked) - Feature chips: Leaderboard, My Matches, Puzzles (chess only) - No more carousel that gets cut off - Game-feel: tiles scale down on press, smooth spring animation Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Tournament list with registration button for open tournaments - Tournament detail view with player count, rounds, bracket area - Register button with loading state and success feedback - Arabic status labels (تسجيل مفتوح, جارية, منتهية) - Format names in Arabic (سويسري, دوري, خروج المغلوب) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- GET match endpoint for live polling during multiplayer - Match history scene (placeholder) - Live sync module with poll/sendMove/drawOffer/resign/rematch - Economy: coins actually granted to player profile on game completion - Economy transactions recorded with reason Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Backend Elo calculation (K=32/24/16 based on rating) - Rating history recorded per game in rating_history table - Profile updated with new rating + win/loss/draw counts - Result screen shows actual rating change from server - Board fills more available space (up to 500px) - Carousel cards fixed: proper padding, no truncation, gradient previews Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Post-game analysis with Stockfish multi-line eval (3 lines, depth 18) - Move navigator: step through game with
⏮ ◀ ▶ ⏭ buttons - Eval bar: visual white/black advantage indicator - Move chips: click any move to jump to that position - Board sizing: fills available vertical space better (up to 480px) - Analysis accessible from result screen 'تحليل المباراة' button Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
feat(chess): full gameplay polish — move list, captured pieces, promotion dialog, bot thinking indicator, clock urgency, improved result screen - Move list: scrollable horizontal move notation (SAN) - Captured pieces: sorted display below each player name - Promotion dialog: visual piece picker (Q/R/B/N) instead of auto-queen - Bot thinking indicator: animated dots overlay during Stockfish response - Clock urgency: red pulsing animation when time < 30s - Resign confirmation: prevents accidental resign - Result screen: proper rating change, coins, XP, move history, analysis button - Sound: differentiated for check, checkmate, castle, capture, normal move Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Chess: vector piece paths (king, queen, rook, bishop, knight, pawn) rendered as proper filled shapes with stroke, not unicode characters - Ludo: actual cross-shaped board with colored home zones, triangular center, home columns, and round pieces with highlights - Domino: green felt table background, proper tiles with pip dots rendered correctly for each value, ivory tile color with borders Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Phase 0: Core engine (scene manager, store, bus, net, tween, audio, canvas, HUD, i18n) - Phase 1: Auth (splash, login, register, token management) - Phase 2: Play World (game carousel, mode picker, bot/time selectors, queue) - Phase 3-4: Chess (canvas board, drag/drop, chess.js, Stockfish bots, clock, live matchmaking) - Phase 5: Domino (tile chain logic, bot AI, pip scoring, multiplayer) - Phase 6: Ludo (cross-board, dice, captures, 4-player bots) - Phase 7: Social (friends, notifications, realtime) - Phase 8: Organizations (browse, join, members, detail) - Phase 9: Rewards (daily claims, streak, coins) - Phase 10: Profile (player card, stats, settings, logout) - Phase 11: Shop (cosmetics, purchase flow, equip) - Phase 12: Rank (leaderboard, tournaments, registration) - Phase 13: Puzzles (chess training with rating) - Phase 14-16: All APIs, polish, deployment config Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Two problems: 1. --board-light and --board-dark CSS vars were in deleted app.css → Added all chess board CSS vars to el3ab.css :root 2. .board-wrapper layout broken in our flex context → Added explicit override: aspect-ratio:1, position:relative → Kill the ::before padding hack (use aspect-ratio) → Force .board to position:absolute;inset:0;width:100%;height:100% Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The board was empty because: 1. Scripts cached from previous nav resolved immediately 2. Board/Game singletons kept stale DOM references 3. Race condition between DOM render and script execution Fix: - Remove existing script tags before re-adding (forces re-execution) - Load scripts SEQUENTIALLY (chess.min → openings → board → game) - requestAnimationFrame before script loading (DOM settle) - Explicit document.getElementById('board') check before Board.init Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The board was invisible because: - board.js sets `this.el.className = 'board'` (8x8 grid) - chessboard.css .board uses `width:100%; height:100%` — needs a sized parent - The CSS expects a `.board-wrapper` parent with padding-top:100% trick - I was using a custom `.board-container` with aspect-ratio which doesn't work Fixed: all game screens now use `.board-wrapper > #board` structure which chessboard.css already handles (position:relative + padding-top:100% for the wrapper, position:absolute + inset:0 for the board grid). Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Created puzzles table in Supabase with RLS - Seeded 20 Arabic chess puzzles (rating 500-1400) - Fixed daily puzzle offset (was % 100, now % actual count) - Added puzzle_rating, puzzle_streak, best_puzzle_streak to profiles - Fixed ELO defaults (new profiles now get 1200 instead of 0) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
/game — Full chess vs bot: - Complete DOM (17 elements game engines need) - Loads chess.min.js → openings.js → board.js → game.js in order - Clocks, move list, opening display, thinking indicator - Resign, draw, flip buttons - Immersive mode (header/nav hide) /game-live — Multiplayer chess: - Realtime subscription for opponent moves - Draw offer banner (accept/decline) - Same full DOM as bot game /analysis — Post-game analysis: - Eval bar with animated fill - Eval graph canvas - Move navigation (first/prev/next/last) - Player accuracy percentages - Critical moments highlight - Engine analysis button /puzzles — Chess puzzles: - Daily (5 per day with dot progress) - Streak mode - Rush mode (timed) - Tab switching between modes /matchmaking — Animated opponent search: - Radar ring pulse animation - Timer counting up - Auto-poll API every 2s - Cancel button returns to lobby CSS additions: - Chess game layout (flexbox centered, responsive board) - Clock styles (active=gold, low=red+pulse) - Move list compact style - Matchmaking radar animation Also: chessboard.css now loaded in <head> globally Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
CSS: - Button ripple effect (radial gradient follows finger position) - Gold button glow pulse (breathing box-shadow) - Gold button shimmer sweep (light streak animation) - Game card entrance pop (staggered scale+fade per card) - Game card icon float (subtle idle bob animation) - Game card hover glow (radial light on press) - Nav active indicator (animated bar slides in) - Nav tap bounce (scale down on press) - Streak claim celebration (pop + color change) - Page transition (fade+slide on every screen change) - Section stagger (each section fades in sequentially) - Activity items slide in (staggered translateX) - Chip selection pop (scale bounce on select) - Input focus glow (cyan ring) - Brand logo pulse on tap - Online dot ping ring (expanding ripple) - Login brand float (idle vertical bob) - Ambient background (slow-moving radial gradients) - Toast in/out animations - Card shadow compression on press - Counter tick scale animation JS: - Haptic feedback on every interactive element (pointerdown) - Web Audio API synthesizer (tap, click, coin, win, error sounds) - Ripple position tracking (--ripple-x, --ripple-y CSS vars) - tickCounter() for animated number updates Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
The ES modules approach was overengineered and broken: - Import maps failed silently - Game engines couldn't find window.App - Nothing was responsive New approach: everything in index.php + one CSS file. - Loads public/js/app.js (game engines need App.fetch, App.toast etc) - Simple defineScreen() router — no modules, no imports, no build step - Chess game works: loads chess.min.js + board.js + game.js, enters immersive mode - Ludo/Domino/Backgammon lobbies create games via API - All screens responsive (max-width adapts, clamp() on hero heights) - Visual identity from DESIGN.md: game-specific gradients, 20px radius cards, gold brand - Header shows level + coins + gems (the game currencies, not chess ELO) - DESIGN.md added as the visual specification document Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 02 Jun, 2026 5 commits
-
-
Mahmoud Aglan authored
feat: all screens built — chess lobby, profile, leaderboard, friends, shop, achievements, settings, ludo/domino/backgammon lobbies Phase 2+3 complete: - Chess lobby: full time control picker, bot selector, multiplayer search - Chess game: wraps Board + Game engines in immersive mode - Ludo lobby: player count, bot difficulty, room codes - Domino lobby: 2P/4P teams, difficulty, room codes - Backgammon lobby: match length, room codes - Profile: XP bar, per-game ratings, economy, stats - Leaderboard: multi-game + multi-mode selector - Friends: list, requests, search, add - Shop: categories, buy with coin burst particles, equip - Achievements: grid with progress tracking - Settings: sound toggle, logout - Fix: router import bug in main.js Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
DELETED: - All 50+ PHP pages, templates, includes - app.css and app-v2.css (1782 + 700 lines of accumulated CSS) CREATED: - app/core/ — SPA engine (router, state, api, audio, haptics, particles, animate) - app/screens/ — ES module screens (home, login + placeholders for all routes) - app/styles/ — Design token system + animations + components - index.php — now serves SPA shell for all non-API routes ARCHITECTURE: - Vanilla JS SPA with ES Modules (no build step, no framework) - History API router with animated transitions - Web Audio API synthesizer for game sounds - Canvas particle system (confetti, coin bursts) - Web Animations API for juice (number tickers, fly-to, pop, shake) - Haptic feedback patterns via navigator.vibrate - Game engines load on-demand as classic scripts (zero modifications) API endpoints (24) completely unchanged. Game engine JS (25 files) unchanged. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- Sidebar: games (شطرنج/لودو/طاولة/دومينو) are the primary nav items - Removed "العب الان" chess-only play button from sidebar - Removed floating chess FAB from mobile nav - Mobile nav: 5 tabs (home/games/leaderboard/social/profile) - Header: shows account level instead of chess ELO - Home page: games grid is the hero, no chess matchmaking widget - Removed all chess-specific time control UI from home page - Each game's lobby page handles its own matchmaking Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- New player_game_ratings table (any game, any mode, ELO + W/L/D + streaks) - New /api/ratings.php — unified ratings API (player, leaderboard, history, modes) - game.php dual-writes to new table on chess game end - ludo.php now tracks ELO + XP + coins on game completion - Full v2 design system (app-v2.css) — WCAG AA, component-driven - Redesigned: home, profile, leaderboard, play, login pages - New nav: 4-tab mobile + floating play FAB + grouped desktop sidebar - XP level titles now game-neutral (مبتدئ → استاذ → اسطورة) - Leaderboard supports all games with mode selector Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 31 May, 2026 1 commit
-
-
Mahmoud Aglan authored
The PATCH to profiles was using user token which fails due to RLS. Now uses SUPABASE_SERVICE_KEY. Also fixed system_config query auth. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
- 30 May, 2026 11 commits
-
-
Mahmoud Aglan authored
- Added missing data-panel="chess" HTML section for field rendering - Reorganized sidebar into logical groups with Arabic headers: عام (General): Colors, Spacing, UI, Assets, Icons, Bots شطرنج (Chess): Board Colors, Game Styling, Pieces, Move Classes ألعاب أخرى (Other Games): Ludo, Domino, Backgammon Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
-
Mahmoud Aglan authored
Converted all hardcoded chess board values to CSS custom properties: - Board: radius, shadow, border, max-width - Pieces: size, white/black colors, stroke, shadow, hover/drag scale - Legal moves: dot size, capture ring size/border - Clock: bg, active bg, radius, font-size, padding - Coordinates: size, weight - Side panel: width, bg, radius - Move list: font-size - Eval bar: width, radius - Game header: padding, radius, bg, player/rating font sizes All 32 variables exposed in admin theme under "♟ Chess Styling" section with text inputs for full customization of every single value. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Admin Theme New Sections: -
📐 Spacing & Layout: 9 range sliders for border-radius, content-max, header-h, nav-bottom-h, card-padding, section-gap, touch-min -🎲 Domino: 5 color pickers for game theming -🎯 Backgammon: 8 color pickers for board/checker/felt colors -🎨 Icons Grid: per-icon upload (31 icons individually replaceable) RGBA Picker: - Color input + alpha slider (0-100%) for rgba-based CSS variables - Live preview, outputs rgba() string - Applied to: board highlights, overlays, borders Per-Icon Override: - Individual SVG/PNG upload per icon - Runtime: replaces SVG <use> with <img> element - Resolution guide: "24×24px SVG مفضل" Upload Resolution Guides: - Pieces: 128×128px - Logo: 200×40px - Favicon: 32×32px - Icons: 24×24px - Sprite: SVG 24px viewBox All changes live-effective via CSS variable injection + runtime JS. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Problems fixed: - Analysis no longer freezes (was sending all positions in one request) - Now analyzes position-by-position with live progress updates - Progress bar shows "تحليل النقلة 5 من 30" with fill animation - Fallback: loads moves from moves[] array when PGN is empty - Added 'cache' API action to save analysis results with service key - Fixed curl handle leak (unset → proper handling) Flow: click analyze → progress bar fills per move → results render → cached Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Time Controls: - 4 categories: Bullet (1+0, 1+1, 2+1), Blitz (3+0, 3+2, 5+0, 5+3), Rapid (10+0, 10+5, 15+10, 20+0), Classical (30+0, 30+20, 45+0, 60+0) - Category tabs with dynamic option switching - Both multiplayer and custom game sections ELO: - Default starts at 0 (was 1200) - DB columns altered: DEFAULT 0 - Floor at 0 (was 100) - FIDE calculation unchanged (K-factor based on games played) Bot games: - Always rated=false (removed toggle) - Shows "مباراة تدريبية (غير مصنفة)" instead of rated toggle - Quick match also unrated Premove: - Selected square now visually highlighted during opponent's turn - premove-from class applied immediately for visual feedback Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- game.js now sends moves array + move_count alongside PGN - API uses SUPABASE_SERVICE_KEY instead of user token for PATCH (user token may lack permission to update matches table) - Handles moves as array or string - This fixes analysis page showing "no moves" after game ends Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Both bot games and live multiplayer games now show a gold "تحليل اللعبة" button in the result overlay that navigates to /analysis?id={gameId}. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Both sides now use ♚♛♜♝♞♟ (solid filled shapes). White: color #fff + 1px #555 stroke = solid white with dark outline Black: color #222 + 1px #000 stroke = solid dark with black outline Both look equally solid/filled, just different colors. Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
Coordinates now inside squares with contrasting colors: - Rank numbers: top-left of left column, alternating light/dark - File letters: bottom-right of bottom row, alternating dark/light - No separate border/padding needed - Board: no thick border, just subtle shadow - Clean minimal look matching Chess.com mobile Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
Mahmoud Aglan authored
- White pieces: 0.5px #444 stroke (subtler outline, looks more solid) - Coordinates: moved outside board (bottom -22px, left -20px) - Coords larger (12px), centered, light grey (#aaa) - Board wrapper: padding for coord space (22px left, 22px bottom) Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-