Skip to content
COMP 523.002 · Team C

Platform selection

How client constraints shaped every choice below: the LieOptics backend is Python and must not be modified; the client wants a cross-platform tool a student or researcher can install and use without writing code; and the team's strongest skills are web technologies, not desktop Python GUI frameworks. Each decision lists the alternatives first, then the choice and why.

← All deliverables

Language (front end)

Decided

TypeScript

Chosen

Pros

  • Static types catch mismatches between the UI and the API layer early.
  • Typed API interface lets a mock and the real backend be swapped.
  • Team already knows it.

Cons

  • Adds a compile step and some configuration.

TypeScript handbook

Plain JavaScript

Pros

  • No build-time type checking to configure.

Cons

  • Errors surface at runtime, which is costly with numeric optics data.

MDN JavaScript guide

Decision: TypeScript. The API contract with the backend is the riskiest seam, and types make it explicit and checkable.

Frontend framework

Decided

React (with Vite)

Chosen

Pros

  • Component model fits builder form, canvas, and results panels.
  • Large ecosystem of plotting and canvas libraries.
  • Vite gives fast reloads and simple builds.

Cons

  • State management for the lens model needs deliberate design.

React documentationVite guide

Vue

Pros

  • Gentle learning curve and good docs.

Cons

  • Less team experience; smaller pool of optics/plotting examples.

Vue documentation

Decision: React with Vite, because the team has the most experience with it and the ecosystem covers every UI need.

Application shell and architecture

Decided

Electron desktop app

Chosen

Pros

  • One codebase for Windows, macOS, and Linux.
  • Works offline and has native file access for save/load.
  • Can start the Python backend alongside the UI.

Cons

  • Large installer; heavier than a native app.

Electron documentation

Browser-based web app

Pros

  • No install; easy to share a link.

Cons

  • No native file access.
  • Python backend must be hosted or installed separately.

File System Access API

Python-native GUI (PyQt or Tkinter)

Pros

  • Calls the backend in-process with no API layer.

Cons

  • Team lacks desktop Python GUI experience.
  • Harder to build rich interactive plots and a canvas builder.

Qt for Python

Decision: Electron with a client–server layout as the target. It satisfies the cross-platform and offline needs, plays to the team's web skills, and keeps the client's backend untouched. Per the 10/1 team decision we build web-first (Vite + React + TypeScript) and add Electron packaging once the UI direction is settled, so the renderer is a normal web app from day one.

Backend bridge

Proposed

Thin local Python service (HTTP)

Chosen

Pros

  • Clean, testable boundary between UI and LieOptics.
  • Same interface works for a mock, a local service, or a remote host.

Cons

  • A second process to start, monitor, and package.

FastAPI documentation

Electron child process over stdin/stdout

Pros

  • No network port; simpler packaging.

Cons

  • Custom message protocol; harder to test and reuse outside Electron.

Node child_process

Rewrite the analysis in JavaScript

Pros

  • Single runtime.

Cons

  • Violates the no-backend-changes constraint and duplicates the client's work.

Decision: A thin local HTTP service wrapping the existing package. Revisit the child-process option when Electron packaging begins.

Data and visualization

Proposed

Plotly.js for plots, HTML canvas for the lens layout

Chosen

Pros

  • Ready-made scatter, heatmap, and contour plots with zoom and hover.
  • Canvas gives full control of the layout sketch.

Cons

  • Plotly adds bundle size.

Plotly.js documentation

D3

Pros

  • Maximum control over every visual detail.

Cons

  • Much more code for standard scientific plots.

D3 documentation

Decision: Plotly.js for standard plots to save time, with a custom canvas where the layout needs bespoke drawing.

Hardware and operating system

Decided

Windows, macOS, and Linux desktops; no special hardware

Chosen

Pros

  • Covers the client's users; analytical analysis is light on compute.

Cons

  • Three installers to build and test.

Electron packaging

Decision: No GPU or special device is required because LieOptics computes aberrations analytically rather than by ray tracing.