MAQPIE is the React/Vite frontend for the MAQPIE server stack.
It talks to the Django backend over REST and WebSocket endpoints.
- Node.js
>=20.19or>=22.12 - npm
- A running MAQPIE server backend at
http://localhost:8000/apiby default
From the iquip-web directory:
npm installFrom iquip-web:
npm run devBy default, the frontend expects the API base to be:
http://localhost:8000/api
To point the frontend to a different MAQPIE server:
VITE_API_BASE=http://<host>:8000/api npm run devCreate a production build with:
npm run buildPreview the built app locally with:
npm run previewThe frontend uses two communication paths:
- REST API for login, runs, files, panels, datasets, archives, and TTL commands
- WebSockets for live run updates, dataset streaming, and TTL status updates
The REST base is resolved in this order:
VITE_API_BASElocalStorage["api_base"]- fallback:
http://localhost:8000/api
WebSocket URLs are derived automatically from that API base in src/lib/api.ts.
src/main.tsx- React entry point
- mounts the app and provides the MUI theme
src/App.tsx- top-level desktop shell
- login screen
- global launcher buttons
- workspace strip
- renders windows, minimized windows, and minimized panels
src/styles.css- main visual styling for the desktop, windows, tabs, title bars, themes, and dock items
src/state/store.ts- window layout state
- minimized panel state
- active workspace tracking
- toasts and persistence
src/components/Window.tsx- draggable/resizable desktop window
- tab strip
- close/minimize/pop-out actions
src/components/ViewHost.tsx- routes a stored tab entry to the correct React view
src/components/MinimizedPanelCard.tsx- floating minimized panel widget
src/components/MinimizedWindowItem.tsx- dock-style minimized window item
src/views/RunsManagerView.tsx- experiment manager / run list
- run actions and status stream
src/views/FileExplorerView.tsx- server file browser for scripts / FPGA files
- panel creation entry point for scripts
src/views/ExperimentPanelView.tsx- experiment panel UI
- parameter editing, scheduling, and queueing runs
src/views/DataViewerView.tsx- dataset viewer
- plotting, querying, streaming, archive creation, CSV download
src/views/ArchivesView.tsx- archive list and archive opening/renaming/deletion
src/views/PanelConfigsView.tsx- saved panel configuration snapshots
src/views/TTLControlsView.tsx- TTL override / level control view
src/lib/api.ts- all frontend API calls
- auth header handling
- websocket URL helpers
- file download helpers
src/lib/types.ts- shared frontend TypeScript types for API payloads and view state
src/lib/windowFrame.ts- default window size/position presets
src/lib/workspaces.ts- helper types/utilities for workspace metadata
src/config/fileExplorer.ts- controls which file domains are exposed in the file explorer
- sets default type, visible choices, root labels, and script extension filtering
src/config/panels.ts- panel-related feature flags
- for example whether class selection is enabled
src/config/workspace.ts- top-level branding/workspace metadata such as team name and admin email
src/assets/- logos and static UI images
This file controls what the File Explorer shows.
Important fields:
defaultType- initial file domain when the explorer opens
availableTypes- which backend file domains are actually exposed in the UI
- example:
['script']or['script', 'fpga']
showTypeToggle- whether the type selector should appear
- it only shows when multiple
availableTypesexist
allowedExtensions- script-side filtering for visible files such as
['.qil']
- script-side filtering for visible files such as
rootLabels- display names for the root folder per file type
This file controls panel-specific frontend behavior. Right now it is mainly used for feature toggles such as class selection.
This file contains app-shell level metadata used in the UI, such as:
- team/workspace name
- admin/support email
npm run dev
npm run build
npm run lint
npm run preview- The UI expects authenticated MAQPIE server endpoints.
- Dataset downloads currently use the backend
download/endpoints and return CSV. - The project also includes internal docs in
docs/, including:docs/FRONTEND_API_REFERENCE.mddocs/DATA_BACKEND_GUIDE.md