Prerequisites
Before installing KAIU Natural Living, ensure you have the following software installed:- Node.js: v20 or higher
- PostgreSQL: v14+ with pgvector extension enabled
- Redis Server: v6+ (local or remote)
- Git: For cloning the repository
Verify Prerequisites
Check your installed versions:Installation Steps
Install Dependencies
Install all required Node.js packages using npm:This will install all dependencies listed in
package.json, including:- Frontend libraries (React, Vite, TailwindCSS)
- Backend frameworks (Express, Prisma)
- AI/ML packages (LangChain, Anthropic)
- Queue management (BullMQ, Redis)
- Payment integration (Wompi)
Configure Environment Variables
Create environment configuration files:At minimum, add the following to
See the Environment Variables page for complete configuration details.
.env.local:Set Up the Database
Initialize the PostgreSQL database with Prisma:The seed command will populate your database with:
- Sample products and inventory
- Admin user accounts
- Knowledge base entries for RAG
Start the Development Environment
KAIU includes a magic script to start all services simultaneously:This script will:
- Start Redis server
- Launch the backend API on port 3001
- Start the Vite development server for the frontend
- Initialize BullMQ workers for WhatsApp queue processing
Verify Installation
Once all services are running, verify the installation:
- Frontend: Open http://localhost:5173
- API: Test with
curl http://localhost:3001/api/products - Dashboard: Navigate to http://localhost:5173/dashboard
Post-Installation
Create Admin User
If you skipped the seed step, create an admin user manually:Test API Endpoints
Test that the API is responding:Common Issues
Port Already in Use
Port Already in Use
If port 3001 or 5173 is already in use:
Prisma Connection Errors
Prisma Connection Errors
Ensure PostgreSQL is running and accessible:
Redis Connection Failed
Redis Connection Failed
Verify Redis is running:
Module Not Found Errors
Module Not Found Errors
If you encounter module errors, clear and reinstall:
Next Steps
Database Setup
Configure PostgreSQL and enable pgvector for RAG functionality
Environment Variables
Complete guide to all configuration options
WhatsApp Integration
Set up WhatsApp Cloud API for customer messaging
Redis Setup
Configure Redis for queue management