A self-hosted manga library. Scrapes metadata from MangaDex and Atsu.moe, stores images in S3, and serves them through a web reader — single binary, no CGO.
For educational purposes only. See license.
cp .env.example .env
make staging-up # starts app at http://localhost:8080
make staging-down # teardownmake init # install tools + deps
make dev-backend # Go API with hot-reload (localhost:8080)
make dev-web # Vite dev server (localhost:5173, proxies /api)
make dev-reset # wipe volumes and library filesmake prod-build # → bin/manhesSwagger UI: http://localhost:8080/swagger/index.html
GET /api/v1/manga List catalog (paginated, filterable)
GET /api/v1/manga/{mangaId} Manga detail
GET /api/v1/manga/{mangaId}/{lang} Chapters for a language
GET /api/v1/read/{chapterId} Chapter pages
GET /api/v1/dictionary?q=... Search sources
POST /api/v1/dictionary/refresh Refresh a dictionary entry
Event-driven pipeline: POST /dictionary/refresh → scrapes sources → downloads chapters → uploads to S3 → serves via web reader.
- Background daemon —
IngestDaemonruns every 4h (configurable viaDICTIONARY_REFRESH_INTERVAL), refreshes available/fetching manga and cleans up orphaned disk dirs. - Event bus — in-memory pub/sub via goroutines, no external broker.
- Scrapers — MangaDex (priority 1) and Atsu.moe, pluggable via
Scraperinterface.
domain/— pure Go, zero external imports. Defines interfaces.handler/— HTTP only, depends on domain interfaces.infrastructure/— implements domain ports, never imported bydomain/.
See .env.example. Key ones:
| Variable | Default | Description |
|---|---|---|
DB_HOST |
localhost |
MySQL host |
DB_PORT |
3306 |
MySQL port |
DB_USER / DB_PASS |
manhes |
Credentials |
DB_NAME |
manhes |
Database name |
S3_ENDPOINT |
minio:9000 |
MinIO/S3 endpoint |
S3_BUCKET |
manga |
Bucket name |
DICTIONARY_REFRESH_INTERVAL |
4h |
Daemon refresh interval |
- Create
internal/infrastructure/scraper/{name}/adapter.goimplementingdomain.Scraper - Register in
BuildScraperRegistryincmd/manhes/wiring.gowith a priority value - Add
BaseURL/RateLimitfields toconfig/and.env.example
MIT — Copyright (c) 2026 dimasbaguspm
Non-commercial use only. For personal and educational purposes only.