Prediction Stack docs
v1.0.0
Live app Get help
● Start · About 30 minutes

Installation
pages, admin, repository.

Three steps: preview the static pages, start the operator admin, and put the code in a GitHub repository you own so the refresh job can run.

01Get the code

Unzip the download. Open prediction-v1.0.0/source/: that folder contains index.html, admin/ and config/, and these docs call it the repository root. documentation/ is this guide; licenses/ holds the third-party licences.

Besides those, source/ holds scanner/, terminal/, bot/, design-system/, docs/ (the developer notes) and .github/.

02Preview the public pages

The pages are static files. Serve the repository root with any static server; this one ships with Python 3 Tested:

cd path/to/repository-root
python3 -m http.server 8777
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
Bot page (points to the admin)http://127.0.0.1:8777/bot/public/index.html

The pages show whatever data files are in the folder. A missing file shows an error naming the file; a missing number shows unknown.

03Start the operator admin

The admin runs on your computer only and listens on 127.0.0.1, so other machines cannot reach it Tested.

cd admin
npm install        # hono, @hono/node-server, better-sqlite3, tsx
npm run init       # once: admin/.env with a fresh ADMIN_SECRET_KEY (mode 600)
npm start          # http://127.0.0.1:8811/admin
  1. Read the setup codeOn first start the terminal prints "No owner account yet. Open /admin and create it with this one-time setup code" and the code. Each start before the owner exists adds a new code; any printed code works until the owner is created.
  2. Create the ownerOpen http://127.0.0.1:8811/admin, enter the code, your email and a password of at least 12 characters.
  3. Fill the settingsFollow Get started, then Brand, Legal, Venues and, if you use it, Builder fee. See Operator admin.

04Check the install

Tested 11 tests pass (manifest, money defaults, fee caps, schedule and the product routes: sign-in, CSRF header, roles, the audited pair decision, the public file written with the builder fee empty); the type check prints nothing when clean.

cd admin
npm test
npm run typecheck

Tests for the data jobs (no install needed, Node only, no network) Tested:

cd scanner
node test/subject.test.js
node test/crossvenue.test.js
node test/polymarket-adapter.test.js
cd ../terminal
node src/keccak.js
node --test test/rpc.test.js   # 6 cases: own RPC first, public fallback, the URL never written

05Back up the admin

Back up admin/.env and admin/data/admin.sqlite together. Both are git-ignored (admin/.gitignore) and never leave your machine. Without the key, the stored secrets (RPC URL, bot token, webhook secret) cannot be decrypted and must be entered again; other settings stay readable.

06Put the code in your own GitHub repository

The refresh job only runs from a GitHub repository. Push the contents of source/ as the repository, so index.html and .github/ sit at its top level; do not push documentation/ or licenses/ from the download. Create an empty repository on GitHub (private is fine), then from inside source/ Not tested here:

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
Check before the first commit

Run git status and make sure neither admin/.env nor admin.sqlite is listed. The root .gitignore excludes every .env* file and admin/.gitignore excludes data/ and node_modules/.

Next: run the refresh job.