hp_chatbot/chat-interface/DEPLOY.md
michael 594f749d4c Initial commit: HP Marketing Materials GraphRAG Chatbot
Full-stack GraphRAG chatbot for HP marketing materials with:
- Python/Flask backend with custom ReAct agent (LlamaIndex)
- Neo4j knowledge graph + vector search hybrid retrieval
- LlamaParse multimodal document processing (text + images)
- React/Vite frontend with conversation management
- MongoDB conversation persistence
- MSAL authentication support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 08:37:58 -06:00

50 lines
No EOL
2 KiB
Markdown

# Deployment Instructions
## Files to Deploy
Deploy all files from the `dist` directory to your server at the path `/hp_chatbot/`.
## Changing the Backend URL
If you need to change the backend API URL:
1. Edit the `.env` and `.env.production` files to update the `VITE_BACKEND_URL` value
2. Or use the provided script: `./update-backend.sh` which will update the URL and rebuild the application
3. Then rebuild the application with `npm run build`
## Important Server Configuration
The application requires proper MIME type configuration to work correctly. Depending on your server type, use one of the following:
### Apache Server
Make sure the `.htaccess` file is included in your deployment. It contains:
- MIME type configurations
- URL rewrite rules for SPA routing
- CORS headers
### IIS Server
Make sure the `web.config` file is included in your deployment. It contains:
- MIME type configurations
- URL rewrite rules
- CORS headers
## Common Issues and Solutions
### JavaScript MIME Type Error
If you get an error like:
```
Loading module from "https://ai-sandbox.oliver.solutions/hp_chatbot/assets/index-XXXXX.js" was blocked because of a disallowed MIME type ("text/html").
```
Check that:
1. Your server is serving .js files with the correct MIME type: `application/javascript`
2. The `.htaccess` or `web.config` file is properly uploaded and enabled
3. Your server allows URL rewriting and custom MIME types
### Authentication Issues
- Make sure the Microsoft authentication is set up correctly
- The redirectUri in the MSAL configuration should match your deployment URL
- Check that cookies and localStorage are enabled in the browser
### API Connection Issues
- The app expects the backend API to be accessible at the configured URL (default: `https://ai-sandbox.oliver.solutions/hp_chatbot_back`)
- If you need to change the backend API URL, follow the instructions in "Changing the Backend URL" section above
- In development, API calls are proxied through Vite's development server
- In production, API calls go directly to the configured backend URL