Skip to content

Latest commit

 

History

History
162 lines (114 loc) · 2.68 KB

File metadata and controls

162 lines (114 loc) · 2.68 KB

🚀 Quick Start Guide

This guide will help you get the Support Bot project up and running in just a few minutes.

⚡ Quick Start (5 minutes)

1. Installation

cd /Users/hosmann/Projects/Orka/support-bot-rag

# Install all dependencies
npm install

2. Configuration

# Create .env files
cp .env.example .env
cp apps/backend/.env.example apps/backend/.env
cp apps/frontend/.env.example apps/frontend/.env

3. Add your OpenAI API key

Edit apps/backend/.env:

OPENAI_API_KEY=sk-your-api-key-here

4. Start the application

# Start backend + frontend
npm run dev

5. Access the application

Open your browser: http://localhost:3000

🐳 Docker Start

Option 1: Development mode

# Create the .env file
echo "OPENAI_API_KEY=sk-your-api-key" > .env

# Start
docker-compose -f docker-compose.dev.yml up

Option 2: Production mode

# Create the .env file
echo "OPENAI_API_KEY=sk-your-api-key" > .env

# Build and start
docker-compose up --build

🔧 Verification

Backend

curl http://localhost:3001/api/support/health

Expected response:

{
  "status": "healthy",
  "timestamp": "2024-03-06T15:30:00.000Z"
}

Frontend

Open http://localhost:3000 - you should see the Support Bot welcome screen.

🧪 Test the RAG

  1. Click "Start Chatting"
  2. Ask a question like:
    • "How do I get started?"
    • "What are the pricing plans?"
    • "How do I reset my password?"
  3. The bot should respond using the knowledge base

📝 Quick customization

Modify the knowledge base

Edit: apps/backend/src/support-bot/orka.service.ts

const supportDocuments = [
  {
    content: `# Votre nouveau contenu`,
    metadata: { category: 'custom', topic: 'example' },
  },
];

Change colors

Edit: apps/frontend/tailwind.config.ts

colors: {
  primary: {
    500: '#0ea5e9', // Change this color
  },
}

❓ Common issues

Port already in use

# Change the backend port
# Edit apps/backend/.env
PORT=3002

# Change the frontend port
# Edit apps/frontend/package.json
"dev": "next dev -p 3001"

Error "Cannot find module"

# Reinstall dependencies
rm -rf node_modules apps/*/node_modules
npm install

OpenAI API Error

Make sure:

  1. Your API key is valid
  2. You have OpenAI credits
  3. The key is in apps/backend/.env

📚 Next steps

🆘 Need help?

  • Check the logs: docker-compose logs -f
  • Consult the Orka AI documentation
  • Open an issue on GitHub