Skip to content

Comments

new version#7

Merged
DrakoMichael merged 6 commits intomainfrom
development
Jan 24, 2026
Merged

new version#7
DrakoMichael merged 6 commits intomainfrom
development

Conversation

@DrakoMichael
Copy link
Owner

This pull request introduces several improvements and refactors to the StreamChatRelay application's initialization process, configuration, and developer tooling. The main focus is on making the bootstrap process more robust and modular, adding a structured logging system, and enhancing the build workflow for JavaScript and asset files.

Key changes include:

Application Bootstrap & Initialization

  • Refactored the main application bootstrap logic into a new bootstrapApp class with an ignite method. This method initializes modules sequentially, tracks which modules were started, and logs the results using the new logging system. It also adds safer error handling and modular initialization for each component. (src/services/app/bootstrapApp.js, src/index.js) [1] [2]
  • Added a debugBootstrap class as a placeholder for future debug-related initialization, currently calling a test method on the WebSocket bootstrap. (src/services/app/debugBootstrap.js)

Logging System

  • Introduced a robust logManager class that supports multiple log levels (debug, info, warn, error, critical), colored console output, and persistent log files organized by date. This system is used throughout the bootstrap process for consistent and informative logging. (src/services/app/logManager.js)
  • Updated log output in the application to use the new logging system, providing clearer feedback on initialization status and errors. (src/services/app/bootstrapApp.js, src/index.js) [1] [2]

Build & Developer Tooling

  • Enhanced the package.json scripts to add JavaScript bundling and minification via esbuild, asset copying with cpy, and a combined build script for streamlined builds. New dependencies for these tools and for terser were added. (package.json) [1] [2]

Configuration & Documentation

  • Changed the development Express server port from 3131 to 3232 in config.json. (src/config.json)
  • Improved English translations and clarity in documentation comments, especially in index.js and bootstrapApp.js. (src/index.js, src/services/app/bootstrapApp.js) [1] [2]

Logging Output

  • Added a new log file with detailed initialization logs and error traces, demonstrating the new logging system in action. (src/logs/log_2026-01-24.txt)

These changes make the application's startup process more reliable, easier to debug, and better suited for future maintenance and feature expansion.

DrakoMichael and others added 6 commits January 22, 2026 13:14
- Added build scripts for JavaScript and asset files in package.json.
- Introduced a new backup configuration file (config_backup.js) for fallback settings.
- Updated loadSettings function to utilize the new backup configuration.
- Refactored import statements for consistency in naming conventions.
- Commented out debug-related code in bootstrapApp.js and liveChatSpam.js.
- Removed the provisional test file (provisorio_test.js) as it is no longer needed.
Refactored testLiveChatSpam to a dedicated debug zone and simplified its implementation. Added a debug method to WsFunctions. Modified express_bootstrap to return a test value when invoked with 'test', and updated its test to match. These changes improve testability and debugging support.
Refactored the application bootstrap process to use a class-based approach with robust error handling and sequential module initialization. Added new debugBootstrap and logManager modules for debugging and future logging capabilities. Updated websocket_bootstrap to a singleton class with improved initialization and instance management. Adjusted liveChatSpam to use the new websocket_bootstrap API.
Introduces a robust logManager with multi-level logging and file persistence, integrates it into bootstrapApp and loadSettings, and removes legacy logging code. Updates config.json to use a new dev_express_port, simplifies src/index.js, and stubs out index_test.js. Also cleans up unused code in dataControl.js and minor adjustments in related modules.
@DrakoMichael DrakoMichael merged commit 77fc4ba into main Jan 24, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant