Your Library, Your Client

The official Dust web client is just the beginning. Dust's comprehensive REST API makes it easy to build custom clients tailored to your exact needsβ€”whether that's a mobile app, desktop application, CLI tool, or integration with your existing workflows.

Build what works for you. The Dust team encourages developers to explore the API and create their own clients to fit their unique use cases.

πŸ”Œ REST API Overview

50+
API Endpoints
10
Resource Categories

API Features

πŸ” Authentication

JWT-based authentication with HS256 signing and 24-hour token expiration

🎯 Permissions

Role-based access control with granular permission checks

πŸ“„ JSON Responses

Consistent JSON response format with comprehensive error handling

🌐 CORS-Enabled

Ready for web applications with configurable CORS support

πŸ“Š Filtering

Advanced filtering by tags, genres, authors, and more

πŸ“‘ Streaming

Efficient file streaming for books and comics

πŸ“š API Categories

Explore the complete range of Dust's API capabilities:

Authentication

  • Login / Logout
  • User registration
  • Token management
  • Profile access

Books

  • List and search books
  • Get book details
  • Stream book content
  • Filter by tags/genres

Authors

  • Browse authors
  • Author details & biography
  • Books by author
  • Author statistics

Reading Progress

  • Track current page
  • Update progress
  • Reading statistics
  • Completion tracking

Tags & Genres

  • List all tags
  • Filter by category
  • Assign tags to books
  • Genre management

Admin

  • User management
  • Role configuration
  • Permission control
  • System dashboard

πŸš€ Quick Start

Authentication Example

# Login and get JWT token
curl -X POST http://localhost:4001/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "password123"
  }'

# Response:
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "id": 1,
    "username": "user",
    "email": "user@example.com",
    "roles": ["user"],
    "permissions": ["books.read"]
  }
}

Fetching Books Example

# Get all books (with authentication)
curl http://localhost:4001/books/ \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

# Filter by genre
curl "http://localhost:4001/books/?includeGenres=Fiction,Mystery" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

# Exclude NSFW content
curl "http://localhost:4001/books/?excludeTags=NSFW" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Stream a Book

# Stream book content
curl http://localhost:4001/books/1/stream \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  --output book.epub

πŸ’‘ Client Ideas

What could you build with the Dust API?

πŸ“±

Mobile Apps

Native iOS or Android apps with offline reading, custom themes, and push notifications for new books.

πŸ–₯️

Desktop Applications

Electron or native desktop apps with system integration, keyboard shortcuts, and local caching.

⌨️

CLI Tools

Command-line interfaces for power users to manage libraries, bulk operations, and automation scripts.

πŸ“–

E-Reader Integration

Direct integration with e-readers like Kobo or Kindle for seamless syncing and downloading.

πŸ€–

Bot Integrations

Discord, Telegram, or Slack bots for library updates, reading reminders, and recommendations.

πŸ“Š

Analytics Dashboards

Custom visualizations of reading habits, collection statistics, and trends over time.

πŸ“– Resources

API Reference

Complete documentation of all endpoints, request/response formats, and authentication.

View API Docs

Codebase Analysis

Deep dive into Dust's architecture, database schema, and implementation details.

Read Analysis

Official Web Client

Reference implementation built with Lit and TypeScript. Great starting point for your own client.

Browse Source

Contributing Guide

Learn how to contribute to Dust or share your custom client with the community.

Contribute

🌟 Share Your Work

Built something cool with Dust? We'd love to see it! Share your custom clients, integrations, and tools with the community.