Architecture
The system uses a robust and scalable stack:- Frontend: React + Vite + TailwindCSS (Dashboard & Store)
- Backend: Node.js + Express
- Database: PostgreSQL (Supabase) with
pgvectorextension for RAG - ORM: Prisma IO
- Queues / Background: BullMQ + Redis
- AI: Anthropic Claude 3 Haiku + LangChain
- Messaging: WhatsApp Cloud API
Deployment Options
You can deploy KAIU Natural Living using several platforms:1. Vercel (Recommended for Quick Setup)
Ideal for deploying both frontend and backend with serverless functions.- Zero-config deployment
- Automatic SSL certificates
- Edge network for fast global access
- Built-in environment variable management
2. Railway
Great for full-stack deployment with managed database and Redis.- Managed PostgreSQL and Redis instances
- Easy environment configuration
- Automatic deployments from Git
- Built-in metrics and logging
3. VPS (Virtual Private Server)
For maximum control and customization:- Full server access
- Custom configurations
- Self-managed infrastructure
- Cost-effective for high traffic
Infrastructure Requirements
Database
Recommended provider: Supabase- Includes
pgvectorextension by default - Generous free tier
- Automatic backups
- Real-time capabilities
Redis
Recommended provider: Upstash or Railway- Required for BullMQ job queues
- Background task processing
- Session management
Alternative: Railway for Both
Railway can host both PostgreSQL and Redis in a single platform, simplifying infrastructure management.Prerequisites
Before deploying, ensure you have:- Node.js v20+
- PostgreSQL database with
pgvectorenabled - Redis instance (local or remote)
- WhatsApp Cloud API credentials from Meta
- Anthropic API key for Claude 3 Haiku
Next Steps
Environment Setup
Configure production environment variables
Vercel Deployment
Deploy to Vercel in minutes
Railway Deployment
Full-stack deployment on Railway