CAScad: an open source reactive computer algebra notebook in the browser
Introduction
Computer algebra systems (CAS) have long been essential tools for mathematicians, engineers, and educators. Among them, Giac/Xcas — developed by Bernard Parisse and Renée De Graeve at Université Grenoble Alpes — stands out as a powerful, open source alternative to proprietary systems like Maple or Mathematica. It powers the CAS in GeoGebra, the HP Prime calculator, and is widely used in French education.
With CAScad, I wanted to bring this engine into a modern, reactive notebook experience — directly in the browser, with no installation required.
⚠️ Please note: CAScad is an experimental proof of concept in early development. It is not production-ready. Many features are incomplete, some are broken, and you will encounter bugs. The project is shared openly to gather feedback, ideas, and contributions — not as a finished product. If you run into issues or have suggestions, please open an issue on GitHub.
The building blocks
CAScad stands on several open source projects:
MathLive & MathJSON — Arno Gourdol (CortexJS)
MathLive is a web component (MIT license) that provides fluid, natural math input with LaTeX rendering. Arno also created MathJSON, a lightweight JSON-based interchange format for mathematical notation, and the Cortex Compute Engine — which also serves as one of CAScad's computation kernels.
In CAScad, math cells follow a MathJSON-first pipeline: MathField → MathJSON → kernel. LaTeX is used only for display.
KaTeX
Results are rendered with KaTeX, the fast LaTeX math typesetting library, ensuring crisp output display.
JSXGraph — University of Bayreuth
For 2D interactive visualization (function plots, parametric curves, implicit plots, vector fields, geometry), CAScad uses JSXGraph with full zoom, pan, and coordinate display. 3D surface plots use Giac's native WebGL rendering.
Observable Runtime
The reactive execution engine is powered by Observable Runtime, which manages the dependency graph (DAG) between cells. This is the same dataflow engine that powers Observable notebooks — a natural fit for bringing reactivity to computer algebra.
GIAC — Bernard Parisse & Renée De Graeve
The default CAS engine, compiled to JavaScript via Emscripten (asm.js), running entirely client-side.
Multi-kernel architecture
One of CAScad's distinctive features is its multi-kernel support. You can switch between:
The active kernel is selected via the toolbar and persisted across sessions. Notebooks save the kernel choice in their JSON format, ensuring reproducibility.
The landscape of web-based Xcas
Before diving into what CAScad does differently, here's a map of the existing web interfaces for GIAC/Xcas.
Xcas for Firefox (xcasfr.html)
The official web interface by Bernard Parisse. GIAC runs locally via Emscripten — no server needed once loaded. The most feature-complete web version: full CAS, 2D/3D graphics, MicroPython and Javascript interpreters, session sharing by email, Numworks calculator connectivity. Sequential command-line interface, suited for advanced users and research.
Xcas en ligne (xcasenligne.fr)
Jean-Pierre Branchard's platform, originally PHP server-based, now client-side. Pedagogical modules: console, programming, mini formal spreadsheet with MathML, graphing, numerical sequences. Designed for French secondary education.
TableaunoirXcas
A fork of the Tableaunoir collaborative whiteboard by B. Parisse. Movable "magnets" on a virtual blackboard that can be evaluated with Xcas, MicroPython, or Javascript. Designed for classroom presentations.
All these interfaces share a sequential execution model.
Recommended by LinkedIn
The reactive notebook paradigm
In recent years, a new generation of notebooks has fundamentally rethought how cells are executed:
All three share a core idea: the notebook is always in a consistent state. No "Run All", no stale outputs, no confusion about execution order.
CAScad applies this paradigm to computer algebra. The reactive DAG, powered by Observable Runtime itself, tracks dependencies between cells. Change a := 5 and every cell referencing a updates instantly. A toggle lets you switch between reactive and manual modes when needed.
Beyond computation: rich visualization
CAScad goes well beyond basic function plotting:
Sharing notebooks: QR codes, P2P, and more
A real-world problem in education: you build a notebook on your phone or tablet, and need to get it to your PC — or share it with students. CAScad offers multiple transfer methods, all working without any cloud service:
Animated QR codes
For offline transfer (no internet needed, no webcam needed on the receiving device), CAScad can encode an entire notebook as a sequence of QR codes. Two modes are available:
This means you can transfer a notebook of any size between two devices that have no network connection — just a screen and a camera (and a bit of patience because of data rate).
P2P via WebRTC
For online transfer, CAScad uses WebRTC for direct browser-to-browser communication. On the PC, click "Receive from Phone" — a QR code appears. Scan it with the phone, verify a 4-digit confirmation code, and the notebook transfers over a DTLS-encrypted data channel. Notebook data never touches any server.
Other methods
Static QR (for small notebooks), URL sharing, and classic file export/import round out the options.
Command discovery
For learners exploring what a CAS can do, CAScad includes built-in command discovery: search_commands(), list_categories(), and suggest_commands() to explore the hundreds of available functions.
Current status — experimental proof of concept
To be completely transparent: CAScad is an experimental Proof of Concept (PoC). It is not production-ready, and I want to set expectations accordingly:
The project is shared in the spirit of "build in public". The goal at this stage is to validate the approach, gather feedback, and see if the reactive + visual math input + CAS combination resonates with educators and students. Contributions, bug reports, and ideas are all welcome.
Technology stack
Acknowledgments
Try it out:
App: https://s-celles.github.io/CAScad/ Source Code: https://github.com/s-celles/CAScad