Logo Lanfrica

Bryanna-21/KENYA-EATS-FRONTEND

Type de record:

software
Créateur:
Bry
Hôte:
# Kenya Eats — Customer Frontend React (Vite) customer-facing app: browse hotels, order, pay with M-Pesa, track delivery, and chat with the AI ordering assistant. ## Quick start ```bash cd frontend npm install npm run dev ``` Opens at **http://localhost:5173**. Requires the backend running at `localhost` (see `../backend/README.md`) — or set `VITE_API_BASE` in a `.env` file to point elsewhere. ## Structure ``` src/ api/client.js thin fetch wrapper around the backend API context/ AuthContext (JWT session), CartContext (cart state) components/Nav.jsx top nav + live "N hotels / N towns" ticker pages/ Home.jsx browse/search/filter hotels HotelDetail.jsx hotel menu + add to cart Cart.jsx, Checkout.jsx OrderDetail.jsx live order status (polls every 8s) Assistant.jsx AI chat + personalized recommendations Login.jsx, Register.jsx VendorDashboard.jsx for vendor-role accounts: register a hotel, manage incoming orders ``` Log in with the seeded demo customer account (`customer@kenyaeats.co.ke` / `customer123`) to try checkout and the AI recommendations feed end-to-end. ## Build for production ```bash npm run build ``` Outputs static files to `dist/` — deploy to any static host (Vercel, Netlify, S3+CloudFront, etc.) and point `VITE_API_BASE` at your deployed backend.