npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

quiniela-mcp

v0.1.0

Published

MCP server for the FIFA World Cup 2026 quiniela + prediction markets — lets agents make predictions and trade markets.

Readme

World Cup 2026 — Quiniela + Prediction Markets

Two completely separate games in one dark, Polymarket-styled app:

  1. Quiniela — free score-prediction pool with stage-weighted scoring, Jokers, perfect-round and champion bonuses, a live leaderboard, and a dynamic knockout bracket.
  2. Prediction Markets — a peer-to-peer binary (YES/NO) exchange played with admin-granted credits, settled at the end of the tournament.
  • Backend — FastAPI + SQLite + JWT auth (backend/)
  • Frontend — React + Vite SPA, dark themed (frontend/)

Quick start

Backend

cd backend
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
uvicorn app.main:app --reload

API + Swagger docs at http://localhost:8000/docs. A seed admin (admin / admin123), sample teams and matches across every stage are created on first startup.

Frontend

cd frontend
npm install
cp .env.example .env
npm run dev

App at http://localhost:5173 (it proxies /api to the backend).

How scoring works

See backend/app/scoring.py and backend/app/bonuses.py.

Per match — accuracy scaled by a stage multiplier (group ×1 … final ×5):

| Result | Base points | |---|---| | Exact scoreline | 3 | | Correct outcome (win/draw/loss) | 1 | | Wrong | 0 |

match_points = round(base × stage_multiplier), then ×2 if you played your Joker on it.

Bonuses

  • 🃏 Joker — one per group (and one per knockout round); doubles that match's points.
  • 🎯 Perfect round — get every game in a group (or a full knockout round) correct → +5.
  • 🏆 Champion — correctly pick the tournament winner → +10 (locks at first kickoff, or whenever the admin locks it).

All constants live in scoring.py and are easy to tune.

Data

Seeded from the real 2026 World Cup final draw (5 Dec 2025): 48 teams across Groups A–L with country flags (via flagcdn.com) and all 72 group-stage fixtures. Results are blank until entered.

Pages

Quiniela

  • Predict — picks grouped by group → matchday, each with a live countdown + lock; one Joker per round; a champion picker. Once a match locks, reveal everyone's picks.
  • Groups — live standings tables: P / W / D / L / GF / GA / GD / Pts.
  • Bracket — knockout slots that populate dynamically; admins assign teams as they qualify (no preselection); predictable once both teams are set.
  • Leaderboardlive, with a points breakdown (match / 🎯 / 🏆 / total).
  • Profile — your stats.

Prediction Markets (credits, separate)

  • Markets — per-match YES/NO markets as Polymarket-style cards with implied-probability bars.
  • Market detail — order book: make an offer (pick a side + price + shares) or take the other side of any offer (partial fills). Admins resolve YES/NO.
  • Wallet — balance, locked, granted, and net.

Shared / admin

  • Rules — the full rules of each game, side by side.
  • Admin — enter results, sync from the live feed, lock champion picks, set the winner.
  • Dashboard (admin) — grant credits and view the settlement table (granted vs balance vs net).

Auto-syncing results

The Admin "Sync now" button calls POST /admin/sync-results, which pulls finished scores from a free no-key feed (RESULTS_API_URL, default worldcup26.ir), matches them to our fixtures by group + team names, and recomputes points. You can always enter or override results by hand.

Typical flow

  1. Register / log in (a seeded admin / admin123 account can enter results).
  2. Players enter scores, place a Joker per round, and pick a champion (before kickoff).
  3. Results arrive via the Admin Sync button (or manual entry / POST /matches/{id}/result).
  4. Points + bonuses recompute automatically — watch the live Leaderboard, Groups, and Profile.