Initial commit: Shattered Void MMO foundation
- Complete PostgreSQL database schema with 21+ tables - Express.js server with dual authentication (player/admin) - WebSocket support for real-time features - Comprehensive middleware (auth, validation, logging, security) - Game systems: colonies, resources, fleets, research, factions - Plugin-based combat architecture - Admin panel foundation - Production-ready logging and error handling - Docker support and CI/CD ready - Complete project structure following CLAUDE.md patterns 🤖 Generated with Claude Code (https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
commit
1a60cf55a3
69 changed files with 24471 additions and 0 deletions
74
knexfile.js
Normal file
74
knexfile.js
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
require('dotenv').config({ path: `.env.${process.env.NODE_ENV || 'development'}` });
|
||||
|
||||
const config = {
|
||||
development: {
|
||||
client: 'postgresql',
|
||||
connection: {
|
||||
host: process.env.DB_HOST || 'localhost',
|
||||
port: process.env.DB_PORT || 5432,
|
||||
database: process.env.DB_NAME || 'shattered_void_dev',
|
||||
user: process.env.DB_USER || 'postgres',
|
||||
password: process.env.DB_PASSWORD || 'password',
|
||||
},
|
||||
pool: {
|
||||
min: parseInt(process.env.DB_POOL_MIN) || 2,
|
||||
max: parseInt(process.env.DB_POOL_MAX) || 10,
|
||||
acquireTimeoutMillis: parseInt(process.env.DB_TIMEOUT) || 60000,
|
||||
},
|
||||
migrations: {
|
||||
directory: './src/database/migrations',
|
||||
tableName: 'knex_migrations',
|
||||
},
|
||||
seeds: {
|
||||
directory: './src/database/seeds',
|
||||
},
|
||||
},
|
||||
|
||||
test: {
|
||||
client: 'postgresql',
|
||||
connection: {
|
||||
host: process.env.DB_HOST || 'localhost',
|
||||
port: process.env.DB_PORT || 5432,
|
||||
database: process.env.DB_NAME || 'shattered_void_test',
|
||||
user: process.env.DB_USER || 'postgres',
|
||||
password: process.env.DB_PASSWORD || 'password',
|
||||
},
|
||||
pool: {
|
||||
min: 1,
|
||||
max: 5,
|
||||
},
|
||||
migrations: {
|
||||
directory: './src/database/migrations',
|
||||
tableName: 'knex_migrations',
|
||||
},
|
||||
seeds: {
|
||||
directory: './src/database/seeds',
|
||||
},
|
||||
},
|
||||
|
||||
production: {
|
||||
client: 'postgresql',
|
||||
connection: {
|
||||
host: process.env.DB_HOST,
|
||||
port: process.env.DB_PORT || 5432,
|
||||
database: process.env.DB_NAME,
|
||||
user: process.env.DB_USER,
|
||||
password: process.env.DB_PASSWORD,
|
||||
ssl: process.env.DB_SSL === 'true' ? { rejectUnauthorized: false } : false,
|
||||
},
|
||||
pool: {
|
||||
min: parseInt(process.env.DB_POOL_MIN) || 5,
|
||||
max: parseInt(process.env.DB_POOL_MAX) || 20,
|
||||
acquireTimeoutMillis: parseInt(process.env.DB_TIMEOUT) || 60000,
|
||||
},
|
||||
migrations: {
|
||||
directory: './src/database/migrations',
|
||||
tableName: 'knex_migrations',
|
||||
},
|
||||
seeds: {
|
||||
directory: './src/database/seeds',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
Loading…
Add table
Add a link
Reference in a new issue