Skip to main content

Main Web App (Hydrogen)

GitHub: https://github.com/adom-inc/hydrogen

Hydrogen is the web application at the heart of Adom's services. It is the interface through which users can create schematic designs, perform simulations, manipulate their projects inside workcells, write and test firmware, and so much more. It is written in Typescript using the SvelteKit framework. For 3D graphics rendering it uses BabylonJS and for 2D graphics rendering it uses a yet to be named custom canvas rendering engine.

WIP

This component of Adom's services is still in active development. Expect breaking changes at any time.

Workspaces

All work within a project in Hydrogen happens inside one of the several workspaces. A workspace is smaller interface tailored to a specific part of the prototyping process.

Schematic Workspace

The schematic editor, which uses the yet to be named canvas rendering engine, allows users to upload and create electrical schematics.

Layout Workspace

The layout editor, which uses the BabylonJS 3D graphics engine, allows users to lay out their designs inside a workcell using specific molecules.

Simulator Workspace

The simulator allows users to simulate the building of their layouts within a virtual workcell before spending money renting a real workcell. This should catch most design inefficiencies.

Build Workspace

The build workspace allows users to send their designs to a real workcell for assembly. After it's finished assembling, users can interact with the design while its running through various kinds of test equipment inside the workcell.

Code Workspace

The code workspace allows users to write firmware for their microcontrollers as well as unit test scripts for their hardware. It uses the Monaco editor from Microsoft for a rich text editing experience.

Atomic Operations

Within all Hydrogen workspaces, there is a concept of an Atomic Operation. An Atomic Operation is an action that transforms the workspace from one finite state to another finite state. Atomic Operations are said to be invertible because they can be undone and redone without side effects. This is the foundation for the Undo-Redo system within Hydrogen workspaces.

Tools

All Hydrogen workspaces come equipped with a unique toolbar. The toolbar contains various tools which are used to inspect and change the state of the workspace. Tools can be either active or inactive, and the editor enforces that only one tool is ever active at a time.

Some tools perform so-called "instantaneous actions". These tools perform some action on the workspace and then immediately make themselves in active, yielding the active tool slot back to the editor.

Settings

Hydrogen provides a rich settings API to define configure it's appearance and behavior. Keys are stored as JSON and are automatically presented dynamically in a settings GUI.

Extensions

Hydrogen can have its functionality expanded through the use of extensions. Extensions consume Hydrogen's extension API to be able to create new tools, define new atomic operations, create new user interfaces, define new user settings, and more. Extensions are sandboxed to prevent abuse.