Inspiration
LA28 is approaching as a home Games for Team USA. There are 59 sports across the Olympic and Paralympic programs — 36 Olympic and 23 Paralympic. Some fans are walking in blind. That's the gap I wanted to close.
The premise behind LA28 Momentum Exchange is simple: every Team USA sport deserves equal scrutiny. Olympic and Paralympic sports sit side by side, sorted by momentum data, never by program hierarchy. The stories that emerge from the data are the stories the platform tells.
What it does
LA28 Momentum Exchange is a prediction engine and analytical market that tracks all 59 LA28 Olympic and Paralympic sports as equal assets. Powered by Gemini 2.5 Flash with Google Search grounding, the platform combines a transparent four-factor momentum formula with an agentic Q&A chat and a collectible card prediction lock-in system that pays off when LA28 results land in 2028.
Try it out
- Live demo: https://la28-momentum-exchange-942244923042.us-central1.run.app
- GitHub Repo (Apache 2.0 Open Source): https://github.com/khadimswe/la28-momentum-exchange

Figure 1. National Momentum Dashboard
Core Features
1. National Momentum Dashboard
The landing experience is a real-time analytical dashboard that surfaces the macro picture of Team USA's road to LA28. It tracks composite momentum across all 59 sports, displays the Olympic vs Paralympic trajectory chart over time, and shows recent news from grounded Gemini searches with cited sources. A live momentum ticker scrolls the most recent movements across all tracked sports.
How it works:
- Reads cached 4-factor momentum scores from Firestore for all 59 sports
- Computes composite National Momentum as a weighted average
- Renders Olympic vs Paralympic trends using Recharts with smooth bezier curves
- Surfaces 2-3 recent news stories pulled via Gemini Google Search grounding, each with the actual source URL clickable to open in a new tab
2. The 59-Sport Market

Figure 2. 59-Sport Market with Equal-Weight Cards
Every LA28 sport is rendered as a premium collectible-style card in a unified market. Cards are organized by 8 categories (Aquatic, Athletics, Combat, Precision, Team, Individual, Gymnastics, Cycling) and sortable by momentum, alphabet, or recency. Each card displays a momentum score, trend direction, and a Gemini-generated narrative.
Clicking a card opens a detail modal showing:
- The 4-component breakdown (P, T, M, C scores)
- Per-component reasoning with cited source URLs
- The full formula calculation visible:
Momentum = 0.4(P) + 0.25(T) + 0.2(M) + 0.15(C)
3. Agentic "Ask the Market" Chat

Figure 3. Ask the Market — Agentic Reasoning Chain
Built on Gemini 2.5 Flash with Google Search grounding, the chat allows fans to ask natural-language questions about LA28 sports. Unlike typical LLM wrappers, the reasoning chain is fully visible — users watch Gemini work in real time.
How it works:
- Step 1: Live Google Search grounding pulls recent news related to the question
- Step 2: Cached momentum data is queried from Firestore for relevant sports
- Step 3: Cross-references trajectory across the last 4 World Championship cycles
- Step 4: Synthesizes a conversational answer with cited sources and direct links to relevant sport cards on Market
Every claim links back to either a verified source URL or an in-app sport card. Q&A responses are cached in Firestore to reduce repeated API costs.
4. Portfolio + Collectible Prediction Cards

Figure 4. Portfolio + Collectible Prediction Cards
Once a fan develops a thesis from exploration, they lock conviction picks via a prediction portfolio system. Up to 10 predictions per fan, locked with a single email confirmation.
Each locked prediction generates a premium collectible card with the sport, momentum snapshot, lock date, and a "PENDING" stamp until LA28 results are available. In 2028, when actual LA28 ranking data lands, predictions earn rarity tiers:
- Mythic Gold: Sport finished in top 5 of LA28 momentum
- Rare Silver: Sport finished top 10
- Common Bronze: Sport finished top 20
- No card: Sport finished outside top 20
The Momentum Formula

Figure 5. 4-Factor Momentum Breakdown
Every sport's score is computed using a transparent four-factor formula that fans can independently verify:
Momentum = 0.4(P) + 0.25(T) + 0.2(M) + 0.15(C)
| Component | Weight | Description |
|---|---|---|
| P (Performance Growth) | 40% | Team USA medal counts at the last 2 World Championships vs the 2 prior |
| T (Trajectory) | 25% | Slope of medal counts across 4 cycles |
| M (Media Momentum) | 20% | Recent news volume and sentiment for the program |
| C (Competitive Context) | 15% | Global depth and competitive difficulty |
Every component is computed by Gemini with Google Search grounding. All reasoning text traces back to cited sources retrievable from the card detail modal.
Technical Architecture
| Layer | Technologies | Purpose |
|---|---|---|
| Frontend | React 18, Vite, React Router DOM | Core interface and SPA routing |
| Data Visualization | Recharts, html2canvas | Trend charts and prediction card downloads |
| AI / API | Gemini 2.5 Flash API, Google Search Grounding | Momentum analysis, news research, agentic chat |
| Database | Firebase Firestore | Caches 5 collections (momentum, narratives, news, predictions, qa-cache) |
| Deployment | Google Cloud Run, Cloud Build, Artifact Registry | Containerized production deployment |
| Container | Docker (multi-stage), Node 22-slim, Nginx Alpine | Static asset serving on port 8080 |
Dataset and Compliance
The project relies exclusively on publicly available Team USA data sources, in compliance with the contest's data strategy requirements:
- Team USA World Championship medal and placement data (1st, 2nd, 3rd only) from publicly available international federation reports, filtered to US-scope only
- Public Team USA news surfaced through Gemini Google Search grounding from approved sources (Olympics.com, Paralympic.org, Team USA, Reuters, AP)
- LA28.org official sport program for the 59-sport master list (36 Olympic + 23 Paralympic)
The project includes a multi-layer compliance system to enforce contest rules:
- Prompt-level rules in every Gemini call: no athlete names, no finish times, US-scope only, official sport names (Athletics not Track & Field), proper Games terminology (LA28 Games, Olympic Games Paris 2024)
- Post-generation regex sanitizer as a second layer that strips NGB names (USA Swimming → "swimming program"), corporate brand mentions, and improper time references
- Filter pipeline for news that excludes corporate sponsorship stories, individual athlete identifiers, and winter sports
- No NIL multimedia — gradient bubbles with sport abbreviations instead of athlete photos
API Budget Strategy
Heavy Firestore caching reduces Gemini API calls by 99% after initial generation:
- All 59 sport momentum scores are generated once and cached for 7 days
- News stories cache permanently after generation
- Q&A chat answers cache by question hash
- Total Gemini API spend across the entire build: under $5
What I Learned
Building agentic AI experiences is fundamentally about showing the work. Most LLM apps hide the reasoning. Making Gemini's chain visible — searching news, reading data, cross-referencing — turned the chat from "another LLM wrapper" into something users can audit and trust.
Compliance constraints made the product better. Removing athlete names forced program-level storytelling. Removing finish times forced focus on medals and trajectories. The rules pushed the design toward a healthier framing.
The deployment phase was the hardest part. Vite environment variables didn't reach the Cloud Build context because gcloud's --source flag uses .gitignore to filter uploads, which excluded my .env file. Required a .gcloudignore file as a second-layer override. Also hit Node version mismatches (Vite 7 needs Node 20.19+) and Alpine Linux's musl binary incompatibility with rolldown — solved by switching to node:22-slim.
Future Possibilities
- Authenticated user accounts via Firebase Auth so prediction lock-ins can be edited until cutoff
- Automated 2028 verification email pipeline built on Cloud Functions + SendGrid to deliver the promised scorecard updates when LA28 results land
- Community leaderboards so fans can see the most popular Paralympic predictions vs Olympic predictions
- Live event integration during LA28 to update momentum in real time as actual competition unfolds
Built With
- apache
- css3
- docker
- firebase
- gemini
- google-cloud
- html2canvas
- html5
- javascript
- node.js
- recharts
- vite



Log in or sign up for Devpost to join the conversation.