PRIME FC Mini League
PRIME FC Mini 4-a-side League 2026 — fixtures, results and live table.
Translation pending
Live ball-by-ball scoring for local cricket. Follow the score and ask the AI agent anything about the match.
Sports & fitnessGitHub @shivamrajOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Repository information has not been collected yet.
No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Live ball-by-ball scoring for local cricket (gully, school, college, corporate). One scorer taps buttons for every ball, viewers follow a live scoreboard, and an AI agent answers questions like "score kya hai?" or "who comes next?" from the live match data.
Built with Next.js, TypeScript, Tailwind CSS and Supabase. Runs on free tiers.
gh) for opening PRs# 1. Install dependencies (first time, and after package.json changes)
npm install
# 2. Create your local settings file from the example
Copy-Item .env.example .env.local
# 3. Start the dev server, then open http://localhost:3000
npm run dev
To open it on your phone, connect the phone to the same Wi-Fi and open http://<your-computer-ip>:3000. Find the IP with ipconfig (look for "IPv4 Address").
| Command | What it does |
|---|---|
npm run dev | Starts the app with live reload |
npm run build | Production build; fails on type errors |
npm run typecheck | Checks TypeScript types only |
npm start | Runs the production build |
Keys go in .env.local (never committed). See .env.example for the list:
| Name | Needed from | Where to get it |
|---|---|---|
NEXT_PUBLIC_SUPABASE_URL | Phase 2 | Supabase › Project Settings › API |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Phase 2 | Supabase › Project Settings › API |
SUPABASE_SERVICE_ROLE_KEY | Phase 2 | Supabase › Project Settings › API (keep secret) |
GEMINI_API_KEY | Phase 5 | Google AI Studio › Get API key. Needed for Ask; without it Ask replies "isn't switched on". |
GEMINI_MODEL | Optional | A different Gemini model than the default in src/lib/agent/llm.ts. |
GEMINI_FALLBACK_MODELS | Optional | Comma-separated models tried when the main one is overloaded. Default gemini-3.6-flash,gemini-3.5-flash-lite. |
GEMINI_THINKING_LEVEL | Optional | How much the model thinks before answering: low (default, fastest), medium or high. |
Do this once. After that, every PR you merge into main goes live by itself in about a minute.
Check the database is ready. In Supabase › SQL Editor, supabase/schema.sql should already be run (you did this in PR 3). Nothing new is needed: the viewer count uses Realtime presence, which needs no table.
Create the Vercel project.
gullyscore repo, then Import. Vercel spots Next.js by itself; leave the build settings as they are.Add the keys. Before clicking Deploy, open Environment Variables and add the same four values as your .env.local:
| Name | Value |
|---|---|
NEXT_PUBLIC_SUPABASE_URL | Supabase › Project Settings › API |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Supabase › Project Settings › API |
SUPABASE_SERVICE_ROLE_KEY | Supabase › Project Settings › API (secret) |
GEMINI_API_KEY | Google AI Studio › Get API key. Needed for Ask: without it, Ask replies "isn't switched on". |
Paste them only into Vercel, never into chat, code or a commit.
Deploy. Click Deploy and wait for "Congratulations". Your app is at https://gullyscore-<something>.vercel.app. You can rename it under Settings › Domains.
Check it.
If you change a key later, update it in Vercel › Settings › Environment Variables, then Deployments › ⋯ › Redeploy.
Optional: check the production build on your computer first.
npm run build
npm start # then open http://localhost:3000
Viewers never log in. Umpires sign in with Google to create and score matches, and only the umpire who created a match can score it. Do this once; no new keys go in .env.local or Vercel.
A. Google Cloud: create the sign-in client
GullyScore, then select it.GullyScore, your email as the support and contact email. Save.https://gullyscore-sable.vercel.app) and http://localhost:3000.https://<your-project>.supabase.co/auth/v1/callback. Copy the exact URL from Supabase's Google page (B2).B. Supabase: turn on Google
<your live site>/** and http://localhost:3000/**.Until this is done, the login page says "Google sign-in isn't switched on yet".
Test it locally: npm run dev, open http://localhost:3000, tap Umpire login › Continue with Google, and you land on My matches. Phones on your Wi-Fi (http://192.168.x.x:3000) can watch, but Google sign-in only returns to addresses listed above, so log in on the computer or the live site.
One-time database step (projects created before PR 23): Supabase › SQL Editor › New query, paste all of supabase/migrations/002_ask_log.sql, click Run. It adds the private ask_log table that holds:
Until you run it, Ask still works, using each server's memory instead.
Check the AI's answers before a release (needs GEMINI_API_KEY in .env.local):
npm run eval:ask
It asks about 40 questions on a sample match: English, Hindi and Hinglish; typos; players; history; maths; off-topic; and tricks. Each answer is checked against facts calculated by the scoring engine. You get a PASS/FAIL list with the AI's answer, the tools it used and the time, and it fails below 85%. It takes about 3–5 minutes, because it pauses between questions to stay inside the free-tier rate limit. Options: $env:EVAL_ONLY="boundary"; npm run eval:ask runs only matching questions.
See what people ask: Supabase › Table Editor › ask_log: question, answer, source (ai, cache, busy, unavailable), tools used and time (ms). Viewers appear only as a one-way hash. Vercel › Logs also shows one line per question.
GullyScore is a PWA: it installs from the browser, no app store needed. Installing needs the live https:// site (step 4 above). On http:// addresses like your local Wi-Fi IP, it works but can't be installed.
The installed app opens full screen and loads fast. If the phone goes offline, viewers see the last score they loaded instead of an error. The scorer screen is never cached: it saves balls through its own offline queue, which you already have.
Before sharing the link widely, try these on real devices (DEV-07):
| Device / browser | Check |
|---|---|
| Android phone, Chrome | Score a match end to end; install the app; turn the phone sideways on the scorer screen |
| iPhone, Safari | Watch a match with sound on (tap the page once first); Add to Home Screen |
| iPad or Android tablet | Scorecard sits beside the live view |
| Laptop: Chrome, Edge, Safari, Firefox | Home page shows matches in a grid; Ask opens as a chat window on the right |
The MVP was built in 8 phases and 14 PRs, each with at most 10 files:
| Phase | What |
|---|---|
| 0 | Project setup |
| 1 | Scoring engine + tests |
| 2 | Database and match setup |
| 3 | Scorer panel |
| 4 | Home page and live scoreboard |
| 5 | Chat agent |
| 6 | Animations, sounds, viewer count, tablet and desktop layouts (PR 13) |
| 7 | Installable app (PWA) and Vercel launch (PR 14) |
src/
app/ pages and API routes (Next.js App Router)
engine/ scoring logic (Phase 1)
lib/ database, agent, scorer helpers
hooks/ React hooks
components/ UI pieces
supabase/ database schema
public/ service worker (sw.js)