miruzo-core is the backend and ingest core for the miruzo photo archive. The API serves image listing/context/love endpoints, and the ingest tooling imports gataku assets into supported database backends.
- Go API for image browsing and reaction workflows
- Python ingest pipeline for importing and processing source assets
- Shared support for MySQL, PostgreSQL, and SQLite
- Generated SQL access via sqlc for Go repositories
Human-friendly size units are not universal and are shaped by culture and convention.
miruzo defines manbytes, a size unit based on a 104-byte scale (the Japanese “man” unit), and uses it in API responses for image file sizes.
For details, see docs/unit.md.
miruzo: Go API application, SQL/migrations, Makefilemiruzo-py: Python ingest services, DB adapters, tests
- Git
- Go 1.26.x (see
miruzo/go.mod) - Python 3.10+ (3.14.x recommended for local development; see
miruzo-py/.python-version) uv(Python package/dependency manager)
Backend/runtime matrix:
| Backend | Version | Go driver | Go API | Python driver |
|---|---|---|---|---|
| MySQL | 8.0.16+ (CHECK) |
go-sql-driver/mysql |
supported | mysqlclient (MySQLdb) |
| PostgreSQL | 14+ | jackc/pgx/v5 |
supported | psycopg3 (psycopg) |
| SQLite | 3.37.0+ (RETURNING, STRICT) |
mattn/go-sqlite3 |
supported | sqlite3 (stdlib) |
Release/distribution notes:
- Official Linux and Windows release binaries are built on Debian 12.
- Linux release binaries target a minimum expected glibc version of 2.36.
- macOS is supported on a best-effort basis, but official release binaries are not provided.
For source development setup, follow
CONTRIBUTING.md:
- prerequisites and backend version requirements
- Linux/macOS setup for Go tools and Python DB drivers
- runtime configuration and test environment variables
Prebuilt binary releases are planned. Until then, use source setup.
- Base file:
miruzo/internal/app/config.sample.yaml - Local default file:
miruzo/config.yaml - Current Go API backends:
mysql,postgresql,sqlite
- Copy
miruzo-py/.env.developmenttomiruzo-py/.env - Set these variables explicitly:
ENVIRONMENT(developmentorproduction)DATABASE_BACKEND(mysql,postgres, orsqlite)DATABASE_URL- MySQL:
mysql+mysqldb://... - PostgreSQL:
postgresql+psycopg://... - SQLite:
sqlite:///...
- MySQL:
- Path-related variables (
MEDIA_ROOT,PUBLIC_MEDIA_ROOT,GATAKU_ROOT,GATAKU_ASSETS_ROOT,GATAKU_SYMLINK_DIRNAME) can be left as defaults on first setup, then customized only when needed.
Start API:
cd miruzo
make dev
# or
cd miruzo && go run ./cmd/miruzo-apiDefault API address: http://127.0.0.1:1360/api
Run importer help:
cd miruzo-py
uv run python -m scripts.gataku_import --helpDefault suites:
cd miruzo && go test ./...
cd miruzo-py && uv run pytestFocused suites:
cd miruzo && go test ./internal/service/...
cd miruzo && go test ./internal/adapter/persistence/contract/...
cd miruzo && go test -tags integration \
./internal/adapter/persistence/mysql \
./internal/adapter/persistence/postgres
cd miruzo-py && uv run pytest tests/importers
cd miruzo-py && uv run pytest tests/persistOptional test database DSN environment variables:
- Go tests:
MIRUZO_TEST_MYSQL_URLMIRUZO_TEST_POSTGRES_URL
- Python tests:
MIRUZO_PY_TEST_MYSQL_URLMIRUZO_PY_TEST_POSTGRES_URL
This project is licensed under GNU GPLv3. See LICENSE.
See:
- miruzo-web — Solid.js frontend that consumes the core APIs
- gataku — Source asset repository used by the importer
miruzo-core is developed and maintained by mntone.
- GitHub: https://github.com/mntone
- Mastodon: https://mstdn.jp/@mntone
- X: https://x.com/mntone