netflix/LOCAL_DEV.md
michael 236d1ddbd8 Initial commit: Netflix GraphRAG marketing chatbot
Full-stack application combining LlamaIndex vector search with Neo4j
knowledge graph (GraphRAG) for answering queries about Netflix marketing
materials. Flask/Hypercorn backend with custom ReAct agent, React frontend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 10:28:33 -06:00

1.6 KiB

Local Development Mode

This document explains how to run the Netflix GraphRAG application in local development mode without requiring MSAL authentication.

Authentication Bypass

When running the application in local development mode (PRODUCTION=false), the authentication system is automatically bypassed:

  1. The frontend will not redirect to Microsoft login
  2. A default user "dev_user@local" is automatically used for all API requests
  3. You can directly start using the application without any login

Setup Instructions

  1. Ensure you have a .env file in the project root with:

    PRODUCTION=false
    
  2. Start the backend server:

    python main.py
    
  3. Start the frontend development server:

    cd chat-interface
    npm run dev
    
  4. Access the application at http://localhost:5173

How it Works

  • The frontend (auth.js) automatically bypasses authentication checks when in development mode
  • The backend (routes.py) checks for PRODUCTION=false in all authenticated endpoints
  • When PRODUCTION=false and no username is provided, the backend uses "dev_user@local"
  • All conversations and messages will be associated with this default user

Switching to Production Mode

To disable the authentication bypass and use real MSAL authentication:

  1. Set PRODUCTION=true in your .env file
  2. Restart both frontend and backend servers

Troubleshooting

  • If you encounter authentication errors, make sure PRODUCTION is set to "false" in the .env file
  • Ensure the backend is running before accessing the frontend
  • Check for any error messages in both the frontend and backend consoles