npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mugiwara-plugin-source-mangadex

v1.0.2

Published

MangaDex source plugin for Mugiwara manga reader - imports manga from mangadex.org

Readme

MangaDex Source Plugin for Mugiwara

A built-in source plugin for Mugiwara manga reader that enables importing manga from MangaDex.

Status

This is an internal built-in plugin that comes pre-installed with Mugiwara. It is not published to NPM and is automatically registered when the server starts.

Features

  • Search: Search for manga by title on MangaDex
  • Metadata: Automatic fetching of manga metadata including:
    • Title and alternative titles
    • Description
    • Author and artist information
    • Cover image
    • Genres and tags
    • Publication status
  • Chapters: Browse and download chapters with:
    • Support for multiple languages (configurable)
    • Chapter sorting and ordering
    • Page-by-page streaming download
    • Automatic retry on failures
  • Rate Limiting: Built-in rate limiting to respect MangaDex's API

Configuration

The plugin can be configured via the Mugiwara server configuration:

interface MangaDexConfig {
  // Base URL for MangaDex API (default: "https://api.mangadex.org")
  baseUrl?: string;

  // Preferred languages for manga content (default: ["en"])
  // Examples: ["en", "ja", "ko", "zh"]
  preferredLanguages?: string[];

  // Use data saver mode for smaller images (default: false)
  dataSaver?: boolean;

  // Request timeout in milliseconds (default: 30000)
  requestTimeout?: number;

  // User agent for API requests (default: "Mugiwara/1.0.0")
  userAgent?: string;
}

Usage

Since this is a built-in plugin, you don't need to install anything. The source is automatically available with the ID "mangadex".

API Endpoints

Search for Manga

curl "http://localhost:3000/api/library/sources/mangadex/search?q=One%20Piece"

Get Manga Details

curl "http://localhost:3000/api/library/sources/mangadex/manga/{mangaId}"

Where {mangaId} is the MangaDex manga UUID.

Import Manga

curl -X POST "http://localhost:3000/api/library/import" \
  -H "Content-Type: application/json" \
  -d '{
    "sourceId": "mangadex",
    "sourceMangaId": "32d76d19-8a05-4db0-9fc2-e0b6068bb666",
    "storageBackendId": "default",
    "downloadAll": true
  }'

Programmatic Usage

import createMangaDexSource from "@mugiwara/source-mangadex";

// Create and initialize the source
const source = createMangaDexSource({
  config: {
    preferredLanguages: ["en", "ja"],
    dataSaver: false,
  },
});

await source.initialize({
  preferredLanguages: ["en", "ja"],
});

// Search for manga
const results = await source.search("One Piece");

// Get manga details
const manga = await source.getMangaDetails(results[0].sourceMangaId);

// Download a chapter
for await (const page of source.downloadChapter(
  manga.chapters[0].sourceChapterId,
)) {
  // page.data contains the image buffer
  // page.pageNumber is the page number
  // page.contentType is the MIME type
}

Rate Limits

This plugin implements the following rate limiting to comply with MangaDex API guidelines:

  • 100ms delay between page downloads
  • Exponential backoff on retry (1s, 2s, 3s)
  • 30-second timeout on API requests
  • Maximum 3 retries per page

License

MIT

Disclaimer

This plugin is not affiliated with MangaDex. Please respect their terms of service and API guidelines when using this plugin.