Prediction Stack docs Open the Stack
Start here

Installation

Three steps: preview the static sites, start the operator admin, and put the code in a GitHub repository you own. Every command on this page was run on 2026-09-25 against a clean copy of the repository unless it is marked otherwise.

1. Get the code#

Unzip the package you received (or clone your repository) into a folder. The rest of this guide calls that folder the repository root. It contains index.html, admin/, config/, scanner/, terminal/, design-system/ and docs/.

2. Preview the public sites#

The public pages are static files. Serve the repository root with any static server; the one below comes with Python 3.

verified
cd path/to/repository-root
python3 -m http.server 8777

Then open these addresses:

PageAddress
Landing pagehttp://127.0.0.1:8777/
Spread Scannerhttp://127.0.0.1:8777/scanner/public/index.html
Prediction Terminalhttp://127.0.0.1:8777/terminal/public/index.html
These docshttp://127.0.0.1:8777/docs/ (they also open straight from the file system)

The pages show whatever data files are in the repository. They never invent a value: a missing file shows an error that says which file is missing, and a missing number shows unknown.

3. Start the operator admin#

The admin is the MIKODES Admin Kit wired to this product. It runs on your computer only, listens on 127.0.0.1 (not reachable from other machines) and writes config/public.json.

verified
cd admin
npm install        # hono, @hono/node-server, better-sqlite3, tsx
npm run init       # once: writes admin/.env with a fresh ADMIN_SECRET_KEY (file mode 600)
npm start          # http://127.0.0.1:8811/admin
  1. Read the setup code. On first start the terminal prints "No owner account yet. Open /admin and create it with this one-time setup code" followed by the code. It is shown once; restarting the server issues a new one.
  2. Create the owner. Open http://127.0.0.1:8811/admin, enter the code, your email and a password of at least 12 characters. You are now the owner.
  3. Follow "Get started" in the admin, then fill Brand, Legal, Venues and Categories. Each save rewrites config/public.json. See Admin and configuration.
The admin overview page on a fresh install
The admin on a fresh install (scratch database, default settings). The top bar with the signed-in account is cropped out.

Admin environment variables#

All optional except ADMIN_SECRET_KEY, which npm run init writes for you. Put them in admin/.env as KEY=value lines or export them in the shell.

VariableDefaultPurpose
ADMIN_SECRET_KEYnone (required)Encrypts the secrets you store in the admin (RPC URL, webhook secret). Generated by npm run init; openssl rand -hex 32 also works. Without it the server refuses to start.
PORT8811Admin port.
HOST127.0.0.1Listen address. Change only behind your own TLS reverse proxy.
ADMIN_DATA_DIRdataFolder (inside admin/) for admin.sqlite.
PUBLIC_CONFIG_PATHconfig/public.jsonWhere the public config is written, relative to the repository root.
PAIRS_DB_PATHscanner/data/pairs.jsonlThe pair database the review page writes decisions into.

Check the admin install#

verified
cd admin
npm test           # 6 tests: manifest, fee caps, empty fee hook, public file contents, fee cadence
npm run typecheck  # TypeScript, no output when clean

Back up#

Back up admin/.env and admin/data/admin.sqlite together. Both are git-ignored and never leave your machine. If you lose the key, the stored secrets cannot be decrypted and you must enter them again; the other settings remain readable.

4. Put the code in your own GitHub repository#

The refresh job only runs from a GitHub repository. Create an empty repository on GitHub (private is fine), then from the repository root:

standard git, not run for this guide
git init            # skip if the folder is already a git repository
git add .
git commit -m "Prediction Stack"
git branch -M main
git remote add origin https://github.com/YOUR-ACCOUNT/YOUR-REPOSITORY.git
git push -u origin main

admin/.gitignore keeps admin/.env, admin/data/ and node_modules/ out of git, and the root .gitignore excludes every .env* file. Run git status before the first commit and make sure neither .env nor admin.sqlite is listed.

Next: run the refresh job.

MIKODES Prediction Stack documentation. Written from the code in this repository; where the code and older notes disagree, the code wins. Nothing here is financial, legal or tax advice.