Skip to content

feat: desktop app port (issue #23)#24

Merged
ThisIs-Developer merged 5 commits intoThisIs-Developer:mainfrom
ramezio:main
Feb 18, 2026
Merged

feat: desktop app port (issue #23)#24
ThisIs-Developer merged 5 commits intoThisIs-Developer:mainfrom
ramezio:main

Conversation

@ramezio
Copy link
Copy Markdown
Contributor

@ramezio ramezio commented Feb 18, 2026

Desktop App Port (Neutralinojs)

Adds a lightweight desktop application version of Markdown Viewer using Neutralinojs, as proposed in #23.

Motivation

Provide a native desktop experience (primarily Windows, but cross-platform) without the overhead of Electron. The resulting Windows x64 binary is ~8.65 MB.

Architecture

The desktop app shares its core files (script.js, styles.css, assets/) with the browser version — nothing is duplicated or forked. A build script (prepare.js) copies and transforms these files into desktop-app/resources/ at build time, injecting Neutralinojs-specific script tags and wrapper elements into index.html.

Neutralinojs platform binaries are managed by setup-binaries.js, which downloads them on first use and caches them in bin/ (gitignored). The download is version-locked to cli.binaryVersion in neutralino.config.json and only re-triggered when that version changes.

Desktop-only files:

  • resources/js/main.js — Neutralinojs lifecycle, tray menu, window events
  • resources/js/neutralino.js — Neutralinojs client library
  • neutralino.config.json — App configuration
  • setup-binaries.js — Idempotent binary setup (downloads on first use)

What's Included

Area Details
Build system package.json with setup, dev, build (embedded single-file), build:portable (ZIP bundle), and build:all scripts — binaries are auto-downloaded on first run via setup-binaries.js
CI/CD GitHub Actions workflow (.github/workflows/desktop-build.yml) triggered on desktop-v* tags — sets up binaries, builds and publishes embedded executables, portable ZIPs, source archives, and SHA256 checksums as GitHub Release assets
Docker build Dockerfile + docker-compose.yml to build binaries without any local toolchain
Documentation Comprehensive README.md covering architecture, development setup, build instructions (npm / npx / Docker), and release conventions

Release Assets (per GitHub Release)

Asset Description
markdown-viewer-win_x64.exe Windows x64 executable
markdown-viewer-linux_x64.tar.gz Linux x64 (tarball)
markdown-viewer-linux_arm64.tar.gz Linux ARM64 (tarball)
markdown-viewer-mac_*.tar.gz macOS executables (tarball)
markdown-viewer-release.zip Portable bundle (all platforms)
source.tar.gz Desktop app source archive
SHA256SUMS.txt Checksums for all assets

How to Test

cd desktop-app
npm run dev       # launch with hot-reload (auto-downloads binaries on first run)
npm run build     # produce single-file executables

…r build

- Add prepare.js build script to copy/transform shared browser-version
  files (script.js, styles.css, assets/, index.html) into resources/
- Add package.json with dev, build (embedded), build:portable, and
  build:all npm scripts using @neutralinojs/neu CLI
- Add multi-stage Dockerfile and docker-compose.yml for containerized
  builds without local toolchain
- Add GitHub Actions workflow (desktop-build.yml) triggered on
  desktop-v* tags to build and publish release assets (executables,
  portable ZIPs, source archive, SHA256 checksums)
- Update .gitignore for build artifacts, node_modules, and Docker output
- Add .dockerignore to exclude generated resources and build artifacts
- Update index.html with Neutralinojs script injections and app wrapper
- Update styles.css (desktop-specific overrides inherited from upstream)
- Add README with architecture, dev setup, build
  instructions (npm + npx + Docker), and release documentation
- Remove `npm install` requirements from README, Dockerfile, and CI.
- Update package.json scripts to use `npx -y` for all neutralino commands.
- Simplify build instructions to rely on npm scripts abstraction.
`neu build` requires platform binaries in `bin/`, which are gitignored
and absent on fresh clones — producing an empty `dist/` folder.

Add [setup-binaries.js](cci:7://file:///c:/personal/personal/dev/forks/markdown-viewer-fork/desktop-app/setup-binaries.js:0:0-0:0) which downloads binaries via `neu update` only
when missing or when the pinned version in [neutralino.config.json](cci:7://file:///c:/personal/personal/dev/forks/markdown-viewer-fork/desktop-app/neutralino.config.json:0:0-0:0)
changes, tracked by a `bin/.version` marker file.

Wire it into the npm script chain via `setup` + `postsetup` hooks so
that `npm run dev`, `npm run build`, and `npm run build:all` all
ensure binaries exist before proceeding.

- Simplify Dockerfile from 3 stages to 2 (setup handled by npm hooks)
- Add explicit setup step in GitHub Actions workflow
- Update README with setup documentation
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 18, 2026

@ramezio is attempting to deploy a commit to the ThisIs-Developer Team on Vercel.

A member of the Team first needs to authorize it.

@ramezio ramezio mentioned this pull request Feb 18, 2026
@ThisIs-Developer ThisIs-Developer merged commit cc0c33f into ThisIs-Developer:main Feb 18, 2026
1 of 2 checks passed
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markdown-viwer Ready Ready Preview, Comment Feb 18, 2026 10:15am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants