cryptolabweb

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

README

Crypto Lab web console

The standalone web console for the optional GopherTrunk cryptolab research toolkit. Pick a tool/mode, upload inputs, set options, run, and view the structured result — the browser counterpart to gophertrunk cryptolab.

Stack: React + TypeScript + Vite + Tailwind + Zustand (the same stack and shared design tokens as the siglab and configbuilder consoles). The form is schema-driven: it renders whatever tools/modes/parameters the backend reports at GET /api/v1/cryptolab/tools, so new tools appear automatically.

Build

make cryptolab-web-build           # install + bundle into dist/ (embedded in the binary)
make build TAGS=cryptolab          # build gophertrunk with the toolkit + console linked in
gophertrunk cryptolab serve -open  # launch the console in your browser

dist/ is git-ignored (only .gitkeep is tracked); the Go embed picks up a real build automatically and otherwise reports "SPA not bundled".

Develop

make cryptolab-web-dev   # Vite dev server on :5275, proxying /api to cryptolab serve (:8096)
make cryptolab-web-test  # vitest

Requires Node ≥ 18 / npm. The console is offline-first (PWA service worker), so the single binary serves it with no network access.

Documentation

Overview

Package cryptolabweb embeds the built standalone Crypto Lab SPA so the gophertrunk binary can serve the cryptolab web console (via `gophertrunk cryptolab serve`) without a sibling source tree. Build the SPA with `make cryptolab-web-build` (or `cd web/cryptolab && npm run build`) before `go build`; the embed picks up everything under `dist/` automatically.

When `dist/` is empty (fresh checkout, dev build with no build yet) the embed contains only the `.gitkeep` sentinel and HasAssets reports false; the serve command then prints an explanatory message instead of a blank page.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assets

func Assets() fs.FS

Assets returns the embed.FS sub-tree rooted at `dist`, suitable for the cryptolab webserver's Options.Assets.

func HasAssets

func HasAssets() bool

HasAssets returns true when the embed contains a real build (index.html).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL