Skip to content

MINHLEFORME123/Minhkiot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

🚀 MinhKiot - Smart Restaurant POS & Kiosk System

MinhKiot is a modern, real-time Point of Sale (POS) and Customer Kiosk system designed specifically for restaurants in Finland. Built with a focus on automation and multi-language support, it bridges the gap between international customers and local restaurant operations.This project tested in Hanoi Quan Kamppi,Helsinki


🌟 Key Features

1. 🛒 Customer Kiosk (customer.html)

  • Multi-Language UI: Supports English, Finnish (Suomi), and Vietnamese.
  • Interactive Table Map: Visual table selection using an integrated floor plan map (map.png) or a Takeaway option.
  • Lounas (Lunch) Logic: Automatically applies lunch discounts and displays items based on specific time windows (10:00 - 15:00, Mon-Fri).
  • Dynamic Customization: Support for drink sizes (M/L) and special cooking notes for every item.

2. 👨‍🍳 Cashier Dashboard (cashier.html)

  • Real-Time Synchronization: Orders appear instantly via Firebase Firestore listeners without page refreshes.
  • Automated Translation: Automatically translates customer notes from Finnish/English into Vietnamese using Google Cloud Translation API to assist kitchen staff.
  • Efficiency Tracking: Color-coded order cards that highlight wait times:
    • Warning (Orange): Orders waiting over 5 minutes.
    • Urgent (Red/Pulse): Orders waiting over 10 minutes.

3. 🛠️ Admin Panel (admin.html)

  • Gaming-Inspired UI: A unique "Cyberpunk/Game" aesthetic featuring glitch effects, scanlines, and animated character loading screens.
  • Menu Management: Full CRUD (Create, Read, Update, Delete) capabilities with image-to-Base64 conversion for easy storage.
  • User Management: Role-based access control for Admins, Managers, Cashiers, and Customers.
  • Data Portability: Export and import the entire menu database as JSON files for backup.

🛠️ Tech Stack

  • Frontend: Vanilla JavaScript (ES6+), HTML5, CSS3 (Advanced Animations & Grid).
  • Backend: Firebase (Firestore & Analytics).
  • External APIs: Google Cloud Translation V2.

🚀 Setup & Installation

Follow these steps to get your own instance of MinhKiot running:

1. Firebase Project Setup

  1. Go to the Firebase Console and create a new project.
  2. Enable Firestore Database in production or test mode.
  3. Register a Web App in your Firebase project settings to obtain your firebaseConfig credentials.

2. Update Configuration in Code

Update the firebaseConfig object in the following files with your unique credentials:

  • admin.html
  • cashier.js
  • customer.js
  • index.html
const firebaseConfig = {
  apiKey: "YOUR_API_KEY",
  authDomain: "your-project.firebaseapp.com",
  projectId: "your-project",
  storageBucket: "your-project.firebasestorage.app",
  messagingSenderId: "...",
  appId: "...",
  measurementId: "..."
};

3. Firestore Collection Structure

To ensure the system functions correctly, your Firestore database must contain the following collections:

  • users: Contains user credentials and access levels. Each document should have username, password, and role (options: admin, manager, cashier, customer).
  • menu: Stores the dish database. Fields include name (vi/en/fi), price (support for fixed prices or M/L sizes), category, ingredients (vi/en/fi), image (Base64 format), and originalPrice (used for Lounas discounts).
  • categories: A simple list of food categories (e.g., "nước", "xào", "lounas") to populate the menu filters.
  • orders: Real-time order tracking. Each order includes tableNumber (or "Takeaway"), items array, total, paymentMethod, status ("pending" or "completed"), and the customer's language.
  • api_keys: A dedicated collection to store the apiKey for the Google Cloud Translation service, allowing the staff to translate customer notes automatically.

4. Advanced Logic & Setup

🌍 Automated Translation Service

MinhKiot features an automated translation system for order notes:

  • Staff can view Finnish or English notes translated into Vietnamese in real-time.
  • Requirement: You must enable the Cloud Translation API in your Google Cloud Console and store the key in the api_keys collection.

🕒 Smart Lounas (Lunch) Logic

The system includes time-aware logic for Finnish lunch hours:

  • Schedule: 10:00 - 15:00, Monday to Friday.
  • Behavior: Outside these hours, Lounas items are automatically grayed out and cannot be added to the cart.
  • Pricing: The system displays the original price with a strike-through and a discount percentage during Lounas hours.

⚡ Real-Time Dashboard

  • The Cashier interface uses Firestore onSnapshot listeners to detect new orders instantly without refreshing.
  • Order cards change color to Orange (Warning) after 5 minutes and Red (Urgent) with a pulse animation after 10 minutes of waiting.

5. Deployment & Credits

🚀 Deployment

Since the project is a purely client-side web application, it can be deployed easily:

  1. Firebase Hosting: Recommended for seamless integration with Firestore.
  2. Local Development: Run via VS Code Live Server for immediate testing.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors