Skip to content

Add Vite dev server integration with backend proxy #826

@Tim020

Description

@Tim020

Problem

Currently, the Vite dev server cannot be used for local development because:

  • Frontend runs on port 5173 (Vite default)
  • Backend runs on port 8080
  • No proxy configuration exists to forward API requests from dev server to backend
  • This prevents hot reload during development

Proposed Solution

Configure Vite dev server to proxy API requests to the backend server:

// vite.config.js
export default defineConfig({
  // ... existing config
  server: {
    proxy: {
      '/api': {
        target: 'http://localhost:8080',
        changeOrigin: true,
      },
      '/ws': {
        target: 'ws://localhost:8080',
        ws: true,
      },
    },
  },
});

Benefits

  • Enable hot module replacement (HMR) during development
  • Faster iteration cycles for frontend changes
  • Better developer experience

Implementation Notes

  • Need to ensure WebSocket connections work through proxy
  • Consider adding npm run dev script to package.json
  • Update CLAUDE.md with development workflow documentation
  • Test authentication flow with proxied requests

Estimated Effort

1-2 hours (config + testing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    claudeIssues created by Claude

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions