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.
- 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.
- 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.
- Frontend: Vanilla HTML, CSS, JavaScript (
public/) - Backend: Node.js, Express.js
- AI Integration: Ollama (requires local installation and the
qwen2.5:1.5bmodel)
- Node.js: Make sure Node.js is installed on your system.
- Ollama: For the Admin AI Insights feature to work, you must have Ollama running locally with the specific model downloaded.
- Clone the repository or open the project folder.
- Install the required Node dependencies:
npm install
- Install Ollama and pull the required model (Optional, but needed for AI insights):
Ensure the Ollama server is running on the default port (
ollama run qwen2.5:1.5b
http://127.0.0.1:11434). - Start the server:
node server.js
- Open your browser and navigate to
http://localhost:3000.
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/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).