Skip to content

sridhars650/QuickQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

School Lunch App

Front end and back end implemented in order to make lines more manageable in schools. Has queues that can be joined and orders that can be placed. The administrator can add items, confirm orders, check sales data, and remove people from the queue.

Features

Student Features

  • Authentication: Register and log in using predefined student IDs (e.g., S1001, S1002).
  • Menu Browsing: View menu items categorized by Meat, Vegetarian, Sides, and Drinks. See prices, calories, dietary tags, and ratings.
  • Live Queue System:
    • Join the cafeteria qu ]\eue and monitor your position.
    • Estimated wait time calculations based on queue length.
    • Cooldown system to prevent spamming if removed from the queue.
  • Ordering & Checkout: Add items to a shopping cart and check out.
  • Reviews & Ratings: Leave ratings (1-10) and text reviews for menu items.

Admin Features

  • Queue Management: View all students currently in the queue along with their active orders.
  • Order Fulfillment: Mark orders as ready, removing the student from the queue and logging the sale.
  • Remove from Queue: Kick students out of the queue if necessary (imposes a cooldown for the student).
  • Sales History: Track revenue, items sold, and calculate estimated profit margins.
  • Menu Management: Add new items to the menu dynamically.
  • AI Insights: Generates actionable insights from recent sales data using a local LLM through Ollama.

Tech Stack

  • Frontend: Vanilla HTML, CSS, JavaScript (public/)
  • Backend: Node.js, Express.js
  • AI Integration: Ollama (requires local installation and the qwen2.5:1.5b model)

Prerequisites

  1. Node.js: Make sure Node.js is installed on your system.
  2. Ollama: For the Admin AI Insights feature to work, you must have Ollama running locally with the specific model downloaded.

Installation & Setup

  1. Clone the repository or open the project folder.
  2. Install the required Node dependencies:
    npm install
  3. Install Ollama and pull the required model (Optional, but needed for AI insights):
    ollama run qwen2.5:1.5b
    Ensure the Ollama server is running on the default port (http://127.0.0.1:11434).
  4. Start the server:
    node server.js
  5. Open your browser and navigate to http://localhost:3000.

Pre-defined Users

Students: Valid student IDs range from S1001 to S1010 (e.g., S1001 - Luffy, S1002 - Zoro). You must "Sign Up" first using one of these valid IDs and choosing a password before you can log in.

Admin:

  • Login ID: admin
  • Password: admin123

API Endpoints Overview

  • /api/signup (POST): Register a student account.
  • /api/login (POST): Authenticate user.
  • /api/menu (GET): Retrieve menu items and ratings.
  • /api/menu/:id/reviews (POST): Add a review to a menu item.
  • /api/queue (POST): Join the lunch queue.
  • /api/queue/status (GET): Get user's current queue position.
  • /api/admin/queue (GET): View the entire queue (Admin only).
  • /api/admin/queue/:studentId/ready (POST): Fulfill order and log sale (Admin only).
  • /api/admin/sales (GET): Retrieve sales metrics (Admin only).
  • /api/admin/ai-insights (GET): Get AI-generated sales insights (Admin only).
  • /api/admin/menu (POST): Create a new menu item (Admin only).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors