p3x-redis-ui-server
Version:
ποΈ P3X Redis UI server β Socket.IO backend for the dual Angular + React frontend with AI queries, 54 languages, and auto data decompression
105 lines (75 loc) β’ 5.66 kB
Markdown
[//]: #@corifeus-header
# ποΈ P3X Redis UI server β Socket.IO backend for the dual Angular + React frontend with AI queries, 54 languages, and auto data decompression
[//]: #@corifeus-header:end
## Folder Structure
```
redis-ui-server/
βββ bin/
β βββ p3xrs.mjs # Main entry point (ES Module)
β βββ bcrypt-password.mjs # Password hash generator utility
βββ src/
β βββ index.mjs # Barrel export
β βββ lib/
β β βββ boot.mjs # Server bootstrap (Express + Socket.IO)
β β βββ cli.mjs # CLI argument parsing (Commander)
β β βββ console-stamp.mjs # Logging utilities
β β βββ http-auth.mjs # HTTP Basic authentication (bcrypt)
β β βββ check-license.mjs # License validation against network.corifeus.com
β β βββ redis-static-commands.mjs # Redis command definitions
β β βββ ioredis-cluster/ # Redis Cluster utilities (8 modules)
β βββ service/
β βββ index.mjs # Service initialization
β βββ http/ # Express HTTP server + static file serving
β βββ license/ # License enforcement middleware
β βββ socket.io/
β βββ socket.mjs # Socket.IO connection handler
β βββ shared.mjs # Shared state
β βββ request/ # Per-command request handlers (25+ modules)
βββ dist/ # Build output
βββ Gruntfile.cjs # Build tasks (CommonJS, corifeus-builder)
βββ package.json # "type": "module" (native ESM)
```
### Key Architecture Notes
- **Full ES Modules** β All source files use `.mjs` extension with `import`/`export` syntax; `package.json` has `"type": "module"`
- **Socket.IO** β Primary communication protocol (not REST) for all Redis operations
- **ioredis** β Redis client library supporting standalone, cluster, and sentinel modes
- **SSH tunneling** β `tunnel-ssh` for secure Redis connections
- **settle() pattern** β Test connection uses a settlement guard to prevent double-emit race conditions
## Exceptions
- Always log a short context plus the full exception (stack trace included).
- Never swallow errors. Rethrow or propagate unless explicitly safe to continue. Redact secrets.
- Example (do this): `catch (e) { console.error('context: saving profile failed', e); throw e }`
- Dont always try/catch, only when we needed, not always.
- Avoid micro try/catch. Do not wrap simple setters/state updates or single-line calls in individual try/catch blocks. Prefer a single, meaningful boundary (e.g., around a request handler or an async action) where you can add context and rethrow/propagate.
- Only catch when you will: (a) add context and rethrow; or (b) intentionally continue with a documented fallback that is safe. Otherwise, let errors bubble to the existing handler.
- Prefer optional chaining, guards, and validations over blanket try/catch.
[//]: #@corifeus-footer
## π Quick and Affordable Web Development Services
If you want to quickly and affordably develop your next digital project, visit [corifeus.eu](https://corifeus.eu) for expert solutions tailored to your needs.
## π Powerful Online Networking Tool
Discover the powerful and free online networking tool at [network.corifeus.com](https://network.corifeus.com).
**π Free**
Designed for professionals and enthusiasts, this tool provides essential features for network analysis, troubleshooting, and management.
Additionally, it offers tools for:
- π‘ Monitoring TCP, HTTP, and Ping to ensure optimal network performance and reliability.
- π Status page management to track uptime, performance, and incidents in real time with customizable dashboards.
All these features are completely free to use.
## β€οΈ Support Our Open-Source Project
If you appreciate our work, consider β starring this repository or π° making a donation to support server maintenance and ongoing development. Your support means the world to usβthank you!
### π About My Domains
All my domains, including [patrikx3.com](https://patrikx3.com), [corifeus.eu](https://corifeus.eu), and [corifeus.com](https://corifeus.com), are developed in my spare time. While you may encounter minor errors, the sites are generally stable and fully functional.
### π Versioning Policy
**Version Structure:** We follow a **Major.Minor.Patch** versioning scheme:
- **Major:** π
Corresponds to the current year.
- **Minor:** π Set as 4 for releases from January to June, and 10 for July to December.
- **Patch:** π§ Incremental, updated with each build.
**π¨ Important Changes:** Any breaking changes are prominently noted in the readme to keep you informed.
[**P3X-REDIS-UI-SERVER**](https://corifeus.com/redis-ui-server) Build v2026.4.371
[](https://www.npmjs.com/package/p3x-redis-ui-server) [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [](https://www.patrikx3.com/en/front/contact) [](https://www.facebook.com/corifeus.software)
[//]: #@corifeus-footer:end