Anime card collecting Discord bot (TypeScript + discord.js v14) with a Next.js admin panel.
This repository is designed for open-source self-hosting. Keep private datasets (large image stores, third-party proprietary data, internal research) outside git.
src/— bot runtime, commands, services, db schema, cache layerscripts/— migrations, seeds, and maintenance utilitiestests/— Vitest integration and logic testsweb/— Next.js admin paneldocs/— architecture and feature docs
- Node.js 20+
- PostgreSQL 15+
- Redis 7+
pg_dumpinstalled (fornpm run db:backup)
- Copy env:
cp .env.example .env- Start infra:
docker compose up -d- Install deps:
npm install
cd web && npm install && cd ..- Migrate DB:
npm run db:migrate- Run bot and web:
npm run dev
npm run web:devBot and panel read environment from the repo root .env.
npm run build— bot TypeScript buildnpm run test— full test suitenpm run test:pure— lighter subsetnpm run web:build— admin panel production buildnpm run db:backup— timestamped SQL dump tobackups/npm run editions:prune -- --dry-run— preview cleanup (keep only edition 1)CONFIRM_DESTRUCTIVE=yes npm run editions:prune -- --execute— apply destructive cleanup
Recommended public/private split:
- Public: framework code, renderer, schema, Redis/cache layer, economy/anti-bot logic, docs
- Private: large image database, operational configs, internal research/intel, proprietary datasets
See:
docs/open-source-release-checklist.mddocs/HOW_TO_PLAY.mddocs/commands-reference.md
See CONTRIBUTING.md.
MIT (LICENSE)