Skip to content

d-back Documentation

WebSocket server for Discord integration with d-zone ambient life simulation

Welcome to the official documentation for d-back – the intelligent backend service that powers the magical d-zone ambient life simulation! d-back serves as the real-time bridge between Discord servers and the beautiful d-zone frontend, creating an immersive experience where every Discord user becomes part of a living, breathing digital ecosystem.

d-zone is an ambient life simulation where the presence and activity of users in a Discord server subtly influence a living digital environment. Think of it as a digital terrarium that reacts to your community's energy! d-back provides real-time user data through WebSocket connections, making this seamless integration possible.


  • Getting Started


    Install and run your first WebSocket server in minutes

    Get Started

  • User Guide


    Learn how to configure and customize d-back for your needs

    User Guide

  • API Reference


    Explore the complete API documentation with detailed examples

    API Reference

  • Developer Guide


    Contribute to the project and extend its functionality

    Developer Guide


Key Features

WebSocket Server

Real-time bidirectional communication with the d-zone frontend, supporting multiple concurrent connections and efficient message broadcasting.

User Activity Simulation

Sophisticated mock Discord user data with realistic presence states (online, idle, DND, offline) perfect for development and testing.

Multi-Server Support

Handle multiple Discord servers simultaneously, each with their own user lists and configurations.

OAuth2 Ready

Built-in support for Discord OAuth2 authentication, allowing secure user validation and server access control.

Static File Serving

Serve frontend assets directly from the backend (websockets 10.0+), simplifying deployment and hosting.


Quick Example

Get started with d-back in just a few lines of code:

import asyncio
from d_back.server import WebSocketServer

async def main():
    # Create server instance
    server = WebSocketServer(port=3000, host="localhost")

    # Optional: Set up custom callbacks
    server.on_get_user_data(my_user_data_callback)
    server.on_get_server_data(my_server_data_callback)

    # Start the server
    print("Starting d-back server...")
    await server.start()

# Run the server
asyncio.run(main())

Or use the command-line interface:

# Start with default settings
python -m d_back

# Custom configuration
python -m d_back --port 8080 --host 0.0.0.0 --static-dir ./my-frontend

Project Information

Last Commit Build Status PyPI License: MIT Python

Repository: NNTin/d-back on GitHub
Package: d-back on PyPI
License: MIT License
Python: 3.8 or higher


Next Steps

Ready to dive in? Here's what you should explore next:

  1. Getting Started - Install d-back and run your first server
  2. Mock Data Capabilities - Learn about the comprehensive mock data system for testing without Discord API access
  3. d-zone Frontend - Explore the beautiful frontend that brings your Discord community to life
  4. API Documentation - Discover all the callback hooks and customization options

Development Ready

d-back comes with pre-configured mock Discord servers and realistic user data, making it perfect for development, testing, and demonstration purposes. No Discord API keys required to get started!


Built with ❤️ for the d-world ecosystem