How innocentdiaz/grandquest works
Project type and purpose
• This is a back-end API for “GrandQuest,” implemented in Node.js using a monorepo structure.
• It exposes both REST endpoints (via Express) and real-time interfaces (via a SocketServer).
• It embeds a game “engine” module (controllers + in-memory or persisted store) and a “data” module of static game definitions.
• It integrates with external services: PostgreSQL (persistent state), Redis (caching/session), AWS S3 (assets), Discord (notifications), Sentry (error logging).
File structure
• Top‐level: config files (.circleci, Procfile), entry point (index.js), monorepo packages/ folder.
• packages/data: static game constants (attacks, items, entities…).
• packages/engine: core game logic (controllers/combatRoom.js, world.js, plus store.js).
• packages/express: HTTP layer—middleware, route handlers (auth, player, forum, leaderboards, devlog), and tests.
• packages/socketServer: WebSocket handlers for combat and shops.
• packages/services: wrappers for AWS SDK, Discord, PostgreSQL pool + migrations, Redis.
• packages/sentry.js: global error‐reporting initializer.
README for architecture hints
• Confirms tech stack (Node.js, Express, PostgreSQL, Redis, AWS SDK).
• Describes runtime (dev hot-reload, Mocha/Chai tests).
• Environment variables outline external dependencies (DB, Redis, AWS, JWT, bcrypt).
Detail but avoid over-complexity
• Versioned migrations under the PostgreSQL component if desired.
• Detail the layers (transport vs. business vs. persistence) without cluttering with implementation minutiae.