A website for easy hack discovering, uploading, and patching.
Go to file
2026-01-27 19:18:39 -10:00
.github/ISSUE_TEMPLATE Add issue template for missing base roms 2026-01-10 15:22:00 -10:00
.vscode
docs/legal
public
src Add route for invalidating discover cache 2026-01-27 19:18:39 -10:00
supabase Add optional verification contact field 2026-01-15 19:21:01 -10:00
.gitignore
LICENSE.md
next.config.ts
package-lock.json
package.json
postcss.config.mjs
README.md
tsconfig.json

Hackdex

Next.js React Tailwind CSS Supabase S3 Compatible License: MIT

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 (patches bucket)
  • 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 covers S3-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
  • 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):

Typical flow:

  1. Initialize and start services using the CLI
  2. Note the printed API URL and publishable key; set them in .env.local as shown above
  3. Apply this repositorys migrations in supabase/migrations
  4. Create a Supabase Storage bucket named hack-covers and make it public. Set the NEXT_PUBLIC_HACK_COVERS_DOMAIN environment variable to the public URL of your covers bucket (e.g., https://your-project.supabase.co/storage/v1/object/public/hack-covers)

S3compatible storage for patches and covers

  • Create a bucket named patches and a public bucket named covers
  • Point the S3_* environment variables to your S3 endpoint (Minio locally or your vendor)
  • Set the COVERS_BUCKET environment variable to the name of your covers bucket (e.g., covers)
  • Set the PATCHES_BUCKET environment variable to the name of your patches bucket (e.g., patches)
  • Set the NEXT_PUBLIC_HACK_COVERS_DOMAIN environment 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