Skip to content

Platform e-commerce modern untuk UMKM kuliner dengan AI assistant terintegrasi

License

Notifications You must be signed in to change notification settings

biezz-2/KulinaAI

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Next.js 14 React 18 TypeScript Tailwind CSS Framer Motion

๐Ÿฝ๏ธ Ridha Foods - UMKM Kuliner

Platform e-commerce modern untuk UMKM kuliner dengan AI assistant terintegrasi

Demo โ€ข Fitur โ€ข Tech Stack โ€ข Quick Start โ€ข Arsitektur โ€ข API โ€ข Kontribusi


๐Ÿ“ธ Demo

๐Ÿ  Homepage
Hero section dengan statistik dan menu unggulan
๐Ÿค– AI Assistant
Chatbot multi-provider untuk rekomendasi menu
๐Ÿ“‹ Katalog Menu
Filter interaktif berdasarkan kategori
๐Ÿ“„ Detail Menu
Halaman detail dengan pairing suggestions

๐Ÿ”— Live Demo: Jalankan npm run dev dan buka http://localhost:3000 atau bisa akses mirror berikut https://testhac.biezz.my.id https://hackathonweb2.biezz.my.id https://kulinaai.biezz.my.id https://kulina-ai.vercel.app


โœจ Fitur Utama

๐Ÿ  Landing Page yang Menarik

Fitur Deskripsi
Hero Section Statistik real-time (25K+ menu terjual, rating 4.8/5) dengan dual CTA
Menu Showcase Grid menu unggulan dengan badge kategori dan label best seller
Selling Points Animasi hover effect menggunakan Framer Motion
Testimonials Review pelanggan dalam layout card yang elegan
CTA Section Promosi catering dengan gradient background

๐Ÿค– AI Chat Assistant (RAG-Style)

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  ๐Ÿค– Chatbot Features                                        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  โœ… Multi-provider: Claude, Gemini, Kolosal                 โ”‚
โ”‚  โœ… Context-aware dengan data menu UMKM                     โ”‚
โ”‚  โœ… Rekomendasi porsi & pairing otomatis                    โ”‚
โ”‚  โœ… Sanitasi input (redaksi email & telepon)                โ”‚
โ”‚  โœ… Suggestion chips untuk quick questions                  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“‹ Katalog Menu Interaktif

  • 7 Filter Dinamis: Semua, Pedas, Tidak Pedas, Keluarga, Personal, Dingin, Hangat
  • Responsive Grid: Otomatis menyesuaikan jumlah kolom
  • Static Generation: Pre-rendered untuk performa optimal
  • Detail Page: Gambar HD, tags, dan CTA ke AI chat

๐ŸŽจ Desain Modern

  • ๐ŸŒ™ Dark Theme dengan mesh gradient yang elegan
  • ๐Ÿ–ฑ๏ธ Custom Cursor dengan snap-to-element effect
  • โœจ Smooth Animations menggunakan Framer Motion
  • ๐Ÿ“ฑ Mobile-First responsive design

๐Ÿ› ๏ธ Teknologi

Tech Stack Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        FRONTEND                              โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Next.js 14.2      โ”‚  App Router, SSG, API Routes           โ”‚
โ”‚  React 18.3        โ”‚  Server Components, Hooks               โ”‚
โ”‚  TypeScript 5.6    โ”‚  Full type safety                       โ”‚
โ”‚  Tailwind CSS 3.4  โ”‚  Utility-first styling                  โ”‚
โ”‚  Framer Motion 12  โ”‚  Animations & transitions               โ”‚
โ”‚  Lucide React      โ”‚  SVG icon library                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        BACKEND                               โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  API Routes        โ”‚  Serverless endpoints                   โ”‚
โ”‚  AI Proxy Layer    โ”‚  Multi-provider integration             โ”‚
โ”‚  Input Sanitizer   โ”‚  PII redaction & validation             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Dependencies

Package Version Purpose
next 14.2.10 React framework
react 18.3.1 UI library
typescript 5.6.3 Type system
tailwindcss 3.4.14 CSS framework
framer-motion 12.23.25 Animations
lucide-react 0.556.0 Icons
clsx 2.1.1 Classname utility
tailwind-merge 3.4.0 Tailwind class merging

๐Ÿš€ Quick Start

Prerequisites

node --version  # v18.0.0 atau lebih tinggi
npm --version   # v8.0.0 atau lebih tinggi

Installation

# 1๏ธโƒฃ Clone repository
git clone https://github.com/yourusername/ridha-foods.git
cd ridha-foods

# 2๏ธโƒฃ Install dependencies
npm install

# 3๏ธโƒฃ Setup environment (opsional untuk AI chat)
cp .env.example .env.local
# Edit .env.local dengan API key Anda

# 4๏ธโƒฃ Jalankan development server
npm run dev

๐ŸŒ Buka di Browser

http://localhost:3000

Environment Variables

Buat file .env.local di root project:

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
# ๐Ÿ”‘ AI PROVIDER CONFIGURATION
# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

# Kolosal API (required untuk provider Kolosal)
KOLOSAL_API_KEY=your_kolosal_api_key_here
KOLOSAL_MODEL=Llama 4 Maverick

# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
# ๐Ÿ”— OPTIONAL: Override Provider URLs
# โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

# PROVIDER_BASEURL_CLAUDE=https://your-claude-endpoint.com
# PROVIDER_BASEURL_GEMINI=https://your-gemini-endpoint.com
# PROVIDER_BASEURL_KOLOSAL=https://api.kolosal.ai/v1/chat/completions

๐Ÿ“ Arsitektur

Project Structure

๐Ÿ“ฆ ridha-foods/
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ public/                    # Static assets
โ”‚   โ””โ”€โ”€ favicon.svg
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ src/
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ app/                   # Next.js App Router
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ layout.tsx         # Root layout (fonts, metadata)
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ page.tsx           # Homepage
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ globals.css        # Global styles
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ menu/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ page.tsx       # Katalog menu + filter
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ [id]/
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ ๐Ÿ“„ page.tsx   # Detail menu (SSG)
โ”‚   โ”‚   โ”‚
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ api/
โ”‚   โ”‚       โ”œโ”€โ”€ ๐Ÿ“‚ chat/
โ”‚   โ”‚       โ”‚   โ””โ”€โ”€ ๐Ÿ“„ route.ts   # AI chat endpoint
โ”‚   โ”‚       โ””โ”€โ”€ ๐Ÿ“‚ health/
โ”‚   โ”‚           โ””โ”€โ”€ ๐Ÿ“„ route.ts   # Health check
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ components/            # React Components
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ hero.tsx           # Hero section
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ menu-showcase.tsx  # Menu grid
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ selling-points.tsx # USP cards
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ testimonials.tsx   # Customer reviews
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ cta-section.tsx    # Call-to-action
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ floating-chat.tsx  # ๐Ÿค– AI chatbot widget
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ navbar.tsx         # Navigation
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ cursor.tsx         # Custom cursor
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Tabs.tsx           # Tab component
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ TabSelect.tsx      # Tab selector
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ ui/
โ”‚   โ”‚       โ””โ”€โ”€ ๐Ÿ“„ card-hover-effect.tsx
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ data/
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“„ menu.ts            # Menu data & types
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ ๐Ÿ“‚ lib/
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ aiClient.ts        # AI provider integration
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ aiSanitizer.ts     # Input sanitization
โ”‚       โ””โ”€โ”€ ๐Ÿ“„ utils.ts           # Utility functions (cn)
โ”‚
โ”œโ”€โ”€ ๐Ÿ“„ tailwind.config.ts         # Tailwind configuration
โ”œโ”€โ”€ ๐Ÿ“„ next.config.mjs            # Next.js configuration
โ”œโ”€โ”€ ๐Ÿ“„ tsconfig.json              # TypeScript configuration
โ””โ”€โ”€ ๐Ÿ“„ package.json               # Dependencies

Component Flow

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      layout.tsx                              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚
โ”‚  โ”‚  Cursor + Navbar                                      โ”‚    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚
โ”‚  โ”‚                    page.tsx                           โ”‚    โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”             โ”‚    โ”‚
โ”‚  โ”‚  โ”‚   Hero   โ”‚ โ”‚  Menu    โ”‚ โ”‚ Selling  โ”‚             โ”‚    โ”‚
โ”‚  โ”‚  โ”‚ Section  โ”‚ โ”‚ Showcase โ”‚ โ”‚  Points  โ”‚             โ”‚    โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜             โ”‚    โ”‚
โ”‚  โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                          โ”‚    โ”‚
โ”‚  โ”‚  โ”‚Testimoni โ”‚ โ”‚   CTA    โ”‚                          โ”‚    โ”‚
โ”‚  โ”‚  โ”‚   als    โ”‚ โ”‚ Section  โ”‚                          โ”‚    โ”‚
โ”‚  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                          โ”‚    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚
โ”‚  โ”‚               FloatingChat (Fixed)                    โ”‚    โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”Œ API Reference

POST /api/chat

AI chat endpoint dengan multi-provider support.

Request

POST /api/chat HTTP/1.1
Content-Type: application/json

{
  "question": "Rekomendasi menu untuk 10 orang?",
  "provider": "claude",
  "context": "Katalog menu..."
}
Field Type Required Description
question string โœ… Pertanyaan user
provider string โŒ claude | gemini | kolosal (default: claude)
context string โŒ Context menu (auto-generated jika tidak ada)

Response

{
  "message": "Untuk 10 orang, saya sarankan Paket Keluarga...",
  "provider": "claude"
}

Error Responses

Status Body Cause
400 {"error": "Pertanyaan kosong."} Empty question
502 {"error": "Gagal memanggil AI"} AI provider error

GET /api/health

Health check endpoint.

Response

{
  "status": "ok",
  "timestamp": "2024-12-07T10:00:00.000Z"
}

๐Ÿ“Š Data Model

MenuItem Type

type MenuItem = {
  id: string;              // Unique identifier (slug)
  name: string;            // Nama menu
  description: string;     // Deskripsi menu
  price: number;           // Harga (IDR)
  category: string;        // Kategori
  tags: string[];          // Tags untuk filtering
  spicyLevel?: number;     // Level pedas 1-5
  bestSeller?: boolean;    // Flag best seller
  imageUrl: string;        // URL gambar (Unsplash)
  profile: {
    spice: "pedas" | "tidak pedas";
    serve: "keluarga" | "personal";
    temp: "hangat" | "dingin";
  };
};

Sample Data

Menu Price Category Profile
Rendang Rumah Rp68.000 Lauk Rumahan ๐ŸŒถ๏ธ Pedas, ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Keluarga, ๐Ÿ”ฅ Hangat
Ayam Bakar Madu Rp54.000 Lauk Rumahan ๐ŸŒฟ Tidak Pedas, ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Keluarga, ๐Ÿ”ฅ Hangat
Nasi Liwet Komplit Rp49.000 Nasi Box ๐ŸŒฟ Tidak Pedas, ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Keluarga, ๐Ÿ”ฅ Hangat
Sambal Matah Fresh Rp18.000 Sambal ๐ŸŒถ๏ธ Pedas, ๐Ÿ‘ค Personal, โ„๏ธ Dingin
Es Cincau Kelapa Rp22.000 Minuman ๐ŸŒฟ Tidak Pedas, ๐Ÿ‘ค Personal, โ„๏ธ Dingin

๐ŸŽจ Design System

Color Palette

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  PRIMARY COLORS                                              โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Dark        #0b1021   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Background utama           โ”‚
โ”‚  Brand 500   #2d6bfa   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Primary brand color        โ”‚
โ”‚  Accent      #f59e0b   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  Highlights, CTAs           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  BRAND SCALE                                                 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  50   #f0f7ff   โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘                                    โ”‚
โ”‚  100  #d7e9ff   โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘                                    โ”‚
โ”‚  200  #b3d5ff   โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’                                    โ”‚
โ”‚  300  #82b6ff   โ–’โ–’โ–’โ–’โ–’โ–’โ–’โ–’                                    โ”‚
โ”‚  400  #4d90ff   โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“                                    โ”‚
โ”‚  500  #2d6bfa   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ                                    โ”‚
โ”‚  600  #1d4ae3   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ                                    โ”‚
โ”‚  700  #173ab5   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ                                    โ”‚
โ”‚  800  #153291   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ                                    โ”‚
โ”‚  900  #132d78   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ                                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Typography

Font Usage Weights
Space Grotesk Headlines, display text 400-700
Manrope Body text, paragraphs 400-600

Shadows

/* Card shadow - untuk elevated components */
shadow-card: 0 25px 50px -12px rgba(0,0,0,0.3)

/* Soft shadow - untuk subtle elevation */
shadow-soft: 0 10px 30px rgba(0,0,0,0.12)

๐Ÿ“ Available Scripts

Script Command Description
Dev npm run dev Start development server with hot reload
Build npm run build Create optimized production build
Start npm run start Run production server
Lint npm run lint Run ESLint for code quality
Type Check npm run typecheck TypeScript type checking

๐Ÿ”ง Configuration Files

tailwind.config.ts

  • Custom font families (Space Grotesk, Manrope)
  • Extended color palette dengan brand colors
  • Custom shadows (card, soft)
  • Mesh gradient background

next.config.mjs

  • Image optimization settings
  • External image domains whitelist

tsconfig.json

  • Path aliases: @/* โ†’ src/*
  • Strict mode enabled
  • ES2017 target

๐Ÿ”’ Security Features

Input Sanitization (aiSanitizer.ts)

// Otomatis redaksi data sensitif
sanitizeQuestion("Email saya john@gmail.com")
// โ†’ "Email saya [REDACTED_EMAIL]"

sanitizeQuestion("WA 081234567890")
// โ†’ "WA [REDACTED_PHONE]"

Server-Only Functions

  • AI client hanya berjalan di server
  • API keys tidak terekspos ke client
  • Environment variable validation

๐Ÿค Kontribusi

Kami menyambut kontribusi dari komunitas!

How to Contribute

# 1๏ธโƒฃ Fork repository
# Klik tombol "Fork" di GitHub

# 2๏ธโƒฃ Clone fork Anda
git clone https://github.com/YOUR_USERNAME/ridha-foods.git

# 3๏ธโƒฃ Buat branch fitur
git checkout -b feature/amazing-feature

# 4๏ธโƒฃ Commit perubahan
git commit -m "feat: add amazing feature"

# 5๏ธโƒฃ Push ke branch
git push origin feature/amazing-feature

# 6๏ธโƒฃ Buat Pull Request
# Buka GitHub dan klik "New Pull Request"

Commit Convention

Type Description
feat Fitur baru
fix Bug fix
docs Dokumentasi
style Formatting, styling
refactor Refactoring code
test Testing
chore Maintenance

๐Ÿ“„ License

MIT License

Copyright (c) 2024 Ridha Foods

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

๐Ÿ“ž Kontak

Email


๐Ÿ™ Acknowledgments


Made with โค๏ธ for UMKM Indonesia ๐Ÿ‡ฎ๐Ÿ‡ฉ

โฌ†๏ธ Kembali ke Atas

About

Platform e-commerce modern untuk UMKM kuliner dengan AI assistant terintegrasi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.6%
  • Other 1.4%