How guinhx/bomb-me works
• A REST API and authentication layer implemented in bomb-me-api (using NestJS and TypeScript) that provides endpoints for features like simulated OTP login, static server list and news, and initial game stage operations.
• A game-server written in TypeScript that handles gameplay logic, room/arena management, network protocols, and game sessions. This module includes subdirectories for network communications, core utilities, database migrations, command processing, and game logic.
• A crypt module that serves as a tool for encrypting and decrypting the game’s LUA code. This utility includes many LUA mission definitions and additional core scripts as well as a Node.js script (index.js) that is invoked via command-line to encrypt or decrypt files.
• Assets and UI resources that include compiled UI files (possibly generated from .plist and graphical assets) and a supporting APK editor (apkeditor.jar) suggesting that mobile client packaging is part of the workflow.
• Mobile / Game Client and Assets: Represent the game’s UI assets, compiled resources (assets, assets/compiled_ui, assets/ui) and any client-side packages.
• bomb-me-api: The Node.js/NestJS-based REST API layer which handles user authentication (simulated OTP), static screens (news and server list), and game initialization endpoints.
• game-server: The backend “game logic” server responsible for handling game sessions, network traffic, room management, and real-time gameplay operations. Include submodules such as network (TCP server, packet processing), game session management, logging, and database interaction.
• Crypt / Encryption Tool: A utility component used for encryption/decryption of LUA scripts (which include many mission definitions and AI components) for the game.
• External Tools: For example, the apkeditor.jar and the reference to GD Splitter for editing plist assets – these can be indicated as external artifact tools that interact with the project workflow.
Relationships and data flows
• Mobile clients (or the game client UI) communicate with bomb-me-api for authentication and news updates, receiving static data (like the server list).
• Bomb-me-api may serve as the front-facing entry point to the backend, with client requests directed there via HTTP/HTTPS.
• Game-server modules then handle more interactive, real-time game sessions. Although not necessarily directly connected to bomb-me-api, they share common resources (such as database files or configuration) and likely communicate with clients (or tunnel through the API).
• The crypt tool is used offline or during deployment to process/encrypt LUA scripts before they are deployed into the game assets.
Important architectural patterns and design principles
• Modular design: Notice how both bomb-me-api and game-server are organized into clearly defined controllers, services, and utilities.
• Separation of concerns: One module is responsible for general authentication and API endpoints (bomb-me-api), while another handles real-time gameplay and session management (game-server).
• Utility integration: The crypt folder represents a utility layer which supports content protection (encryption/decryption), showing the design’s concern for code security and asset preparation.
• Language and technology mix: The use of NestJS, TypeScript, and LUA (for game missions) indicates a multi-stack approach where different languages are purpose‐specific.
Additional details to capture
• How database interactions (e.g., the “game.db” file and migration scripts in game-server) support persistent state.
• External configuration files (such as knexfile.ts, tsconfig.json, and network enums) to show that the architecture is configurable.
• Importance of testability and modularity (the bomb-me-api test directory, separation into controllers, services, modules).