Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.openchatwidget.com/llms.txt

Use this file to discover all available pages before exploring further.

This example runs Open Chat Widget in a Vite frontend with an Express backend. The backend uses gpt-5-mini and enables OpenAI’s native web_search tool.

Key files

  • examples/basic-react-express-app/src/App.tsx
  • examples/basic-react-express-app/server/index.ts
  • examples/basic-react-express-app/README.md

Run it

  1. Install dependencies:
cd /Users/matt8p/Desktop/openchatwidget/examples/basic-react-express-app
npm install
  1. Configure environment variables:
cp .env.example .env
OPENAI_API_KEY=your_key_here
  1. Start both the frontend and backend:
npm run dev
  • Frontend: http://localhost:5173
  • API: http://localhost:8787/api/chat
The landing page mounts <OpenChatWidget />, and the widget streams responses from the Express POST /api/chat endpoint.

View repo folder

Open the full example source on GitHub.