| .github/ISSUE_TEMPLATE | ||
| .vscode | ||
| docs/legal | ||
| public | ||
| src | ||
| supabase | ||
| .gitignore | ||
| LICENSE.md | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.mjs | ||
| README.md | ||
| tsconfig.json | ||
Hackdex
What is Hackdex?
Hackdex is a community hub for discovering and sharing Pokémon romhack patches. Players link their own legally obtained base roms once, then easily patch locally in the browser and download the patched rom. Hackdex only stores patches, screenshots, and metadata—never any roms—so distribution stays practical without any of the legal pitfalls. Creators get a consistent place to publish, version, and present their projects.
Core features
- Discover: curated hacks with screenshots, tags, versions, and summaries
- Submit: metadata, screenshots, social links, and a BPS patch file
- Patch in the browser: Powered by RomPatcher.js; linked base roms stay on the user's device
- Safe delivery: public urls for cover images, short-lived signed URLs for patch downloads and other assets; no rom storage required
Tech stack
- Next.js 15 (App Router), TypeScript, React 19, Tailwind CSS 4
- Supabase (Postgres, Auth, Storage) for data, auth, and cover images
- S3-compatible object storage (Minio locally or preferred provider) for patch files (
patchesbucket) - In-browser patching with RomPatcher.js; local persistence with IndexedDB and the File System Access API
High-level architecture
- UI: Next.js App Router with a mix of server and client components
- Data: Supabase tables for hacks, tags, patches; cover images stored in
coversS3-compatible bucket - Patches: stored in an S3-compatible bucket
patches; downloads use short-lived signed URLs via an API route - Auth: Supabase SSR helpers manage cookies; client SDK for browser calls
Contribution guidelines
- PRs welcome. Keep changes small, typed, and accessible
- Prefer clear naming, early returns, and avoid
any - Match existing Tailwind and component patterns
Security & legal notes
- Hackdex does not host roms and never will; users supply them locally during patching
- Patching happens entirely in the browser against the user's local file
Local development setup
Set up local Supabase for database, auth, and storage, and an S3-compatible bucket for patch files.
Prerequisites
- Node.js 20+
- Docker and the Supabase CLI
- An S3-compatible service (Minio locally, or a cloud provider like AWS S3 or Cloudflare R2)
Environment variables (.env.local)
Provide your Supabase project URL, publishable key, public site urls, and S3 connection details:
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=
NEXT_PUBLIC_SITE_URL=
NEXT_PUBLIC_SITE_DOMAIN=
NEXT_PUBLIC_HACK_COVERS_DOMAIN=
S3_ENDPOINT=
S3_PORT=
S3_ACCESS_KEY_ID=
S3_SECRET_ACCESS_KEY=
S3_USE_SSL=
Supabase (local)
Follow the official guide to run Supabase locally with the CLI (includes Studio):
- Supabase CLI getting started: Local development with the Supabase CLI
Typical flow:
- Initialize and start services using the CLI
- Note the printed API URL and publishable key; set them in
.env.localas shown above - Apply this repository’s migrations in
supabase/migrations - Create a Supabase Storage bucket named
hack-coversand make it public. Set theNEXT_PUBLIC_HACK_COVERS_DOMAINenvironment variable to the public URL of your covers bucket (e.g.,https://your-project.supabase.co/storage/v1/object/public/hack-covers)
S3‑compatible storage for patches and covers
- Create a bucket named
patchesand a public bucket namedcovers - Point the
S3_*environment variables to your S3 endpoint (Minio locally or your vendor) - Set the
COVERS_BUCKETenvironment variable to the name of your covers bucket (e.g.,covers) - Set the
PATCHES_BUCKETenvironment variable to the name of your patches bucket (e.g.,patches) - Set the
NEXT_PUBLIC_HACK_COVERS_DOMAINenvironment variable to the public URL of your covers bucket (e.g.,http://localhost:9000/covers)
Install & run
npm install
npm run dev
For easier debugging in VS Code, use the launch configurations in .vscode/launch.json (full stack, server-side, or client-side).
License & Branding
- MIT licensed; see LICENSE.md
- Branding Notice: the name “Hackdex” is reserved for use by the original project; see
LICENSE.md