Real-time tracking for UC Santa Cruz's loop shuttles — field notes from a hackathon that went further than expected.
Four Baskin Engineering students reprogrammed the campus's decade-old GPS hardware over a weekend, put a live bus map online, and ended up the only U.S. team in the 2023 Google Solution Challenge global Top 10.
Demo reel ↗ · The problem · What it does · Architecture · Run it · The team
| What | A real-time map of UC Santa Cruz's loop shuttles (and nearby Santa Cruz Metro lines), built as an installable PWA. |
| Why | The campus loop runs on no reliable schedule, so students crowd the Metro or gamble on a bus that may never come. |
| How | Reprogrammed the campus's existing GPS hardware → an Express /ping ingest → Firestore → a live Google Map in the browser. |
| Result | Top 10 global finalist — the only U.S. team in the 2023 Google Solution Challenge — covered by UCSC News, the Santa Cruz Sentinel, and Santa Cruz Works. |
Note
This repo is a preserved case study. The map you see today is a frozen field-notebook demo. The original build ran a live hardware feed on Azure during the 2023 season. See Build context for the diff.
UC Santa Cruz sprawls across a redwood hillside with serious elevation changes — getting to class on time means catching a loop shuttle. But the loop runs on no predictable schedule. So students either pile onto the city Metro (taking seats from people actually leaving campus) or wait for a loop that may not show, and end up late anyway.
There was no way to see where the buses actually were. The data existed — campus had installed GPS-emitting hardware on the buses years earlier — it just wasn't going anywhere useful.
SlugLoop's bet: don't deploy new hardware, revive the hardware already on the buses and put its signal on a map.
| Recognition | Awarded by |
|---|---|
| 🏆 Top 10 Global Finalist — only U.S. team | Google Solution Challenge 2023 |
| 🥇 Best Use of GitHub | CruzHacks 2023 |
| 📰 Featured: "UCSC team a Google Solution Challenge finalist" | UCSC News, Santa Cruz Sentinel, Santa Cruz Works |
SlugLoop began at CruzHacks 2023, then advanced through the Google Solution Challenge to a global Top 10 finish — the sole U.S. team in that round.
|
Every tracked loop shuttle as a moving marker on a Google Map, refreshed in real time straight from Firestore. |
Campus loop shuttles and nearby Santa Cruz Metro lines on the same map, so you can decide which to take. |
Heading and next-stop logic so you know not just when a bus is near, but where it's going. |
|
Standalone install, offline shell, and home-screen shortcuts to the map and timeline — no app store. |
A preserved case-study experience: the build journey, a project timeline, and a frozen demo of the map. |
Apache-2.0, built to be handed off to the next cohort of UCSC students. |
From the bus antenna to the browser
flowchart LR
subgraph Field["▌ On the buses"]
GPS["GPS units<br/>(reprogrammed)"]
BS["Campus basestations"]
end
subgraph Cloud["▌ Backend"]
PING["POST /ping<br/>Express API"]
CRON["cronJob<br/>Metro poller"]
FS[("Cloud Firestore")]
end
subgraph App["▌ Client"]
PWA["Next.js 16 PWA"]
MAP["Google Maps<br/>live markers"]
end
GPS -->|C / libcurl| BS
BS -->|HTTP POST + PING_KEY| PING
PING --> FS
CRON -->|Metro lines| FS
FS -->|realtime subscribe| PWA
PWA --> MAP
classDef field fill:#FFE8A3,stroke:#A8801F,color:#3a2f00;
classDef cloud fill:#CDE7FF,stroke:#3E6CA8,color:#0a2440;
classDef app fill:#C9F5D9,stroke:#2F8A57,color:#06321c;
class GPS,BS field;
class PING,CRON,FS cloud;
class PWA,MAP app;
- On the bus — reprogrammed GPS units emit position; campus basestations receive it (some receivers push over HTTP using custom C +
libcurl). - Ingest — basestations
POST /pingto the Express server with a sharedPING_KEYsecret; the server validates, parses bus ID / lat / lng / route, and writes to Firestore. - Metro — a Dockerized
cronJobpolls nearby Santa Cruz Metro lines and writes them alongside the loop data. - Client — the Next.js PWA subscribes to Firestore in real time and renders live markers on Google Maps. No polling the server — the map updates as the database does.
| Layer | Tools |
|---|---|
| Frontend | Next.js 16 (App Router), React 19, Framer Motion, Radix UI, Tailwind CSS v4 |
| Maps | Google Maps (google-maps-react-markers) |
| Realtime data | Firebase · Cloud Firestore |
| Backend | Node.js, Express 4, express-rate-limit, Swagger / OpenAPI validator |
| Hardware pipeline | Reprogrammed campus GPS units & basestations, C + libcurl, /ping ingest |
| Jobs | Dockerized cronJob Metro poller |
| PWA | Web manifest, service worker, install + offline shell |
| Testing | Jest, React Testing Library, Playwright (e2e) |
| Analytics / hosting | Vercel Analytics · originally hosted on Microsoft Azure |
The live site is itself part of the story — a field notebook, not just a map.
| Route | Purpose |
|---|---|
/ |
Field-notebook landing — the hook and the headline |
/map |
The live demo map: loop shuttles + Metro |
/journey |
How the build happened, weekend to finals |
/timeline |
Project milestones |
/about |
The team |
/contact |
Reach the team |
Local setup — frontend & backend
# 1. Clone
git clone https://github.com/SlugLoop/SlugLoop.git
cd SlugLoop
# 2. Frontend (Next.js PWA)
cd client
pnpm install
pnpm dev # http://localhost:3000
# 3. Backend (Express ingest API) — separate terminal
cd ../server
npm install
npm startTests
# client (unit + RTL) # client (e2e)
cd client && pnpm test cd client && pnpm test:e2e
# server
cd server && npm test[!IMPORTANT] The backend needs environment variables that are not in this repo: Firebase Admin credentials, a Google Maps API key, and the
PING_KEYingest secret. Without them the client runs against the preserved demo data; the live hardware feed does not. Contact the team for production values.
Four Baskin Engineering students (UCSC, B.S. Computer Science '23).
What's where
SlugLoop/
├── client/ # Next.js 16 PWA — the preserved case-study site + demo map
│ ├── app/ # App Router routes: map, journey, timeline, about, contact
│ ├── src/ # components, lib, firebase client
│ ├── __tests__/ # Jest + React Testing Library
│ └── e2e/ # Playwright parity tests
├── client-legacy/ # Original Create React App + Material UI build (2023)
├── server/ # Express ingest API — POST /ping, Metro routes, Firestore writes
│ ├── routes/ # index (bus ingest), metro
│ ├── functions/ # direction, convert, soonBusStop, pingHelper
│ └── initialization/ # firebase admin init
├── cronJob/ # Dockerized Santa Cruz Metro poller
├── SlugLoop.png # project mark
└── LICENSE # Apache-2.0
A hackathon project is a weekend, not a product — and this repo is honest about that. SlugLoop was rebuilt afterward as a preserved case study, so what you clone is not byte-for-byte what ran live in 2023.
| Original build (2023) | This repo | |
|---|---|---|
| Frontend | Create React App + Material UI | Next.js 16 + React 19 (rebuilt) — original kept in client-legacy/ |
| Hardware feed | Live GPS units → basestations → /ping |
Preserved demo data on the map |
| Hosting | Microsoft Azure | Static preserved site |
| Purpose | Live campus utility | Field-notebook case study of the build |
Known limits of the weekend scope: hardware coverage was never the full fleet (some receivers were broken), and arrival-time prediction (an ML ETA model) was always a "what's next," not a shipped feature.
Apache-2.0 — built to be forked, learned from, and carried forward by the next cohort of UCSC students.
📑 Sources & footnotes
- Award (Top 10, only U.S. team) — UCSC News, "UCSC team a Google Solution Challenge finalist," 2023-07-31: https://news.ucsc.edu/2023/07/slugloop-google-solution-challenge.html
- Independent press — Santa Cruz Sentinel, 2023-07-26: https://www.santacruzsentinel.com/2023/07/26/uc-santa-cruz-team-make-final-round-of-google-app-challenge/
- Origin at CruzHacks — Santa Cruz Works, 2023-07-28: https://www.santacruzworks.org/news/cruzhacks-team-in-the-top-10-google-solutions-challenge
- Demo video — https://www.youtube.com/watch?v=DlAGp-IjtJM
- Live site — https://slugloop.tech/
- Every figure above is sourced; no awards, ranks, or statistics are invented. Items marked
TODOare awaiting confirmation and are intentionally left blank rather than guessed.
↑ back to top



