Skip to content

Repository files navigation

CampusLine-Buster

A real-time cafeteria queue tracker built as a joint induction project between the Software Engineering and Data Science tracks. Students report wait times from their phones, and the live data stream feeds directly into a Data Science pipeline for analysis and prediction.


Overview

Campus queues are unpredictable. CampusLine-Buster crowdsources wait-time reports from students already in the cafeteria, displays a live status to anyone checking before they leave their seat, and logs every report for downstream DS model training.


Features

  • Live wait-time display with crowd-sourced status updates
  • Slider-based report submission — no typing required
  • Colour-coded status indicator: calm, moderate, or hectic
  • Live data stream log visible to all users
  • Auto-refresh every 30 seconds
  • Mobile-first responsive design
  • In-memory API with a clean handoff format for the Data Science pipeline

Tech Stack

Layer Technology
Framework Next.js 15 (App Router)
Runtime React 19
Styling Vanilla CSS (mobile-first)
API Next.js Route Handlers
Fonts Inter, JetBrains Mono (Google)
Dataset campus_cafeteria_wait_times.csv

Project Structure

src/
  app/
    globals.css       # Global design system and component styles
    layout.jsx        # Root layout with metadata
    page.jsx          # Main client-side UI
    api/
      wait-time/
        route.js      # GET and POST handlers for wait-time logs
dataset.ipynb         # Data Science exploration notebook
campus_cafeteria_wait_times.csv  # Historical training data

Getting Started

Prerequisites

  • Node.js 18 or later
  • npm

Installation

git clone https://github.com/CommandLine-Protocol/CampusLine-buster.git
cd CampusLine-buster
npm install

Running Locally

npm run dev

Open http://localhost:3000 in your browser.

Building for Production

npm run build
npm run start

API Reference

GET /api/wait-time

Returns the current list of wait-time reports in reverse chronological order.

Response

[
  {
    "id": 1,
    "timestamp": "12:01 PM",
    "location": "Main Cafeteria",
    "waitTime": 25
  }
]

POST /api/wait-time

Submits a new wait-time report.

Request Body

{
  "location": "Main Cafeteria",
  "waitTime": 15
}

Response

{
  "success": true,
  "data": {
    "id": 3,
    "timestamp": "12:10 PM",
    "location": "Main Cafeteria",
    "waitTime": 15
  }
}

Note: The current API uses an in-memory store that resets on server restart. A persistent database (e.g. SQLite, PostgreSQL, or Supabase) is the recommended next step.


Data Science Integration

Every submitted report is structured to feed directly into a training pipeline. The campus_cafeteria_wait_times.csv file contains historical data used for initial model exploration in dataset.ipynb.

Planned DS work includes:

  • Peak-hour prediction based on day of week and time
  • Anomaly detection for unusually long waits
  • A recommendation model for optimal meal times

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/your-feature
  3. Commit your changes: git commit -m "Add your feature"
  4. Push to the branch: git push origin feature/your-feature
  5. Open a pull request

License

This project is for educational purposes as part of an induction programme. No license has been formally assigned.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages