feat: implement comprehensive startup system and fix authentication
Major improvements: - Created startup orchestration system with health monitoring and graceful shutdown - Fixed user registration and login with simplified authentication flow - Rebuilt authentication forms from scratch with direct API integration - Implemented comprehensive debugging and error handling - Added Redis fallback functionality for disabled environments - Fixed CORS configuration for cross-origin frontend requests - Simplified password validation to 6+ characters (removed complexity requirements) - Added toast notifications at app level for better UX feedback - Created comprehensive startup/shutdown scripts with OODA methodology - Fixed database validation and connection issues - Implemented TokenService memory fallback when Redis is disabled Technical details: - New SimpleLoginForm.tsx and SimpleRegisterForm.tsx components - Enhanced CORS middleware with additional allowed origins - Simplified auth validators and removed strict password requirements - Added extensive logging and diagnostic capabilities - Fixed authentication middleware token validation - Implemented graceful Redis error handling throughout the stack - Created modular startup system with configurable health checks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
d41d1e8125
commit
e681c446b6
36 changed files with 7719 additions and 183 deletions
15
package.json
15
package.json
|
|
@ -6,24 +6,37 @@
|
|||
"scripts": {
|
||||
"dev": "nodemon --inspect=0.0.0.0:9229 src/server.js",
|
||||
"start": "node src/server.js",
|
||||
"start:game": "node start-game.js",
|
||||
"start:dev": "NODE_ENV=development node start-game.js",
|
||||
"start:prod": "NODE_ENV=production node start-game.js",
|
||||
"start:staging": "NODE_ENV=staging node start-game.js",
|
||||
"start:quick": "./start.sh",
|
||||
"start:debug": "./start.sh --debug --verbose",
|
||||
"start:no-frontend": "./start.sh --no-frontend",
|
||||
"start:backend-only": "ENABLE_FRONTEND=false node start-game.js",
|
||||
"game": "./start.sh",
|
||||
"test": "jest --verbose --coverage",
|
||||
"test:watch": "jest --watch --verbose",
|
||||
"test:integration": "jest --testPathPattern=integration --runInBand",
|
||||
"test:e2e": "jest --testPathPattern=e2e --runInBand",
|
||||
"lint": "eslint src/ --ext .js --fix",
|
||||
"lint:check": "eslint src/ --ext .js",
|
||||
"health:check": "node -e \"require('./scripts/health-monitor'); console.log('Health monitoring available')\"",
|
||||
"system:check": "node -e \"const checks = require('./scripts/startup-checks'); new checks().runAllChecks().then(r => console.log('System checks:', r.success ? 'PASSED' : 'FAILED'))\"",
|
||||
"db:migrate": "knex migrate:latest",
|
||||
"db:rollback": "knex migrate:rollback",
|
||||
"db:seed": "knex seed:run",
|
||||
"db:reset": "knex migrate:rollback:all && knex migrate:latest && knex seed:run",
|
||||
"db:setup": "createdb shattered_void_dev && npm run db:migrate && npm run db:seed",
|
||||
"db:validate": "node -e \"const val = require('./scripts/database-validator'); new val().validateDatabase().then(r => console.log('DB validation:', r.success ? 'PASSED' : 'FAILED', r.error || ''))\"",
|
||||
"setup": "node scripts/setup.js",
|
||||
"docker:build": "docker build -t shattered-void .",
|
||||
"docker:run": "docker-compose up -d",
|
||||
"docker:dev": "docker-compose -f docker-compose.dev.yml up -d",
|
||||
"logs": "tail -f logs/combined.log",
|
||||
"logs:error": "tail -f logs/error.log",
|
||||
"logs:audit": "tail -f logs/audit.log"
|
||||
"logs:audit": "tail -f logs/audit.log",
|
||||
"logs:startup": "tail -f logs/startup.log"
|
||||
},
|
||||
"dependencies": {
|
||||
"bcrypt": "^5.1.1",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue