Skip to content

Commit f5d1848

Browse files
authored
docs: clean up product documentation (#90)
* docs: clean up product documentation * docs: clarify Gallery entry point * docs: remove unnecessary changeset
1 parent 7eb56ac commit f5d1848

12 files changed

Lines changed: 285 additions & 203 deletions

File tree

README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Lynxtron Showcases
22

3-
A monorepo of Lynxtron showcase apps. **Lynxtron GO** is a playground app (like Electron Fiddle) that can fetch, edit, build, and run any showcase in this repository.
3+
A monorepo of Lynxtron showcase apps. **Lynxtron Go** is a project editor and
4+
showcase runner that can fetch, edit, build, and run any showcase in this
5+
repository.
46

57
## Repository Structure
68

@@ -11,7 +13,7 @@ lynxtron-show-cases/
1113
cli/ @lynxtron-examples/cli — CLI for fetching, building, running showcases
1214
showcases/
1315
counter/ minimal counter example (full Lynxtron app)
14-
lynxtron-go/ Lynxtron GO playground app (IDE shell)
16+
lynxtron-go/ Lynxtron Go project editor and showcase runner
1517
scripts/
1618
preview.sh one-command preview flow
1719
local-registry.sh local npm registry for testing
@@ -26,11 +28,11 @@ lynxtron-show-cases/
2628

2729
## Install Notes
2830

29-
The repo pins runtime and toolchain expectations in root `package.json`:
31+
The repo pins runtime and toolchain expectations in root configuration:
3032

31-
- `engines.node` requires Node.js `>=22`
32-
- `packageManager` is `pnpm@10.15.1`
33-
- `pnpm.onlyBuiltDependencies` allows `@lynx-js/lynxtron` and `@lynx-js/lynxtron-builder` to run their install scripts
33+
- root `package.json` requires Node.js `>=22` and pins `pnpm@10.15.1`;
34+
- `pnpm-workspace.yaml` allows the Lynxtron runtime, builder, and required
35+
native dependencies to run their install scripts.
3436

3537
After `pnpm install`, check whether pnpm skipped any build scripts:
3638

@@ -64,7 +66,7 @@ pnpm test
6466

6567
## Preview Mode (Development)
6668

67-
One command to pack all showcases, start a local npm registry, build Lynxtron GO in preview mode, and launch:
69+
One command to pack all showcases, start a local npm registry, build Lynxtron Go in preview mode, and launch:
6870

6971
```bash
7072
pnpm preview
@@ -73,10 +75,11 @@ pnpm preview
7375
This will:
7476
1. Build each showcase and pack its source plus verified `dist_precompiled/` artifact
7577
2. Start a local Verdaccio registry and publish `@lynxtron-examples/*` packages
76-
3. Build Lynxtron GO with `LYNXTRON_PREVIEW=1` (bakes `file://` tarball URLs)
77-
4. Launch Lynxtron GO desktop app
78+
3. Build Lynxtron Go with `LYNXTRON_PREVIEW=1` (bakes `file://` tarball URLs)
79+
4. Launch Lynxtron Go desktop app
7880

79-
In the app: **Cmd+P → type `>` → "Open Showcase"** to see the showcase list.
81+
In the app, open the Gallery from the folder button in the command bar. The
82+
command palette also exposes showcase commands through **Cmd+P → `>`**.
8083

8184
```bash
8285
# Build only (don't launch)
@@ -115,7 +118,7 @@ lynxtron-examples run counter
115118
lynxtron-examples list
116119
```
117120

118-
## Lynxtron GO Commands
121+
## Lynxtron Go Commands
119122

120123
Open the command palette with **Cmd+P → type `>`**:
121124

@@ -148,8 +151,9 @@ test and release a showcase.
148151

149152
Key design decisions:
150153
- **Full Lynxtron apps**: Each showcase includes host process + Lynx UI, runs as independent desktop window
151-
- **Thin Launcher**: CLI handles all logic; Lynxtron GO is a UI shell
154+
- **Host-owned execution**: preload services and the CLI install, verify, build,
155+
cache, and launch projects outside the Lynx renderer
152156
- **Baked-in registry**: Showcase list injected at build time; preview uses `file://` tarballs, release uses GitHub URLs
153157
- **Unified URL model**: Zero code difference between preview and production
154158
- **Shared toolchain**: Core Lynx SDK and build tools managed at workspace level
155-
- **NDJSON protocol**: CLI communicates with Lynxtron GO via newline-delimited JSON on stdout
159+
- **NDJSON protocol**: CLI communicates with Lynxtron Go via newline-delimited JSON on stdout

docs/showcase-development.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ This repo relies on root-level pnpm settings to keep Lynxtron binaries installab
3131

3232
- `engines.node` requires Node.js `>=22`
3333
- `packageManager` is pinned to `pnpm@10.15.1`
34-
- `pnpm.onlyBuiltDependencies` allows `@lynx-js/lynxtron` and `@lynx-js/lynxtron-builder` to run install scripts
34+
- `pnpm-workspace.yaml` allows `@lynx-js/lynxtron`,
35+
`@lynx-js/lynxtron-builder`, and required native dependencies to run install
36+
scripts
3537

3638
After `pnpm install`, verify that no required build scripts were skipped:
3739

@@ -93,7 +95,7 @@ mkdir -p showcases/my-app/src/main/desktop
9395
```
9496

9597
**Fields:**
96-
- `showcase.description` — shown in Lynxtron GO's showcase list
98+
- `showcase.description` — shown in Lynxtron Go's showcase list
9799
- `showcase.tags` — used for filtering (`beginner`, `advanced`, `animation`, etc.)
98100
- `showcase.minToolchainVersion` — minimum `@lynxtron-examples/*` version required
99101
- `showcase.distribution` — omit for a GitHub Release asset; use `"builtin"`
@@ -172,7 +174,7 @@ app.whenReady().then(() => {
172174

173175
Each showcase slice must ship with its own self-contained `tsconfig.json`.
174176

175-
Do not use `extends` that points outside the showcase package, for example `../../../tsconfig.app.json`. Lynxtron GO unpacks showcases into standalone workspaces under `~/.lynxtron-go/showcases/<name>`, so package-external `extends` paths will break diagnostics there even if they work inside this monorepo.
177+
Do not use `extends` that points outside the showcase package, for example `../../../tsconfig.app.json`. Lynxtron Go unpacks showcases into standalone workspaces under `~/.lynxtron-go/showcases/<name>`, so package-external `extends` paths will break diagnostics there even if they work inside this monorepo.
176178

177179
`src/app/tsconfig.json`:
178180

@@ -469,7 +471,7 @@ To test the dist distribution flow locally, use the local registry script.
469471
This validates the same product promise that preview is meant to protect:
470472

471473
- showcases are packed with verified `dist_precompiled/` artifacts
472-
- Lynxtron GO can consume them
474+
- Lynxtron Go can consume them
473475
- the user does not need to manually rebuild showcase source code just to preview them
474476

475477
Use the local registry script for that flow:
@@ -524,9 +526,9 @@ Merging that PR triggers publishing:
524526
- **npm** — the public `@lynxtron-examples/*` packages are published to the npm
525527
registry via `changeset publish` using npm **OIDC trusted publishing** (no
526528
long-lived `NPM_TOKEN`). `@lynxtron-examples/cli` is `private: true` — it is
527-
bundled inside Lynxtron GO at build time and is not published to npm.
529+
bundled inside Lynxtron Go at build time and is not published to npm.
528530
- **GitHub Release** — a `lynxtron-go-v<version>` release is created with:
529-
- Lynxtron GO installers: `*.dmg` (macOS) and `*-Setup.exe` (Windows), built via
531+
- Lynxtron Go installers: `*.dmg` (macOS) and `*-Setup.exe` (Windows), built via
530532
`lynxtron-builder`.
531533
- Every publishable showcase (a package with `showcase` metadata) packed as a
532534
`.tgz` containing source, `.lynxtron-release.json`, and `dist_precompiled/`.
@@ -545,7 +547,7 @@ to have an OIDC trusted publisher configured, pointing at this repository's
545547
# Pack every publishable showcase into dist/showcase-artifacts/*.tgz
546548
node scripts/pack-showcases.mjs
547549

548-
# Build the Lynxtron GO installer for the current platform
550+
# Build the Lynxtron Go installer for the current platform
549551
pnpm --dir lynxtron-go run pack # macOS dmg
550552
pnpm --dir lynxtron-go run pack:win # Windows nsis
551553
```
@@ -567,7 +569,7 @@ Core Lynx dependencies (`@lynx-js/*`) and build tools (`@lynxtron-examples/confi
567569
## Showcase Metadata
568570

569571
The `showcase` field in `package.json` is used for:
570-
- **Lynxtron GO UI** — name, description, tags shown in the showcase list
572+
- **Lynxtron Go UI** — name, description, tags shown in the showcase list
571573
- **Registry generation**`pnpm run generate-registry` reads this field to produce `showcase-registry.json`
572574
- **Compatibility checks**`minToolchainVersion` is compared against the user's workspace
573575

lynxtron-go/README.md

Lines changed: 45 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Lynxtron Go
22

3-
A code editor built on Lynxtron (Lynx + Node.js), using Scintilla as the native editor engine.
3+
A desktop project editor and showcase runner built on Lynxtron (Lynx + Node.js),
4+
using Scintilla as the native editor engine.
45

56
## Tech Stack
67

@@ -10,94 +11,78 @@ A code editor built on Lynxtron (Lynx + Node.js), using Scintilla as the native
1011
- **Build**: Rspack + RSpeedy (frontend), CMake (native extension)
1112
- **Language**: TypeScript (UI/main), C++/Objective-C (native)
1213

13-
## Implemented Features
14-
15-
| Feature | Status |
16-
|---------|--------|
17-
| Scintilla native editor ||
18-
| Open folder (sidebar + ⌘⇧O) ||
19-
| Persistent workspace (auto-restore last folder) ||
20-
| File tree with expand/collapse ||
21-
| File icons by extension ||
22-
| Multi-tab editing ||
23-
| File open / switch / close ||
24-
| Save file (⌘S) ||
25-
| Syntax highlighting via Prism.js (TS/TSX/JS/JSX/CSS/SCSS/Less/JSON/Python/C++) ||
26-
| Real-time syntax highlighting while typing (SCN_MODIFIED + 50ms debounce) ||
27-
| Extension Host process (TypeScript + CSS/SCSS/Less language services) ||
28-
| Language services: TS/JS/JSX/TSX diagnostics via TypeScript Compiler API ||
29-
| Language services: CSS/SCSS/Less diagnostics via vscode-css-languageservice | ✅ (⚠️ ICU issue) |
30-
| Diagnostic squiggle indicators (error/warning/info) via Scintilla Indicator API | 🔧 (implemented, E2E pending) |
31-
| App menu (File / Edit / View) ||
32-
| Quick file picker (⌘P) | ✅ (under test) |
33-
| Status bar (language, save state) ||
34-
| Window screenshot API (includes native NSView) ||
14+
## Highlights
15+
16+
- Create, edit, save, build, and run complete Lynxtron projects.
17+
- Browse the baked-in showcase Gallery and open editable project sources.
18+
- Edit multiple files in native Scintilla panes with a collapsible project tree.
19+
- Use a folder-oriented workspace IDE with tabs, search, terminal, output, and
20+
problems panels.
21+
- Get real-time syntax styling plus TypeScript/JavaScript and CSS-family
22+
diagnostics from the Extension Host.
23+
- Import and publish complete projects through GitHub Gists.
24+
- Choose Lynxtron runtimes, configure launch flags, and inspect process output.
25+
- Build macOS and Windows installers with bundled runtime and starter assets.
3526

3627
## Prerequisites
3728

3829
- NodeJS >= 22
39-
- [LynxDevTool](https://github.com/lynx-family/lynx-devtool/releases/) >= 0.1.1
4030
- pnpm 10.x
4131

32+
[LynxDevTool](https://github.com/lynx-family/lynx-devtool/releases/) is optional
33+
and only required for runtime inspection and debugging.
34+
4235
## Usage Guide
4336

37+
Run commands from the monorepo root.
38+
4439
### Install Dependencies
4540

46-
```bash
41+
```sh
4742
pnpm install
4843
```
4944

5045
If pnpm reports ignored build scripts for `@lynx-js/lynxtron` or `@lynx-js/lynxtron-builder`, run `pnpm approve-builds` and allow both packages before launching the app.
5146

5247
### Development
5348

54-
- **Desktop (Lynxtron)**
55-
```bash
56-
npm run dev
57-
```
49+
```sh
50+
# Start the renderer and desktop host watchers
51+
pnpm --dir lynxtron-go dev
52+
53+
# Launch the already-built desktop host with the inspector enabled
54+
pnpm --dir lynxtron-go run run-dev
55+
```
5856

5957
### Build & Start
6058

61-
- **Build for Production**
62-
```bash
63-
npm run build
64-
```
59+
```sh
60+
# Build all Lynxtron Go assets
61+
pnpm --dir lynxtron-go build
6562

66-
- **Start Desktop**
67-
```bash
68-
npm start
69-
```
63+
# Build and launch the desktop app
64+
pnpm --dir lynxtron-go start
7065

71-
- **Start Web**
72-
```bash
73-
npm run start:web
74-
```
66+
# Validate without launching
67+
pnpm --dir lynxtron-go run typecheck
68+
pnpm --dir lynxtron-go test
69+
```
7570

7671
### Application Packaging
7772

78-
- **Package for macOS (x64)**
79-
```bash
80-
npm run pack:mac:x64
81-
```
82-
83-
- **Package for macOS (arm64)**
84-
```bash
85-
npm run pack:mac:arm64
86-
```
73+
```sh
74+
# Package for the current macOS architecture
75+
pnpm --dir lynxtron-go pack
8776

88-
- **Package for macOS (Universal)**
89-
```bash
90-
npm run pack:mac:universal
91-
```
92-
93-
- **Package for Windows (ia32)**
94-
```bash
95-
npm run pack:win
96-
```
77+
# Package the Windows x64 installer
78+
pnpm --dir lynxtron-go run pack:win
79+
```
9780

9881
## Debugging
9982

100-
For detailed debugging strategies, including how to debug the Renderer, Main Process, and Native Modules, please refer to [Debug Strategy](docs/DEBUG_STRATEGY.md).
83+
Use `pnpm --dir lynxtron-go run debug:detached` for a detached native-debug
84+
session. See the [documentation index](docs/README.md) for current architecture
85+
and archived design documents.
10186

10287
## AI Assistant Integration (MCP)
10388

0 commit comments

Comments
 (0)