Use Cases
See how djust powers real-time applications across FinTech, SaaS, E-commerce, Healthcare, and Enterprise.
FinTech & Banking
Build secure, real-time financial dashboards without exposing business logic to the browser. Zero API attack surface.
Perfect For:
- ✓Trading platforms with real-time market data
- ✓Banking dashboards with live transaction feeds
- ✓Fraud detection systems with instant alerts
- ✓Portfolio management tools
Key Benefits:
- →Keep pricing algorithms on the server
- →Real-time updates via WebSocket
- →Sub-millisecond rendering for live data
Example: Trading Dashboard
from djust import LiveView
from decimal import Decimal
class TradingDashboard(LiveView):
template_name = 'trading.html'
def mount(self, request):
self.portfolio = self.load_portfolio()
self.live_prices = {}
# Subscribe to price feed
self.subscribe('market:prices')
def handle_info(self, event, data):
# Real-time price updates
if event == 'price_update':
self.live_prices[data['symbol']] = data['price']
self.update_portfolio_value()
def execute_trade(self, symbol, quantity):
# Business logic stays on server
if self.check_compliance(symbol, quantity):
self.broker.execute(symbol, quantity)
self.portfolio = self.load_portfolio() AI & Machine Learning
Stream LLM responses token-by-token, build ML dashboards with real-time metrics, and create RAG interfaces — all in Python.
Perfect For:
- ✓LLM chat interfaces with streaming responses
- ✓ML model monitoring dashboards
- ✓RAG (Retrieval-Augmented Generation) apps
- ✓AI agent control panels with live status
Key Benefits:
- →Built-in StreamingMixin for token-by-token output
- →Server push for model training progress
- →Keep API keys and model weights server-side
Example: LLM Chat with Streaming
from djust import LiveView
from djust.streaming import StreamingMixin
class AIChat(StreamingMixin, LiveView):
template_name = 'chat.html'
def mount(self, request):
self.messages = []
async def send_message(self, prompt):
self.messages.append({'role': 'user', 'content': prompt})
self.stream_start('response')
# Stream tokens as they arrive
async for token in llm.stream(prompt):
self.stream_text('response', token)
self.stream_done('response') Example: Analytics Dashboard
from djust import LiveView
from djust.decorators import debounce, cache
class AnalyticsDashboard(LiveView):
template_name = 'analytics.html'
def mount(self, request):
self._metrics = Metric.objects.all()
self.time_range = '7d'
@debounce(wait=0.5)
@cache(ttl=300, key_params=['time_range'])
def filter_metrics(self, time_range='7d'):
self.time_range = time_range
self._refresh_metrics()
def _refresh_metrics(self):
# Complex aggregation on server
self._metrics = (
Metric.objects
.filter(timestamp__gte=self.get_start_date())
.aggregate_by_hour()
)
def get_context_data(self, **kwargs):
self.metrics = self._metrics # JIT serialization
return super().get_context_data(**kwargs) SaaS Dashboards
Build data-intensive dashboards with complex aggregations, real-time updates, and responsive filtering.
Perfect For:
- ✓Analytics platforms with complex queries
- ✓Admin panels with live data tables
- ✓Monitoring dashboards with metrics
- ✓CRM tools with contact management
Key Benefits:
- →Automatic N+1 query elimination
- →Built-in debouncing and caching
- →Server-side aggregations (no client processing)
E-commerce
Create interactive shopping experiences with real-time inventory, dynamic pricing, and instant cart updates.
Perfect For:
- ✓Product catalogs with live search/filtering
- ✓Shopping carts with instant updates
- ✓Inventory management systems
- ✓Checkout flows with validation
Key Benefits:
- →Real-time inventory updates
- →Django Forms integration for checkout
- →Keep pricing logic server-side
Example: Product Search
from djust import LiveView
from djust.decorators import debounce
class ProductSearch(LiveView):
template_name = 'products.html'
def mount(self, request):
self._products = Product.objects.filter(active=True)
self.search_query = ''
self.category = 'all'
@debounce(wait=0.3)
def search(self, value='', **kwargs):
self.search_query = value
self._refresh_products()
def filter_category(self, category='all'):
self.category = category
self._refresh_products()
def add_to_cart(self, product_id: int):
product = Product.objects.get(id=product_id)
# Check inventory server-side
if product.inventory > 0:
self.cart.add(product)
self.success = f'Added {product.name}'
def _refresh_products(self):
queryset = Product.objects.filter(active=True)
if self.search_query:
queryset = queryset.filter(
name__icontains=self.search_query
)
if self.category != 'all':
queryset = queryset.filter(category=self.category)
self._products = queryset Healthcare
HIPAA-compliant patient portals, EHR systems, and medical device dashboards with maximum security.
Perfect For:
- ✓Patient portals with medical records
- ✓Real-time vital signs monitoring
- ✓Appointment scheduling systems
- ✓Lab results dashboards
Key Benefits:
- →Zero API attack surface (HIPAA compliance)
- →Server-side access control
- →Audit logs for all data access
- →Real-time vital signs updates
Enterprise Internal Tools
Rapidly build internal tools, admin panels, and workflow automation with minimal JavaScript.
Perfect For:
- ✓Admin dashboards for operations teams
- ✓Data entry and approval workflows
- ✓Internal reporting tools
- ✓Configuration management interfaces
Key Benefits:
- →10x faster development than React SPAs
- →Leverage existing Django models/forms
- →Zero build step complexity
- →Easy to maintain and extend
Real-Time Collaboration
Multi-user applications with presence indicators, live cursors, and instant synchronization.
Perfect For:
- ✓Chat applications and messaging
- ✓Collaborative document editing
- ✓Project management tools
- ✓Live polling and surveys
Key Benefits:
- →Built-in WebSocket pub/sub
- →PresenceMixin for real-time user tracking
- →LiveCursorMixin for collaborative cursors
- →10,000+ concurrent connections per server
- →Redis backend for horizontal scaling
Example: Collaborative Editor
from djust import LiveView
from djust.presence import PresenceMixin
from djust.cursors import LiveCursorMixin
class CollabEditor(PresenceMixin, LiveCursorMixin, LiveView):
template_name = 'editor.html'
def mount(self, request):
self.document = Document.objects.get(id=self.doc_id)
self.track_presence(request.user)
def on_presence_change(self, presences):
# Auto-called when users join/leave
self.online_users = presences
def update_content(self, content):
self.document.content = content
self.document.save()
self._broadcast('content_updated') Ready to Build Your Application?
Explore examples or dive into the documentation to see how djust fits your use case.