Skip to content

fix: Local development workflow broken - proxy errors, bind mounts, and obsolete webui directory #337

@manavgup

Description

@manavgup

Problem

Local development workflow (make local-dev-all) has multiple critical issues:

1. ESLint Error - Obsolete webui/ Directory

ERROR: Cannot find module '/Users/.../webui/node_modules/eslint-plugin-testing-library/rules/__init__'
  • Frontend moved from webui/ to frontend/
  • Makefile still references webui/ directory (lines 317, 345, 356)
  • Causes frontend to fail to start

2. Proxy Configuration Error

Proxy error: Could not proxy request from localhost:3000 to http://backend:8000 (ENOTFOUND)
  • frontend/package.json proxy set to http://backend:8000 (Docker hostname)
  • Should be http://localhost:8000 for local dev
  • Blocks all API calls from frontend

3. Mock User Creation Failure

ERROR: User not found: ibm_id=mock-user-ibm-id
NotFoundError not caught in ensure_mock_user_exists()
  • backend/core/mock_auth.py:134 doesn't catch NotFoundError
  • Only catches ValueError, AttributeError, TypeError
  • Causes websocket authentication to fail

4. Data Persistence Broken

  • docker-compose-infra.yml uses driver_opts bind mount configuration
  • This doesn't work with Docker Compose 2.30.3
  • Results in Docker volumes instead of bind mounts
  • Data is lost on every restart

Impact

  • ❌ Frontend cannot start (ESLint error)
  • ❌ API calls fail (proxy error)
  • ❌ Authentication fails (user creation error)
  • ❌ Data loss on infrastructure restart (bind mount broken)

Local development is completely broken.

Solution

File Changes Required:

1. Makefile

  • Line 317: @cd frontend && npm install (not webui)
  • Line 329: @mkdir -p volumes/postgres volumes/etcd volumes/minio (create dirs before docker-compose)
  • Line 345: @cd frontend && npm run dev (not webui)
  • Line 356: @cd frontend && npm run dev > /tmp/rag-frontend.log 2>&1 & (not webui)

2. frontend/package.json

  • Line 43: "proxy": "http://localhost:8000" (not backend:8000)

3. backend/core/mock_auth.py

  • Line 16: Add from rag_solution.core.exceptions import NotFoundError
  • Line 134: Change except (ValueError, AttributeError, TypeError): to except (NotFoundError, ValueError, AttributeError, TypeError):

4. docker-compose-infra.yml

  • Line 16: Change - postgres_data:/var/lib/postgresql/data to - ./volumes/postgres:/var/lib/postgresql/data
  • Lines 145-165: Remove broken driver_opts volume definitions, use simple named volumes for etcd/minio/milvus

5. .gitignore

  • Add webui/ # Obsolete frontend directory (moved to frontend/)

Test Plan

  1. make local-dev-infra - infrastructure starts with bind mounts
  2. make local-dev-backend - backend starts without user creation errors
  3. make local-dev-frontend - frontend starts without ESLint errors
  4. ✅ Verify API calls work (no proxy errors)
  5. ✅ Verify data persists after docker-compose down && docker-compose up

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions