feat: initial foundation for collaborative canteen ordering system in vanilla PHP
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
# CanteenHub - Multi-User Collaborative Canteen & Food Ordering System
|
||||
|
||||
A zero-framework PHP application built to replace informal Mattermost/chat lunch ordering threads. Anyone on the team can log in, start a food session, join any colleague's session, and place their own orders with automatic bill calculation upon food arrival.
|
||||
|
||||
---
|
||||
|
||||
## Key Features
|
||||
|
||||
1. **User Authentication (Zero Framework)**:
|
||||
- Login (`/login`) & Register (`/register`) with secure password hashing (`password_hash()`).
|
||||
- Pre-seeded test accounts (Password: `password`):
|
||||
- `dea` (Dea - Coordinator)
|
||||
- `alex` (Alex Turner)
|
||||
- `sarah` (Sarah Jenkins)
|
||||
- `budi` (Budi Santoso)
|
||||
- `michael` (Michael Chen)
|
||||
- 1-click Quick Demo Account switcher on login page.
|
||||
|
||||
2. **Session Creation by Anyone**:
|
||||
- Any team member can click **"➕ Start a Food Session"** to coordinate canteen lunch, boba/coffee runs, or snack orders.
|
||||
- Hosts paste today's menu choices directly from chat (no prices needed upfront).
|
||||
|
||||
3. **Self-Ordering from Any Session**:
|
||||
- Logged-in colleagues browse all active sessions on the dashboard.
|
||||
- **Multi-Select Interactive Menu**: Click multiple items, adjust quantities (`+` / `-`), and add specific notes (*"no spicy"*, *"extra egg"*).
|
||||
- The app automatically assigns the order to the authenticated coworker.
|
||||
|
||||
4. **Grouped Canteen Placement & Bill Settlement**:
|
||||
- 1-Click **"Copy Canteen Text"** aggregates quantities into a formatted WhatsApp/chat message.
|
||||
- When food arrives with the receipt, the host enters the final prices per item.
|
||||
- The app automatically computes every coworker's personal bill!
|
||||
- 1-Click **"Copy Mattermost Breakdown"** generates a ready-to-paste markdown table tagging `@coworker` with their exact individual bill and payment status (`Unpaid` / `Paid`).
|
||||
|
||||
---
|
||||
|
||||
## How to Run
|
||||
|
||||
### Option 1: PHP Built-in Server (`php -S`)
|
||||
```bash
|
||||
php -S localhost:8000 -t public
|
||||
```
|
||||
Visit: `http://localhost:8000`
|
||||
|
||||
---
|
||||
|
||||
### Option 2: Docker Compose
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
```
|
||||
Visit: `http://localhost:8080`
|
||||
|
||||
To stop:
|
||||
```bash
|
||||
docker compose down
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Option 3: Apache
|
||||
Point your Apache VirtualHost `DocumentRoot` to `public/` directory (rewrites handled by [`public/.htaccess`](file:///home/supanadit/Workspaces/Scalar/PHP/order-system/public/.htaccess)).
|
||||
Reference in New Issue
Block a user