d-back
π Project Summary
This project sits between d-cogs and d-zone as part of a larger system.
d-back is the backend WebSocket server, written in Python. It receives real-time Discord events from d-cogs, a Red-DiscordBot plugin, and passes that data along to d-zone, a web frontend that visualizes user activity as an ambient simulation.
d-back is a lightweight Python module that implements both WebSocket communication and basic static file serving. It acts as the middle layer between a data source and frontend visualization β particularly tailored for driving d-zone.
The project is published on PyPI and supports:
- Python 3.8 to 3.13
- WebSockets library versions 10 through 16
This broad compatibility is intentional β I wanted d-back to be usable across a wide variety of Python environments.
βοΈ Key Features
- π‘ WebSocket server for live data broadcasting
- π§Ύ Static file serving (optional) can be used to serve d-zone
- π§ Callback interface: allows registering custom handlers (e.g. for user presence, messages)
- π§ͺ Fallback mock mode when no callback is registered β useful for development or testing
- π Optional OAuth2 authentication: protects endpoints when desired
- π Broadcasts key events, such as message sends or presence updates, to connected clients
- β Test matrix covers every supported Python/WebSocket version combination to ensure cross-version stability
π§ What I Learned
This was the first Python project in a long time where I could start fresh and define structure from the ground up.
- It was also my first time publishing a package to PyPI, which helped me understand packaging and distribution workflows more deeply
- I learned more about the Python ecosystemβs core configuration files, such as
setup.cfg,pyproject.toml - Writing the version-spanning test matrix pushed me to think more modularly about dependencies and compatibility
- I plan to generate full project documentation in the future β mainly to deepen my understanding of Python tooling
Now that d-back supports a wide range of Python and WebSocket versions, I could finally move on to the next step: implementing real-time Discord data via registered callbacks β powered by d-cogs.