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>
2 KiB
2 KiB
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:
- Edit the
.envand.env.productionfiles to update theVITE_BACKEND_URLvalue - Or use the provided script:
./update-backend.shwhich will update the URL and rebuild the application - 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:
- Your server is serving .js files with the correct MIME type:
application/javascript - The
.htaccessorweb.configfile is properly uploaded and enabled - 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