Inspiration
School emergencies don’t fail because people don’t care—they fail because information is scattered. During a lockdown or evacuation, staff juggle spreadsheets, walkie-talkies, and group texts while trying to answer the same questions: Who’s safe? Who’s missing? Who needs help right now?
We built Spartan (Reunify) for a real campus—Los Altos High—because accountability shouldn’t depend on one person’s clipboard. Every student, teacher, and administrator should contribute to a single, live picture that updates as the situation evolves.
What it does
Spartan is an AI-assisted emergency accountability platform that connects everyone on campus during a crisis:
- Students: Check in from their phones (safe on campus, safe off campus, or need help), with optional location sharing and priority flags (e.g., “shooter nearby”)—without exposing sensitive details to the wrong audience.
- Teachers: Submit roll call via voice or roster checkboxes. Natural speech (e.g., “everyone but Maria and John”) is parsed into structured present/missing lists tied to real classrooms.
- Administrators: Access a live command center with a schematic campus map, real-time check-in feed, teacher reports, and unaccounted students.
- Parents & responders: Get role-specific views—child status and pickup messaging for families; factual missing/needs-help snapshots for first responders.
- Drills & demos: Staff can reset sessions, run simulations (mixed roll calls, off-campus reports, missing students), and return to live Firebase data without polluting production.
Reunify doesn’t replace 911—it provides a shared, real-time source of truth so staff can focus on students, not chasing data.
How we built it
- Frontend: Next.js 16 (App Router), React, Tailwind CSS; mobile-first flows for students/teachers and a dashboard with sidebar + interactive SVG campus map.
- Backend & data: Firebase (Anonymous Auth, Firestore) for reports and roll calls; security rules for drill-specific fields (off-campus, need-help, shooterNearby, transcripts).
- AI: Google Gemini (gemini-2.5-flash) via server-only API routes to parse voice transcripts into structured roster data, with regex fallback.
- Voice: Browser Web Speech API for transcription; Gemini structures results.
- Admin logic: Merges student self-reports and teacher roll calls into per-room stats, safety counts, and live feed events.
- Deployment: Vercel-ready with environment-based Firebase Admin (service account) for admin APIs (report fetch, room seeding, drill reset).
Challenges we ran into
- Voice → structured data: Regex-only parsing failed on messy speech; added Gemini with strict JSON output, roster context, and fallbacks.
- Conflicting data sources: Students and teachers may disagree; merged both into a unified evacuation state for accurate map visualization.
- Map UX at scale: ~100+ rooms overlapped; restructured layout and moved room details to a side panel for clarity.
- Demo vs. live data: Built simulation overlays that don’t write to Firestore, with instant reversion to live polling.
- Safety constraints: Emergency UI uses a simulated 911 button and drill-only language to avoid real-world misuse.
Accomplishments that we’re proud of
- End-to-end flow: student check-in → teacher voice roll call → live admin map and feed.
- Gemini-powered roll call that understands natural language and maps names to real roster IDs.
- Interactive Los Altos High campus map with room-level status and drill controls.
- Role-based system: admin, teacher, student, parent, and responder views in one codebase.
- Thoughtful student UX: supports off-campus status, help requests, and priority flags without requiring rigid inputs during emergencies.
What we learned
- Crisis tools need role-specific interfaces, not one universal dashboard.
- AI is most effective when constrained with schema, context, and rules.
- Backend logic (Firestore rules, sentinel fields) is as critical as frontend UX.
- Designing for drills and simulations is essential for safe, testable development.
What’s next for Spartan (Reunify)
- Production authentication: Integrate real student, teacher, and staff identities with school roster systems.
- First responder mode: Priority queue based on urgency signals (e.g., shooterNearby, GPS), optimized for field use.
- Parent notifications: SMS/push via Twilio with safe, non-sensitive messaging.
- Incident lifecycle: Full incident model with verification, conflict resolution, and AI-generated communications.
- Roster sync: Import real class data from SIS instead of demo rosters.
- System hardening: Load testing, offline-capable check-ins, and multi-school district support.


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