User Guide¶
Welcome to the d-back user guide! This comprehensive guide covers everything you need to effectively use d-back as a WebSocket server for your d-zone ambient life simulation or other real-time applications.
Introduction¶
This guide is designed for users who have already completed the Getting Started tutorial and want to dive deeper into d-back's features and capabilities. Whether you're looking to customize server behavior, integrate with real Discord data, or optimize your setup, you'll find the information you need here.
The user guide is organized into three main areas:
- Configuration: Learn how to configure d-back through command-line options, environment variables, and programmatic settings
- Callbacks & Customization: Discover how to customize server behavior using callback functions for data retrieval, authentication, and more
- Custom Data Providers: Replace mock data with real Discord API integration or your own custom data sources
Guide Structure¶
-
Configuration
Learn about command-line options, environment variables, and server settings
-
Callbacks & Customization
Customize server behavior with callback functions for data retrieval and authentication
-
Custom Data Providers
Replace mock data with real Discord API integration or custom data sources
Common Use Cases¶
Need to accomplish a specific task? Here are quick links to common scenarios:
| Scenario | Where to Look |
|---|---|
| I want to change the server port | Configuration → Command-Line Options |
| I want to serve my own static files | Configuration → Static File Serving |
| I want to use real Discord data | Custom Data Providers |
| I want to add OAuth2 authentication | Callbacks → OAuth2 Validation |
| I want to broadcast custom messages | Callbacks → Broadcasting Methods |
| I want to customize user data format | Callbacks → User Data Callback |
Quick Reference¶
Here's a summary of key concepts you'll encounter in this guide:
| Concept | Description |
|---|---|
| WebSocketServer | Main server class that handles WebSocket connections, HTTP requests, and message broadcasting |
| MockDataProvider | Built-in test data generator that simulates Discord user activity |
| Callbacks | Customization hooks that allow you to override default behavior (e.g., on_get_user_data, on_get_server_data) |
| Static File Serving | Built-in HTTP server for delivering frontend assets like HTML, CSS, and JavaScript |
| Broadcasting | Methods for sending real-time updates to connected clients (presence, messages, etc.) |
| OAuth2 Integration | Support for Discord OAuth2 authentication and token validation |
Need API Details?
For detailed API documentation including method signatures, parameters, and return types, see the API Reference.
What's Next?¶
Ready to customize your d-back setup? Start with:
- Configuration - Set up your server with the right settings
- Callbacks & Customization - Learn how to customize behavior
- Custom Data Providers - Integrate real data sources
Questions?
If you can't find what you're looking for, check the API Reference or visit our GitHub Discussions.