Inspiration
In large lectures, students hesitate to ask questions and professors lose momentum when interruptions break the flow. We wanted a quiet, respectful backchannel so confusion surfaces in real time without public speaking anxiety or derailing the lecture.
What it does
- AggiePulse lets students join a live session with a short room code and privately (and anonymously) message the professor during class. The instructor sees a clean, prioritized inbox and can reply 1-to-1 or broadcast a quick clarification to everyone, keeping the lecture moving while raising participation from quieter students.
How we built it
- Frontend: Solid.js on Cloudflare Pages for snappy UI under rapid message churn. We use signals/resources, optimistic sends with server reconciliation, and a join flow that prefetches the inbox to avoid “loading purgatory.”
- Backend API (from scratch): Cloudflare Workers (Python via Pyodide) exposing a stateless REST API: create session, join via code, send message, fetch inbox, reply/broadcast, end session.
- Database (from scratch): Cloudflare D1 (SQLite) with minimal, privacy-first tables: rooms (session + join code), members (anonymous participants), messages (student DMs), replies (instructor responses). Indexed by room/time for hot-path reads.
- Reliability: Prepared statements everywhere, deterministic read/write helpers (.all() for SELECTs, .execute() for mutations), and a lightweight write-serialization layer to prevent D1/SQLite contention.
Challenges we ran into
- Write locks (CF 1101): concurrent bursts during class caused D1 contention; we added a DatabaseQueue to serialize writes and tightened transaction scopes.
- Param binding/return shape bugs: inconsistent use of placeholders and .all() vs .execute() produced intermittent 500s; standardized SQL helpers fixed this.
- State not advancing after join: the UI sometimes stayed stuck on “Loading”; we refactored the join sequence to await membership creation and immediately hydrate the inbox.
- CORS/body parsing drift: misaligned headers and JSON parsing between client and Worker routes created flaky requests; we normalized fetch options and server parsing.
- Race conditions on rapid sends: we debounced client sends and queued server writes to keep ordering deterministic.
Accomplishments that we're proud of
- Built a complete API and database from scratch with edge-close performance and privacy by design.
- Achieved real-time feel with a clean instructor inbox that scales from tens to hundreds of messages.
- Shipped a minimal, reliable schema that keeps students anonymous while enabling auditability of instructor replies.
- Delivered a smooth join experience (room code + QR) that works on any device with no account setup.
What we learned
- Edge databases are fast, but you must design for contention (serialize writes, keep transactions tiny).
- Solid’s fine-grained reactivity is excellent for high-churn UIs when paired with optimistic updates.
- Clear separation of concerns (schema → SQL helpers → API → UI) prevents small inconsistencies from becoming production-blocking bugs.
- Privacy-first defaults (no PII by default) simplify compliance discussions and build user trust.
What's next for AggiePulse
- Live push: upgrade transport from polling to SSE/WebSockets.
- TA co-pilot: shared inbox, canned replies, and keyword clustering.
- Smart triage: upvotes/urgency sorting, duplicate detection, and slide-timestamped questions.
- Institutional mode: SSO, FERPA-aligned retention policies, exports, and LMS integrations.
- Analytics & accessibility: confusion heatmaps, mobile/keyboard optimizations, and stronger moderation/rate limiting.
Log in or sign up for Devpost to join the conversation.