• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
wohara010

wohara010

SportCalApp

Sports schedule to Calendar sync tool
Public
Like
SportCalApp
Home
Code
4
api
4
README.md
SEARCH_DEMO.md
H
main.tsx
Environment variables
Branches
1
Pull requests
Remixes
History
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
SEARCH_DEMO.md
Code
/
SEARCH_DEMO.md
Search
2/22/2026
Viewing readonly version of main branch: v21
View latest version
SEARCH_DEMO.md

Unified Search Demo

How It Works

Single search bar - Type anything related to sports!

Example Searches:

1. Search "max v" Results:

  • Max Verstappen (Formula 1, Red Bull Racing) #33 • Dutch
    • Badges: Formula 1, IGTC

2. Search "formula" Results:

  • Formula 1 (Sport)
    • Badges: Racing, Motorsport

3. Search "red bull" Results:

  • Red Bull Racing (Team, Formula 1)
    • Founded 2005 • Austria

4. Search "john smith" (Disambiguation Example) Results:

  • John Smith (Formula 1 Driver, Example Racing) #88 • British
  • John Smith (NFL Wide Receiver, Example FC) #15 • American

What Happens When You Click:

  1. Click on Max Verstappen →

    • Shows banner: "Max Verstappen | Formula 1 • Red Bull Racing"
    • Loads ALL his events:
      • 24 F1 races (from Ergast API)
      • 2 IGTC endurance races
    • Total: ~26 upcoming events
  2. Click on Formula 1 →

    • Shows banner: "Formula 1"
    • Loads all 2026 F1 races
    • Total: ~24 upcoming races
  3. Click on Red Bull Racing →

    • Shows banner: "Red Bull Racing | Formula 1"
    • Loads all F1 races (team participates in all)
    • Total: ~24 upcoming races

Search Algorithm

Searches across 3 entity types simultaneously:

  1. Sports - matches name and categories
  2. Teams - matches team name
  3. Athletes - matches athlete name

All results combined and displayed with:

  • Avatar (initials)
  • Name (bold)
  • Sport (colored)
  • Details (team, nationality, number, position)
  • Category badges (for multi-sport athletes)

URL Structure

Frontend calls: /api/search.ts?query=max+v

Backend returns:

{ "results": [ { "id": "athlete_f1_verstappen_33", "type": "athlete", "name": "Max Verstappen", "sport": "Formula 1", "team": "Red Bull Racing", "metadata": { "nationality": "Dutch", "carNumber": "33" }, "categories": ["Formula 1", "IGTC"] } ], "count": 1 }

Benefits

✅ No confusion - One search bar, intuitive ✅ Fast - Autocomplete as you type (300ms debounce) ✅ Smart - Searches everything at once ✅ Disambiguation - Shows multiple John Smiths clearly ✅ Multi-sport - Max's F1 + IGTC events combined

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
AboutAlternativesPricingBlogNewsletterCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.