@glassnote/client 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INSTALACION.md +258 -0
- package/README.md +228 -0
- package/autoStart.js +608 -0
- package/autoupdate.js +473 -0
- package/autoupdate_renderer.js +371 -0
- package/bin/glassnote.js +523 -0
- package/images/demo01.png +0 -0
- package/images/dmg-background.png +0 -0
- package/images/dmg-background.svg +37628 -0
- package/images/icon-16.png +0 -0
- package/images/icon-24.png +0 -0
- package/images/icon-512.png +0 -0
- package/images/icon.ico +0 -0
- package/images/icon.png +0 -0
- package/images/splash.svg +61 -0
- package/localserver.js +297 -0
- package/logUtilities.js +128 -0
- package/main.js +745 -0
- package/npmMode.js +139 -0
- package/npmUpdate.js +152 -0
- package/package.json +141 -0
- package/preload.js +148 -0
- package/userData.js +492 -0
package/INSTALACION.md
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# Instalación del cliente GlassNote
|
|
2
|
+
|
|
3
|
+
La vía oficial es **npm/npx**. Los instaladores nativos (NSIS firmado, DMG notarizado,
|
|
4
|
+
tiendas) quedan **deprecados** desde 2026-09-05: el coste de certificados y validaciones
|
|
5
|
+
no se justificaba para un cliente que se distribuye a clientes conocidos.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
# probarlo sin instalar nada
|
|
9
|
+
npx @glassnote/client
|
|
10
|
+
|
|
11
|
+
# instalarlo de verdad
|
|
12
|
+
npx @glassnote/client install
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
El paquete se llama `@glassnote/client`; el comando que queda instalado, `glassnote`.
|
|
16
|
+
npm nombra el ejecutable por el `bin`, no por el paquete, y npx corre ese único `bin`
|
|
17
|
+
aunque se llame distinto. Solo la línea de npx lleva el nombre largo.
|
|
18
|
+
|
|
19
|
+
## Qué hace `install`
|
|
20
|
+
|
|
21
|
+
1. `npm install -g --prefix ~/.glassnote/npm @glassnote/client@latest` — **sin root**.
|
|
22
|
+
npm baja el binario de electron (~100 MB la primera vez) en su `postinstall`.
|
|
23
|
+
2. Enlaza el comando en `~/.glassnote/bin` (en Windows, los shims quedan en
|
|
24
|
+
`~/.glassnote/npm`). Ese directorio es **lo único** que se mete al `PATH`, así la
|
|
25
|
+
línea del rc no cambia aunque cambie lo de dentro.
|
|
26
|
+
3. Agrega una línea idempotente en `~/.bashrc` / `~/.zshrc` (o `~/.profile` si no hay
|
|
27
|
+
ninguno) entre marcadores `# >>> glassnote >>>`. En Windows, el `PATH` de usuario, sin
|
|
28
|
+
administrador.
|
|
29
|
+
4. Arranca el cliente en segundo plano. Al arrancar, la app registra el **arranque
|
|
30
|
+
automático** del usuario: acceso directo en Startup (Windows), LaunchAgent (macOS) o
|
|
31
|
+
`.desktop` en `~/.config/autostart` (Linux). Ninguno necesita permisos de admin.
|
|
32
|
+
|
|
33
|
+
Todo vive bajo `~/.glassnote`. Desinstalar es borrar esa carpeta y quitar la línea del rc,
|
|
34
|
+
que es justo lo que hace `glassnote uninstall`.
|
|
35
|
+
|
|
36
|
+
## Comandos
|
|
37
|
+
|
|
38
|
+
| | |
|
|
39
|
+
|---|---|
|
|
40
|
+
| `glassnote` | arranca el cliente |
|
|
41
|
+
| `glassnote start --detach` | lo arranca y libera la terminal |
|
|
42
|
+
| `glassnote install [version]` | instala o reinstala (`latest` por defecto) |
|
|
43
|
+
| `glassnote update [version]` | actualiza a la última publicada |
|
|
44
|
+
| `glassnote uninstall` | quita autoarranque, `~/.glassnote` y la línea del rc |
|
|
45
|
+
| `glassnote status` | versión, modo, rutas, autoarranque y estado del sandbox |
|
|
46
|
+
| `glassnote fix-sandbox` | (Linux) restaura el sandbox de Chromium; pide sudo una vez |
|
|
47
|
+
|
|
48
|
+
Banderas de `install`: `--no-path` (no toca el rc, imprime la línea) y `--no-start`
|
|
49
|
+
(instala y no arranca).
|
|
50
|
+
|
|
51
|
+
`install` y `update` también aceptan un *spec* de npm en vez de una versión: un `.tgz`,
|
|
52
|
+
una ruta local o una URL. Es lo que permite probar un paquete antes de publicarlo:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
npm pack
|
|
56
|
+
node bin/glassnote.js install ./glassnote-client-2.2.6.tgz
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Sin Node instalado
|
|
60
|
+
|
|
61
|
+
`install.sh` y `install.ps1` consiguen un Node y delegan el resto en el propio CLI, así la
|
|
62
|
+
lógica de instalación vive en un solo sitio:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
curl -fsSL https://glassnote.intermark.ec/install.sh | sh # Linux y macOS
|
|
66
|
+
irm https://glassnote.intermark.ec/install.ps1 | iex # Windows
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Si no hay Node ≥ 20, bajan el LTS a `~/.glassnote` (unos 25 MB, sin root) y enlazan
|
|
70
|
+
`node`, `npm` y `npx` en `~/.glassnote/bin` — hace falta, porque sin intérprete el
|
|
71
|
+
`#!/usr/bin/env node` del comando instalado no arranca.
|
|
72
|
+
|
|
73
|
+
Los sirve el sitio de `glassnote-next`, que es un export estático: los dos archivos
|
|
74
|
+
viven en su `public/`, así que salen publicados con el deploy normal de la web, sin
|
|
75
|
+
infraestructura aparte.
|
|
76
|
+
|
|
77
|
+
El original está **acá**, al lado del CLI que invocan. Después de tocar cualquiera de
|
|
78
|
+
los dos hay que copiarlos y volver a desplegar la web:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
npm run sync-installers # copia install.sh e install.ps1 a ../glassnote-next/public/
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Editarlos directamente en `glassnote-next` deja dos versiones que se separan, y la que
|
|
85
|
+
se rompe en silencio es la que descarga la gente.
|
|
86
|
+
|
|
87
|
+
## Actualizaciones
|
|
88
|
+
|
|
89
|
+
Instalado por npm, el cliente comprueba el registry cada 3 horas y se actualiza solo:
|
|
90
|
+
|
|
91
|
+
- lee `desiredVersion` de los datos de usuario (`lastest` = seguir la última, o una
|
|
92
|
+
versión exacta y clavada); son las mismas claves que usaba el updater de S3, para no
|
|
93
|
+
romper las instalaciones que ya están en la calle;
|
|
94
|
+
- lanza un ayudante desprendido, cierra la app, corre `npm install -g` y la vuelve a
|
|
95
|
+
abrir. El npm **no** se corre con la app en marcha: en Windows el `electron.exe` en uso
|
|
96
|
+
está bloqueado y npm no podría reemplazarlo.
|
|
97
|
+
|
|
98
|
+
Por `npx` no se actualiza nada: la caché es efímera y npx ya baja la última versión cada
|
|
99
|
+
vez. Tampoco se registra el arranque automático — apuntaría a una carpeta que se limpia
|
|
100
|
+
sola.
|
|
101
|
+
|
|
102
|
+
El auto-update del **renderer** (zip desde S3 a los datos de usuario) sigue igual y es
|
|
103
|
+
independiente de todo esto.
|
|
104
|
+
|
|
105
|
+
## macOS y Windows: por qué ya no hace falta firmar
|
|
106
|
+
|
|
107
|
+
El binario de electron lo baja **npm**, no el navegador. Sin descarga por navegador no hay
|
|
108
|
+
atributo de cuarentena, así que Gatekeeper no lo bloquea y no hace falta notarizar. En
|
|
109
|
+
Windows no hay instalador que ejecutar, así que no hay SmartScreen que avisar.
|
|
110
|
+
|
|
111
|
+
Lo que sí cambia: la app aparece como *Electron* ante el sistema (no hay bundle propio) y
|
|
112
|
+
en macOS el icono del Dock es el de electron.
|
|
113
|
+
|
|
114
|
+
## Linux: el sandbox de Chromium
|
|
115
|
+
|
|
116
|
+
Una instalación sin root no puede dejar `chrome-sandbox` en setuid root, y Chromium
|
|
117
|
+
entonces **aborta** al arrancar. El lanzador lo detecta y elige, de más a menos seguro:
|
|
118
|
+
|
|
119
|
+
1. `chrome-sandbox` es setuid root → nada que añadir;
|
|
120
|
+
2. hay namespaces de usuario sin privilegios → `--disable-setuid-sandbox` (sigue habiendo
|
|
121
|
+
sandbox, el de namespaces);
|
|
122
|
+
3. ni eso → `--no-sandbox`, y lo dice por pantalla.
|
|
123
|
+
|
|
124
|
+
Ubuntu 24.04+ cae en el caso 3 aunque el kernel soporte namespaces, porque AppArmor los
|
|
125
|
+
restringe a binarios con perfil. `glassnote fix-sandbox` pide sudo una vez y deja el
|
|
126
|
+
binario como Chromium lo quiere; hay que repetirlo tras cada actualización, porque npm
|
|
127
|
+
reinstala el binario.
|
|
128
|
+
|
|
129
|
+
Las banderas van también en la entrada de arranque automático: sin ellas fallaría al
|
|
130
|
+
iniciar sesión y nadie vería el error.
|
|
131
|
+
|
|
132
|
+
En Debian/Ubuntu, si faltan librerías del sistema:
|
|
133
|
+
|
|
134
|
+
```sh
|
|
135
|
+
sudo apt-get install -y libgtk-3-0 libnss3 libasound2 libxss1 libgbm1
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Probar sin publicar: registry local
|
|
139
|
+
|
|
140
|
+
Publicar en npmjs es irreversible (no se puede republicar una versión), así que el
|
|
141
|
+
instalador se prueba entero contra un registry local:
|
|
142
|
+
|
|
143
|
+
```sh
|
|
144
|
+
npm run local-registry # Verdaccio en http://localhost:4873, imprime los pasos
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Levanta el registry, crea un usuario descartable y escribe un `.npmrc` propio. Ese
|
|
148
|
+
`.npmrc` es lo que aísla la prueba: el `~/.npmrc` real —donde está la sesión de npmjs—
|
|
149
|
+
no se lee, así no hay forma de publicar sin querer en el registry de verdad. Todo lo
|
|
150
|
+
que no sea `@glassnote/*` se proxea a npmjs, así que electron y el resto se resuelven
|
|
151
|
+
como en producción.
|
|
152
|
+
|
|
153
|
+
Con eso se prueba el ciclo completo: publicar, instalar en un `GLASSNOTE_HOME` de
|
|
154
|
+
mentira, actualizar a una versión nueva y desinstalar.
|
|
155
|
+
|
|
156
|
+
Dos cosas que confunden y no son fallos del paquete:
|
|
157
|
+
|
|
158
|
+
- `npx @glassnote/client` **dentro de este repo** falla con «glassnote no se reconoce
|
|
159
|
+
como un comando»: npm resuelve el proyecto local, cuyo `bin` no está enlazado en su
|
|
160
|
+
propio `node_modules/.bin`. Hay que correrlo desde cualquier otra carpeta.
|
|
161
|
+
- `glassnote uninstall` borra el acceso directo de arranque **real** de la máquina, no
|
|
162
|
+
el del sandbox: el autoarranque no depende de `GLASSNOTE_HOME`. Se vuelve a crear al
|
|
163
|
+
abrir el cliente.
|
|
164
|
+
|
|
165
|
+
## Publicar una versión
|
|
166
|
+
|
|
167
|
+
```sh
|
|
168
|
+
npm version patch # o minor / major
|
|
169
|
+
npm publish # prepublishOnly construye el renderer y corre las comprobaciones
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
`scripts/check-publish.js` para la publicación si falta el renderer construido, si falta
|
|
173
|
+
algún icono de bandeja, o si se coló algo que no debe salir (certificados, llaves,
|
|
174
|
+
instaladores).
|
|
175
|
+
|
|
176
|
+
Y para lo irreversible hay un candado aparte: publicar en **npmjs** exige decirlo,
|
|
177
|
+
porque una versión que llegó ahí no se reemplaza ni se vuelve atrás.
|
|
178
|
+
|
|
179
|
+
```sh
|
|
180
|
+
GLASSNOTE_PUBLISH=PRODUCTION npm publish
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Contra cualquier otro registry —el local— no pide nada: probar tiene que ser barato y
|
|
184
|
+
publicar en serio, deliberado. No hay ambiente intermedio: se prueba local y de ahí va a
|
|
185
|
+
producción.
|
|
186
|
+
|
|
187
|
+
`.npmignore` existe para **anular** `.gitignore` al empaquetar: `.gitignore` excluye
|
|
188
|
+
`dist`, que es justo el renderer construido. Sin él se publicaría un paquete sin app, y
|
|
189
|
+
solo se notaría al abrirlo.
|
|
190
|
+
|
|
191
|
+
### Publicar desde GitHub Actions
|
|
192
|
+
|
|
193
|
+
`.github/workflows/publish-npm.yml` publica sin depender de la máquina de nadie. No se
|
|
194
|
+
dispara por push a una rama —eso convertiría cualquier merge en una release— sino a mano
|
|
195
|
+
(**Run workflow**, con dry-run disponible) o pusheando un tag:
|
|
196
|
+
|
|
197
|
+
```sh
|
|
198
|
+
npm version patch # crea el commit y el tag vX.Y.Z
|
|
199
|
+
git push --follow-tags
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
El workflow verifica que el tag coincida con la versión del `package.json` antes de
|
|
203
|
+
publicar: un tag que dice otra cosa deja el repo mintiendo sobre lo que hay en npm.
|
|
204
|
+
|
|
205
|
+
Hace falta un solo secret en el repo (o en el environment `PRODUCTION`):
|
|
206
|
+
|
|
207
|
+
| secret | qué es |
|
|
208
|
+
|---|---|
|
|
209
|
+
| `NPM_TOKEN` | token **granular** de npm con *Bypass 2FA*, escritura sobre `@glassnote/*`. Sin el bypass npm rechaza con 403: la cuenta tiene 2FA en escrituras y un runner no puede tipear un OTP. |
|
|
210
|
+
|
|
211
|
+
El mismo secret sirve en el repo del renderer, que tiene su propio workflow igual a este.
|
|
212
|
+
|
|
213
|
+
Dos cosas que conviene saber:
|
|
214
|
+
|
|
215
|
+
- **`workflow_dispatch` solo aparece en la UI si el archivo está en la rama por defecto**,
|
|
216
|
+
que hoy es `main` y está 42 commits atrás de `develop`. Mientras siga así, el tag es el
|
|
217
|
+
único disparador que funciona de verdad.
|
|
218
|
+
- El environment `PRODUCTION` permite exigir **aprobación manual** antes de publicar
|
|
219
|
+
(*Settings > Environments > PRODUCTION > Required reviewers*). Para algo irreversible,
|
|
220
|
+
vale la pena.
|
|
221
|
+
|
|
222
|
+
## El renderer: baseline y canal en caliente
|
|
223
|
+
|
|
224
|
+
El renderer llega por **dos caminos distintos**, y conviene no confundirlos:
|
|
225
|
+
|
|
226
|
+
| | qué es | cómo se actualiza |
|
|
227
|
+
|---|---|---|
|
|
228
|
+
| `@glassnote/renderer` | el **baseline**: lo que ve una instalación nueva antes de su primer update | publicando el paquete y subiendo la versión en el cliente |
|
|
229
|
+
| zip en S3 → `userData/renderer` | el canal **en caliente** | subiendo el zip; llega sin republicar el cliente ni tocar el binario |
|
|
230
|
+
|
|
231
|
+
`main.js` elige entre los dos comparando versiones: gana la más alta y, si empatan, gana
|
|
232
|
+
userData. Por eso una versión nueva del renderer llega a todas las instalaciones sin que
|
|
233
|
+
nadie reinstale nada ni vuelva a bajar electron — que es justamente el punto de tenerlo
|
|
234
|
+
separado.
|
|
235
|
+
|
|
236
|
+
De ahí sale una regla: **al publicar el baseline, subí S3 a la misma versión o más**. Si
|
|
237
|
+
el baseline queda por encima, gana él y el canal en caliente queda mudo hasta que S3 lo
|
|
238
|
+
pase.
|
|
239
|
+
|
|
240
|
+
Para desarrollar el renderer, un clon en `./glassnote-renderer` **tiene precedencia** sobre
|
|
241
|
+
la dependencia publicada: si no, editarlo no se vería nunca.
|
|
242
|
+
|
|
243
|
+
### Orden para sacar una versión con renderer nuevo
|
|
244
|
+
|
|
245
|
+
El lock es lo que se olvida y rompe el `npm ci` de CI:
|
|
246
|
+
|
|
247
|
+
```sh
|
|
248
|
+
# 1. en el repo del renderer
|
|
249
|
+
npm version patch && git push --follow-tags # publica @glassnote/renderer
|
|
250
|
+
|
|
251
|
+
# 2. acá
|
|
252
|
+
npm install @glassnote/renderer@<nueva> # actualiza package.json Y package-lock
|
|
253
|
+
git commit -am "Subir el baseline del renderer"
|
|
254
|
+
npm version patch && git push --follow-tags # publica el cliente
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
`check-publish.js` frena si el lock no tiene la dependencia, o si quedó apuntando al
|
|
258
|
+
registry local después de una prueba.
|
package/README.md
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# GlassNote - Transparent Overlay Notes Application
|
|
2
|
+
|
|
3
|
+
GlassNote is a sophisticated desktop application built with Electron that provides transparent overlay notes and interactive content display capabilities. The application runs as a system tray application with full-screen transparent windows for displaying HTML, SVG, images, and interactive forms.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
### Core Functionality
|
|
8
|
+
- **Transparent Overlay Display**: Full-screen transparent windows that overlay on top of other applications
|
|
9
|
+
- **Multi-format Content Support**: HTML, SVG, images, and interactive forms
|
|
10
|
+
- **Position Management**: Configurable display positions with grid-based layout system
|
|
11
|
+
- **Interactive Forms**: Support for form submissions with validation and response handling
|
|
12
|
+
- **Configuration Menu**: System tray accessible configuration interface
|
|
13
|
+
|
|
14
|
+
### Technical Architecture
|
|
15
|
+
- **Electron Main Process**: Manages window creation, system tray, auto-start, and IPC communication
|
|
16
|
+
- **Vue.js Renderer**: Modern frontend built with Vue 3 and TypeScript
|
|
17
|
+
- **Service Architecture**: Modular service system for sound, user data, WebSocket management, and window visibility
|
|
18
|
+
- **Auto-update System**: Both main application and renderer can be updated independently
|
|
19
|
+
- **Local WebSocket Server**: Built-in server for communication with external systems
|
|
20
|
+
|
|
21
|
+
### Security Features
|
|
22
|
+
- **Context Isolation**: Secure IPC communication with whitelisted channels
|
|
23
|
+
- **Code Signing**: Windows CodeSign with eSigner and Apple Developer signing
|
|
24
|
+
- **Auto-start Management**: Secure startup configuration
|
|
25
|
+
- **Log Management**: Comprehensive logging with automatic cleanup
|
|
26
|
+
- **User Data Encryption**: Secure storage of user preferences and configuration
|
|
27
|
+
|
|
28
|
+
## Project Structure
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
glassnote-electron/
|
|
32
|
+
├── main.js # Electron main process
|
|
33
|
+
├── preload.js # Secure IPC bridge
|
|
34
|
+
├── package.json # Main application configuration
|
|
35
|
+
├── glassnote-renderer/ # Frontend application
|
|
36
|
+
│ ├── src/
|
|
37
|
+
│ │ ├── App.vue # Main Vue component
|
|
38
|
+
│ │ ├── systems/ # Core systems (glass, config, etc.)
|
|
39
|
+
│ │ ├── services/ # Service layer
|
|
40
|
+
│ │ └── utils/ # Utility functions
|
|
41
|
+
│ └── vite.config.ts # Build configuration
|
|
42
|
+
├── images/ # Application icons and assets
|
|
43
|
+
├── installer/ # Built installers
|
|
44
|
+
├── cert/ # Code signing certificates
|
|
45
|
+
└── scripts/ # Build and deployment scripts
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
49
|
+
|
|
50
|
+
**The supported way to install the client is npm/npx** (see `INSTALACION.md` for the full
|
|
51
|
+
story, in Spanish):
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
npx @glassnote/client # run it once, nothing gets installed
|
|
55
|
+
npx @glassnote/client install # real install under ~/.glassnote, no root, no signing
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The package is `@glassnote/client`; the installed command is `glassnote` — npm names
|
|
59
|
+
the executable after `bin`, and npx runs that single `bin` even when the names differ.
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Native installers (signed NSIS, notarized DMG, app stores) are **deprecated as of
|
|
65
|
+
2026-09-05**. The certificates and store validations cost more than they were worth for a
|
|
66
|
+
client shipped to known customers. `electron-builder`, `build-with-esigner.ps1` and
|
|
67
|
+
`buildOSX*.sh` are kept for legacy builds only and are no longer the release path.
|
|
68
|
+
|
|
69
|
+
### Development Setup
|
|
70
|
+
1. Clone this repository
|
|
71
|
+
2. Install dependencies — this pulls `@glassnote/renderer`, the baseline renderer:
|
|
72
|
+
```bash
|
|
73
|
+
npm install
|
|
74
|
+
```
|
|
75
|
+
3. Only if you work **on the renderer**, clone it into this directory. A local clone
|
|
76
|
+
takes precedence over the published dependency, so `npm run watch-renderer` keeps
|
|
77
|
+
working as before:
|
|
78
|
+
```bash
|
|
79
|
+
git clone git@intermarkec:intermarkec/glassnote-renderer.git
|
|
80
|
+
cd glassnote-renderer && npm install
|
|
81
|
+
```
|
|
82
|
+
4. Run in development mode:
|
|
83
|
+
```bash
|
|
84
|
+
npm run dev
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Publishing a release (npm)
|
|
88
|
+
```bash
|
|
89
|
+
npm version patch # or minor / major
|
|
90
|
+
npm publish # prepublishOnly builds the renderer and runs scripts/check-publish.js
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Production Build (deprecated — legacy native installers)
|
|
94
|
+
1. Build the renderer:
|
|
95
|
+
```bash
|
|
96
|
+
npm run build-renderer
|
|
97
|
+
```
|
|
98
|
+
2. Build the Electron application:
|
|
99
|
+
```bash
|
|
100
|
+
npm run build
|
|
101
|
+
```
|
|
102
|
+
3. For signed Windows builds:
|
|
103
|
+
```bash
|
|
104
|
+
.\build-with-esigner.ps1
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Configuration
|
|
108
|
+
|
|
109
|
+
### Application Settings
|
|
110
|
+
- **Renderer origin**: the production S3 bucket, always. Override it for local
|
|
111
|
+
testing with `GLASSNOTE_S3_BASE_URL`.
|
|
112
|
+
- **Logging**: Enable/disable renderer logging via `logRenderer` flag
|
|
113
|
+
- **Auto-start**: Configured automatically on first run
|
|
114
|
+
- **Update Channels**: production only — there is no develop environment
|
|
115
|
+
|
|
116
|
+
### Build Configuration
|
|
117
|
+
- **Windows**: NSIS installer with code signing
|
|
118
|
+
- **macOS**: DMG package with hardened runtime
|
|
119
|
+
- **Cross-platform**: Electron Builder configuration supports multiple platforms
|
|
120
|
+
|
|
121
|
+
## Usage
|
|
122
|
+
|
|
123
|
+
### Basic Operation
|
|
124
|
+
1. Application starts minimized to system tray
|
|
125
|
+
2. Right-click tray icon for configuration menu
|
|
126
|
+
3. Content is displayed via WebSocket connections or local server
|
|
127
|
+
4. Interactive elements support form submissions and confirmation buttons
|
|
128
|
+
|
|
129
|
+
### Content Display
|
|
130
|
+
- **HTML Content**: Full HTML rendering with CSS and JavaScript support
|
|
131
|
+
- **SVG Graphics**: Vector graphics with transparency support
|
|
132
|
+
- **Images**: PNG, JPG, and other image formats
|
|
133
|
+
- **Forms**: Interactive forms with submission handling
|
|
134
|
+
|
|
135
|
+
### Position Management
|
|
136
|
+
Content can be positioned using a grid system:
|
|
137
|
+
- Horizontal positions: 1-3 (left, center, right)
|
|
138
|
+
- Vertical positions: 1-3 (top, middle, bottom)
|
|
139
|
+
|
|
140
|
+
## Development
|
|
141
|
+
|
|
142
|
+
### Code Standards
|
|
143
|
+
- **TypeScript**: Strict typing throughout the codebase
|
|
144
|
+
- **Vue 3 Composition API**: Modern Vue patterns
|
|
145
|
+
- **Service Pattern**: Modular, testable service architecture
|
|
146
|
+
- **Error Handling**: Comprehensive error logging and recovery
|
|
147
|
+
|
|
148
|
+
### Key Systems
|
|
149
|
+
1. **Glass System**: Manages transparent overlay display
|
|
150
|
+
2. **Config Menu**: System tray configuration interface
|
|
151
|
+
3. **User Data Manager**: Persistent storage management
|
|
152
|
+
4. **WebSocket Manager**: External communication handling
|
|
153
|
+
|
|
154
|
+
### Testing
|
|
155
|
+
- Development mode with hot reload
|
|
156
|
+
- Comprehensive logging for debugging
|
|
157
|
+
- Auto-update testing in development environment
|
|
158
|
+
|
|
159
|
+
## Deployment
|
|
160
|
+
|
|
161
|
+
### Build Process
|
|
162
|
+
1. **Renderer Build**: Vite-based TypeScript compilation
|
|
163
|
+
2. **Main Build**: Electron Builder packaging
|
|
164
|
+
3. **Code Signing**: Digital signature application
|
|
165
|
+
4. **Installer Creation**: NSIS (Windows) or DMG (macOS)
|
|
166
|
+
|
|
167
|
+
### Update System
|
|
168
|
+
- **Main Updates (npm install)**: checks the npm registry every 3 hours and updates with
|
|
169
|
+
`npm install -g`, then relaunches. npm is never run while the app is up: on Windows the
|
|
170
|
+
running `electron.exe` is locked and could not be replaced.
|
|
171
|
+
- **Main Updates (legacy native)**: S3 installer download + execute (`autoupdate.js`),
|
|
172
|
+
only used by the deprecated native builds.
|
|
173
|
+
- **Renderer Updates**: Independent update system for frontend (unchanged, S3 zip)
|
|
174
|
+
- **Version Management**: Semantic versioning with hash verification
|
|
175
|
+
|
|
176
|
+
### Distribution
|
|
177
|
+
- **npm registry**: `@glassnote/client` — `npx @glassnote/client install`, no root, no
|
|
178
|
+
code signing. The installed command is still `glassnote`.
|
|
179
|
+
- **Bootstrap without Node**: `install.sh` / `install.ps1` fetch Node into
|
|
180
|
+
`~/.glassnote` and hand off to the package CLI
|
|
181
|
+
- **S3 Storage (legacy)**: native installers, deprecated
|
|
182
|
+
- **Publishing guard**: publishing to npmjs needs `GLASSNOTE_PUBLISH=PRODUCTION`;
|
|
183
|
+
any other registry (the local one) does not
|
|
184
|
+
|
|
185
|
+
## Security Considerations
|
|
186
|
+
|
|
187
|
+
### Application Security
|
|
188
|
+
- **Context Isolation**: Prevents renderer access to Node.js APIs
|
|
189
|
+
- **IPC Whitelisting**: Only approved channels can communicate
|
|
190
|
+
- **Code Signing**: Verifies application integrity
|
|
191
|
+
- **Auto-start Security**: Secure startup configuration
|
|
192
|
+
|
|
193
|
+
### Data Security
|
|
194
|
+
- **User Data Encryption**: Secure storage of preferences
|
|
195
|
+
- **Log Protection**: Automatic cleanup of sensitive data
|
|
196
|
+
- **Network Security**: Secure WebSocket connections
|
|
197
|
+
|
|
198
|
+
### Platform Security
|
|
199
|
+
- **macOS**: with the npm install there is no notarization step — npm downloads the
|
|
200
|
+
electron binary, so nothing is quarantined by the browser and Gatekeeper does not block
|
|
201
|
+
it. Hardened runtime / Apple signing only applied to the deprecated DMG.
|
|
202
|
+
- **Windows**: no installer to run means no SmartScreen prompt. eSigner code signing only
|
|
203
|
+
applied to the deprecated NSIS build.
|
|
204
|
+
- **Linux sandbox**: a rootless install cannot make `chrome-sandbox` setuid root, so the
|
|
205
|
+
launcher picks the best available option (setuid → user namespaces → `--no-sandbox`)
|
|
206
|
+
and says so. `glassnote fix-sandbox` restores the full sandbox with one sudo.
|
|
207
|
+
- **Sandboxing**: Limited renderer process capabilities
|
|
208
|
+
|
|
209
|
+
## Troubleshooting
|
|
210
|
+
|
|
211
|
+
### Common Issues
|
|
212
|
+
1. **Transparency Issues**: Ensure graphics drivers are updated
|
|
213
|
+
2. **Sound Not Playing**: Check system audio settings
|
|
214
|
+
3. **Auto-start Failure**: Verify user permissions
|
|
215
|
+
4. **Update Problems**: Check network connectivity and S3 access
|
|
216
|
+
|
|
217
|
+
### Logs
|
|
218
|
+
- Application logs stored in `%APPDATA%/glassnote/logs/` (Windows)
|
|
219
|
+
- Automatic cleanup of logs older than 30 days
|
|
220
|
+
- Detailed renderer logging available in development mode
|
|
221
|
+
|
|
222
|
+
## License
|
|
223
|
+
|
|
224
|
+
Proprietary software - All rights reserved.
|
|
225
|
+
|
|
226
|
+
## Support
|
|
227
|
+
|
|
228
|
+
For technical support and documentation, contact the development team.
|