{"_id":"@cyotee/manamesh-asset-pack-builder","name":"@cyotee/manamesh-asset-pack-builder","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@cyotee/manamesh-asset-pack-builder","version":"0.1.0","description":"Browser UI (and npx server) for scraping card images and building ManaMesh asset packs","type":"module","engines":{"node":">=20.0.0"},"bin":{"manamesh-asset-pack-builder":"bin/cli.js"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/cyotee/manamesh-asset-pack-builder.git"},"license":"MIT","scripts":{"dev":"vite","build":"tsc -b && vite build","preview":"vite preview","lint":"eslint .","prepublishOnly":"npm run build","start":"node ./bin/cli.js"},"dependencies":{"fflate":"^0.8.2","react":"^18.3.1","react-dom":"^18.3.1"},"devDependencies":{"@eslint/js":"^9.36.0","@types/node":"^22.5.5","@types/react":"^18.3.5","@types/react-dom":"^18.3.0","@vitejs/plugin-react":"^4.3.1","eslint":"^9.36.0","eslint-plugin-react-hooks":"^5.1.0","eslint-plugin-react-refresh":"^0.4.12","globals":"^15.9.0","typescript":"^5.6.2","typescript-eslint":"^8.0.1","vite":"^5.4.8"},"_id":"@cyotee/manamesh-asset-pack-builder@0.1.0","bugs":{"url":"https://github.com/cyotee/manamesh-asset-pack-builder/issues"},"homepage":"https://github.com/cyotee/manamesh-asset-pack-builder#readme","_integrity":"sha512-FW054sRc/DcnCrWA5hwoOrL8Lmxiiuxa1wpU3pt6OYfY/EEAt6dykHflxdDuWEMxnNmHfY8JcBYN46Yq9NQW/w==","_resolved":"/private/var/folders/28/y_7zd8pd2sl_jtwdj8y7hbb00000gn/T/grok-npm-publish-2595/cyotee-manamesh-asset-pack-builder-0.1.0.tgz","_from":"file:cyotee-manamesh-asset-pack-builder-0.1.0.tgz","_nodeVersion":"22.23.1","_npmVersion":"12.0.1","dist":{"integrity":"sha512-FW054sRc/DcnCrWA5hwoOrL8Lmxiiuxa1wpU3pt6OYfY/EEAt6dykHflxdDuWEMxnNmHfY8JcBYN46Yq9NQW/w==","shasum":"7fdfc363b319c61f35fa9d22eaeda1a66d8b197b","tarball":"https://registry.npmjs.org/@cyotee/manamesh-asset-pack-builder/-/manamesh-asset-pack-builder-0.1.0.tgz","fileCount":10,"unpackedSize":197912,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC7DeZ0uzGqEhetCWlgC2jSUBRgxDbDja098QrmqgMWFwIhAMmn9ozrXYaw9878V9tD4Q7Y26nF6CriBa90XjjIKzm5"}]},"_npmUser":{"name":"cyotee","email":"not_cyotee@proton.me"},"directories":{},"maintainers":[{"name":"cyotee","email":"not_cyotee@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/manamesh-asset-pack-builder_0.1.0_1784365606320_0.2964738974074852"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-18T09:06:46.097Z","0.1.0":"2026-07-18T09:06:46.451Z","modified":"2026-07-18T09:06:46.761Z"},"maintainers":[{"name":"cyotee","email":"not_cyotee@proton.me"}],"description":"Browser UI (and npx server) for scraping card images and building ManaMesh asset packs","homepage":"https://github.com/cyotee/manamesh-asset-pack-builder#readme","repository":{"type":"git","url":"git+https://github.com/cyotee/manamesh-asset-pack-builder.git"},"bugs":{"url":"https://github.com/cyotee/manamesh-asset-pack-builder/issues"},"license":"MIT","readme":"# ManaMesh Asset Pack Builder\n\nBrowser-based (static SPA) tool for scraping card images and building ManaMesh-compatible asset packs. It is designed to be published to IPFS so users can run the entire scraper + builder with zero installation.\n\nThis is the client-side / IPFS version of the card image scraping functionality (the Python version lives in `packages/manamesh/tools/card-scraper`).\n\n## Features\n\n- Scrape card images directly in the browser (MTG via Scryfall public API)\n- Build/repair asset packs from local image folders\n- Generate correct root + per-set `manifest.json` files\n- Write directly to your filesystem (File System Access API) or export as a single ZIP\n- Fully static — works great when served from IPFS\n\n## Prerequisites\n\n- Node.js ≥ 20\n- Yarn (this monorepo uses Yarn 4)\n\n## Running Locally\n\n### From the repository root (recommended)\n\n```bash\n# Install all workspace dependencies (only needed the first time)\nyarn install\n\n# Start the development server for this package\nyarn workspace manamesh-asset-pack-builder dev\n```\n\nThe app will be available at `http://localhost:5174` (or the next available port).\n\n### From inside the package directory\n\n```bash\ncd packages/manamesh-asset-pack-builder\nyarn install\nyarn dev\n```\n\nOpen the URL in a modern browser. For the best experience with direct filesystem writes, use a Chromium-based browser (Chrome, Edge, Brave, etc.).\n\n## Using the Tool\n\n### Scrape Images\n\n1. Go to the **Scrape Images** tab.\n2. Choose the game (currently MTG via Scryfall is fully supported).\n3. Enter set codes, e.g. `LCI,MKM,WOE`.\n4. (Strongly recommended) Click **Choose output folder**. This lets the app write images and manifests directly into a folder on your computer using the File System Access API.\n5. Click **Start Scrape**.\n6. Watch live progress. When finished you can also download everything as a ZIP as a portable backup.\n\nImages are saved in the structure the ManaMesh frontend expects:\n```\n<SET-ID>/\n  manifest.json\n  cards/\n    <card-id>.jpg\nmanifest.json   (root)\n```\n\n### Build / Package from Filesystem\n\n1. Go to the **Build & Package from FS** tab.\n2. Click **Select folder or directory** and pick a folder that contains card images (this can be output from the Python scraper, or your own organized images).\n3. Click **Build / Repair Pack**. The tool will scan the images and generate the proper `manifest.json` files.\n4. Choose how to export:\n   - **Download as ZIP** — creates a single portable file.\n   - **Write directly to folder** — writes the complete pack (with manifests) into a folder you choose.\n\nThe resulting pack can be loaded by the main ManaMesh frontend.\n\n## Building for Static / IPFS Deployment\n\n```bash\n# From repo root\nyarn workspace manamesh-asset-pack-builder build\n```\n\nThe production files will be in `dist/`. Because the Vite config uses `base: './'`, the built app uses only relative paths and can be served from any sub-path or IPFS CID.\n\nTo test the static build locally:\n\n```bash\nyarn workspace manamesh-asset-pack-builder preview\n```\n\nTo publish to IPFS:\n\n```bash\nipfs add -r packages/manamesh-asset-pack-builder/dist/\n```\n\nThen open the CID via any IPFS gateway.\n\n## Important Notes\n\n- **Filesystem access**: Direct folder read/write requires the [File System Access API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API), which is only available in Chromium browsers. Other browsers fall back to file/directory upload + ZIP download.\n- The scraper uses public APIs (mainly Scryfall). Large scrapes can be slow and memory-heavy in a browser tab.\n- This tool complements, but does not replace, the Python `card-scraper` for bulk / production use.\n\n## Development\n\nThe app is a standard Vite + React + TypeScript project.\n\nCore logic is in `src/lib/`:\n- `scraper.ts` — in-browser scraping\n- `pack-builder.ts`, `manifest.ts` — pack scanning and manifest generation\n- `fs-access.ts` — File System Access wrappers + fallbacks\n- `zip.ts` — in-memory ZIP creation (fflate)\n\nRun the dev server with the commands shown above.\n\n## License\n\nSee the root of the repository.","readmeFilename":"README.md","_rev":"1-6107b3b723b6f003ad76beac63195003"}