Muxy

Documentation

Guide: Next.js + Django (Separate Repos)

Use this when frontend and backend live in different projects but you want one active workspace context for both.

Use Case

Frontend and backend are separate repos. You want one workspace to run both processes and keep browser sessions aligned.

Project Settings Explained

Frontend Project Template

Ports: FRONTEND_PORT, BACKEND_PORT
Process: API_URL=http://localhost:$BACKEND_PORT PORT=$FRONTEND_PORT npm run dev
Browser Session: http://localhost:$FRONTEND_PORT

The frontend workspace must own both ports if it is the central context for both services.

Workspace Override Process

cd /path/to/backend-project && python manage.py runserver 0.0.0.0:$BACKEND_PORT

Add this as a workspace-level process in the frontend workspace so both processes receive the same reserved env vars.

Why This Works

  • • Named ports are workspace-scoped, not cross-project global variables.
  • • Workspace overrides let one workspace run commands from another repo while staying in one orchestration context.
  • • Browser sessions can still use http://localhost:$FRONTEND_PORT and backend/admin URLs consistently.

Status Checks

curl -fsS http://localhost:$FRONTEND_PORT
curl -fsS http://localhost:$BACKEND_PORT/health

Detects partial outage early and helps avoid chasing frontend symptoms caused by backend failure.

Back to Cookbook Guides