File size: 2,485 Bytes
c5d140e
4859586
 
 
 
 
 
c5d140e
4859586
 
 
 
 
 
 
 
 
 
 
 
c5d140e
 
4859586
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
title: Kafe Nusantara - AI Barista
emoji: 
colorFrom: yellow
colorTo: gray
sdk: docker
app_port: 3000
pinned: false
license: mit
tags:
  - cafe
  - chatbot
  - ai-barista
  - indonesian
  - nextjs
  - semantic-search
  - ollama
  - qdrant
  - rag
short_description: AI-powered cafe ordering with semantic search & RAG chatbot
---

# ☕ Kafe Nusantara — AI-Powered Cafe Ordering Platform

A modern, full-stack cafe ordering platform built with **Next.js 16** featuring an intelligent **AI Barista** chatbot (Kafi) and **semantic search** for the menu.

## ✨ Features

- 🧠 **Semantic Menu Search** — Find menu items by meaning, not just keywords (powered by vector embeddings)
- 💬 **RAG-Powered AI Chatbot** — Kafi the barista uses your actual menu data for grounded responses
- 🛒 **Full Ordering System** — Cart, checkout, and kitchen dashboard
- 🔐 **Role-Based Auth** — Customer, kitchen staff, and admin roles
- 🇮🇩 **Bahasa Indonesia** — Native Indonesian language support

## 🏗️ Architecture

| Service | Technology | Purpose |
|---------|-----------|---------|
| Web App | Next.js 16 + TypeScript | Full-stack framework |
| Database | PostgreSQL 17 | Relational data |
| Vector DB | Qdrant | Semantic similarity search |
| Embeddings | multilingual-e5-small (HF TEI) | 384-dim multilingual vectors |
| LLM | Llama 3.2-1B via Ollama | Local AI chat inference |
| Auth | Better Auth | Authentication & RBAC |

## 🚀 Run Locally

```bash
# 1. Clone the repo
git clone https://huggingface.co/spaces/tristiyadi/kafe-nusantara
cd kafe-nusantara

# 2. Install dependencies
npm install --legacy-peer-deps

# 3. Copy environment config
cp .env.example .env

# 4. Start infrastructure (PostgreSQL, Qdrant, Embedding, LLM)
docker compose up -d --build

# 5. Initialize database
npm run db:all

# 6. Start the app
npm run dev
```

Visit **http://localhost:3000** 🎉

## 🤖 AI Model

The fine-tuned Kafi model is available separately:
👉 [kafi-barista-llama3.2-1b-gguf](https://huggingface.co/tristiyadi/kafi-barista-llama3.2-1b-gguf)

## 📖 Documentation

- See the full [README](https://github.com/tristiyadi/nextjs-cafe-order-chatbot-ai) for detailed setup and architecture docs
- [Fine-Tuning Guide](./docs/fine-tuning-guide.md) — How the Kafi model was trained
- [LLM Optimization Guide](./docs/llm-optimization-guide.md) — Production LLM tuning

## License

MIT License (application code) | Llama 3.2 Community License (AI model)