80 Commits

Author SHA1 Message Date
3c42ed93d4 Fix deployment script path for production server
- Updated PROJECT_DIR to /home/github2/apps/app-connect5
- Matches actual production server directory structure
2025-12-21 15:57:09 +11:00
2f3b975003 Add production deployment script and guide
- Created automated deploy-production.sh script
- Added comprehensive PRODUCTION_DEPLOY.md guide
- Includes troubleshooting and Apache configuration
- Ready for production deployment
2025-12-21 15:50:38 +11:00
054cbf3e77 Migrate database from MySQL to Supabase PostgreSQL
- Added @supabase/supabase-js client library
- Rewrote database.js to use Supabase API
- Updated server.js health check for Supabase
- Updated db.config.example.js with Supabase format
- Created comprehensive SUPABASE_SETUP.md guide
- Added SQL schema files for easy deployment
- Updated README_DB_CONFIG.md for Supabase

Benefits:
- Managed PostgreSQL database
- Built-in Row Level Security
- Real-time capabilities
- Easy monitoring via dashboard
- Free tier for development
2025-12-21 15:40:57 +11:00
5238fc8d22 Enhanced SQL connection monitoring and diagnostics - Added detailed database status monitoring with retry functionality - Improved error handling and logging for SQL connections - Updated UI with connection status indicators and error banners 2025-12-20 15:50:34 +11:00
e7c8d890b9 Add database status bar with connection, latency, and write capability monitoring 2025-12-15 21:20:29 +11:00
bcf3b0a032 FEATURE: Migrate username storage from localStorage to IndexedDB
- Created storage.js wrapper with IndexedDB support
- Automatic fallback to localStorage if IndexedDB unavailable
- Updated all username storage calls to use async API
- Better performance and more storage capacity
- Improved PWA compatibility

Benefits:
- 50MB+ storage vs 5-10MB localStorage
- Async API doesn't block main thread
- Better for future features (game history, stats, etc.)
2025-12-14 12:15:16 +11:00
bc76e7aab1 FIX: Prevent multiplayer initialization before game is ready
- Add polling mechanism to wait for window.game initialization
- Disable multiplayer button until game is fully initialized
- Enable button in DOMContentLoaded after game creation
- Prevents 'Game instance not found' error on production

This fixes the critical issue where clicking Multiplayer too quickly
would fail because window.game wasn't ready yet.
2025-12-14 12:07:13 +11:00
8b275de519 CRITICAL FIX: Resolve race condition in socket listener setup
- Set up all socket listeners BEFORE connection completes
- Remove nested 'connect' listener that caused race condition
- Add comprehensive logging for registration flow
- Update all listeners to use socket parameter
- Fix window.multiplayerClient reference in retry link

This fixes the 'Registering...' stuck state issue.
2025-12-13 21:35:47 +11:00
831aa0856d Add debug logging and fix registerPlayer UI feedback 2025-12-13 20:55:30 +11:00
b57611f0c4 Fix variable scope: Ensure global access to game and multiplayer client 2025-12-13 20:34:07 +11:00
dbc3f40019 Fix Join Multiplayer race condition: Save username before socket ready 2025-12-13 20:18:44 +11:00
0739ab6257 Improve UX: Prompt for username immediately in multiplayer 2025-12-13 20:17:23 +11:00
2d34ceb8bd Fix production connection: Remove bad proxies, add UI feedback 2025-12-13 20:13:29 +11:00
864048ab15 Update README.md 2025-12-13 20:02:06 +11:00
d959102db3 Fix multiplayer connection: Add redundant proxies and Socket.io CDN 2025-12-13 19:54:13 +11:00
3e8eed4eaf Security: Move database credentials to separate config file 2025-12-13 19:29:49 +11:00
858a5e52d4 Fix: Use dynamic server URL for Socket.io connection (production fix) 2025-12-13 19:21:29 +11:00
c4b5473586 Update README.md 2025-12-13 15:29:29 +11:00
930d879c28 Update README.md 2025-12-13 15:24:56 +11:00
a9054e481b Update game description in README.md
Removed a smiley face from the game description.
2025-12-13 15:23:43 +11:00
b8cd4c38ef Fix formatting in README.md 2025-12-13 15:22:19 +11:00
4bdf5ebb1c Fix typo in README.md description 2025-12-13 15:20:08 +11:00
0b24e2b3f6 Remove sensitive database screenshot from README 2025-12-13 15:15:24 +11:00
cb2b9771fe Add Play Online link and remove logo from README 2025-12-13 15:13:52 +11:00
7f4ec626af Add real game screenshots to README 2025-12-13 15:11:46 +11:00
f923ab6f90 Add comprehensive README with documentation and features 2025-12-13 15:09:04 +11:00
e06ab2457d Fix auto-login loading players bug 2025-12-13 15:06:18 +11:00
a7f3bf9b9e Add localStorage username persistence for auto-login 2025-12-13 15:02:30 +11:00
9465409b2f Add complete multiplayer system with real-time gameplay, challenge system, and 50x50 board option 2025-12-13 14:59:44 +11:00
57f350274e Initial commit: Connect-5 premium Gomoku game with multiple board sizes 2025-12-13 13:47:41 +11:00