Skip to content

Basketic-2025/kukutu-eats

Repository files navigation

KUKUKU EATS

Nairobi fusion delivery · Modern React + Express · AI-assisted ordering

Vercel Render Supabase React Express TypeScript


Food delivery platform for bold Nairobi fusion cuisine. The project ships a modern React frontend, a TypeScript/Express API, Supabase persistence, and an AI-assisted chatbot that can help diners pick meals or manage their cart.

Table of Contents

Highlights

  • Complete ordering flow: browse the menu, add to cart, checkout, track orders.
  • AI assistant powered by local Ollama models for natural menu conversations.
  • Responsive UI with dark mode, animated micro-interactions, and accessibility focus.
  • Supabase-backed data layer with menu, orders, payments, and user auth.
  • Production-ready DX: TypeScript everywhere, ESLint/Prettier, unit tests, seeds, and scripts.

Tech Stack

Frontend

  • React 18 with TypeScript and Vite
  • Tailwind CSS for styling
  • TanStack Query for data fetching/caching
  • Zustand for cart and session state

Backend

  • Node.js + Express (TypeScript)
  • Supabase Postgres via @supabase/supabase-js
  • JWT auth, secure cookies, rate limiting, compression, helmet, CORS

AI / Tooling

  • Ollama + Mistral 7B (optional chatbot brain)
  • Jest, ESLint, Prettier, Husky hooks
  • npm workspaces

Getting Started

Prerequisites

  • Node.js 18+
  • Supabase project (database + anon key)
  • Optional: Ollama installed locally if you want the chatbot experience

Installation

git clone <repository-url>
cd kukutu-eats-web
npm install

Configure Supabase

  1. In the Supabase SQL editor, run the statements in server/database-schema.sql.
  2. Copy your project URL and anon key from Project Settings -> API.

Environment Variables

Create .env files for both workspaces.

server/.env

PORT=4000
NODE_ENV=development
JWT_SECRET=replace-with-strong-secret
JWT_REFRESH_SECRET=replace-with-strong-refresh-secret
SUPABASE_URL=https://<your-project-id>.supabase.co
SUPABASE_ANON_KEY=<your-anon-key>
FRONTEND_URL=http://localhost:5174
FRONTEND_URLS=http://localhost:5174
DATA_DIR=./data
COOKIE_SECURE=false

client/.env

VITE_API_URL=http://localhost:4000/api

Running the App

Option 1: start everything from the monorepo root

npm run dev

This runs both the Express API (server/) and the Vite dev server (client/) concurrently.

Option 2: run services separately

# terminal 1
cd server
npm run dev

# terminal 2
cd client
npm run dev

Open the browser to http://localhost:5174 for the web app and http://localhost:4000/health to confirm the API is healthy.

Useful scripts

npm run build         # Build backend + frontend bundles
npm run lint          # Lint all workspaces
npm run typecheck     # TypeScript projects
npm run test          # Jest tests across packages
npm run seed --workspace=server   # Reset and seed data locally

Chatbot Capabilities

The chatbot blends scripted flows with LLM-powered responses.

  • Conversational menu exploration (for example dietary restrictions or spice levels).
  • Direct cart manipulation (add or remove items, suggest combos).
  • Context memory across a session.

Example dialogue:

User: Add chicken ramen to my cart.
Bot: Perfect! Added Miso Fire Chicken Ramen to your cart for KES 950.

User: I'm vegan, what should I try?
Bot: Go for the Lemongrass Tofu Poke Bowl or Gochujang Glazed Cauli Bites - both are marked vegan.

REST API Snapshot

Method Endpoint Description
GET /api/menu List menu items with optional filters
GET /api/menu/:slug Retrieve a single menu item
POST /api/orders Place an order
POST /api/auth/login Authenticate a user
POST /api/chatbot/chat Chatbot interaction endpoint

Additional routes cover admin CRUD, payments, and account management. Check the server/src/routes directory for full coverage.

Project Structure

kukutu-eats-web/
|-- client/
|   |-- src/components/
|   |-- src/pages/
|   |-- src/hooks/
|   |-- src/stores/
|   `-- src/api/
|-- server/
|   |-- src/routes/
|   |-- src/services/
|   |-- src/db/
|   |-- src/middleware/
|   `-- src/scripts/
`-- packages/
    `-- types/

Contributing

  1. Fork the repo and create a feature branch.
  2. Run linting and tests before pushing.
  3. Open a pull request with screenshots or GIFs for UI work.

License

MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors