A modern web interface built with Astro and Svelte.
- Astro: Delivers minimal JavaScript by default, resulting in faster page loads and better performance
- Svelte: A lightweight, reactive framework that compiles to efficient vanilla JavaScript
- Perfect combination: Astro handles routing and static generation, while Svelte provides interactive components when needed
This project uses Bun for faster package management and runtime performance.
bun installStart the development server:
bun run dev
# or simply: bun devVisit http://localhost:4321 to see your site.
Build for production:
bun run build
# or: bun buildPreview the production build:
bun run preview
# or: bun previewNote: You can also use
npmcommands if preferred, but Bun is significantly faster for installs and can be used as a runtime alternative.
/
├── public/ # Static assets (images, fonts, etc.)
├── src/
│ ├── components/ # Svelte components
│ ├── layouts/ # Astro layouts
│ └── pages/ # Astro pages (file-based routing)
└── astro.config.mjs # Astro configuration
To announce a new version, you need to update the version.json file on your server:
Path: https://macremotecontrollerwebpage.netlify.app/assets/version.json
Format:
{
"version": "2.0",
"url": "https://macremotecontrollerwebpage.netlify.app/"
}This repo serves a remote controls catalog from public/web_controls/, which is published at:
https://macremotecontrollerwebpage.netlify.app/web_controls/catalog.json
For backwards compatibility, netlify.toml redirects /controls/* to /web_controls/*.
Directory structure:
public/web_controls/
├── catalog.json
├── catalog.json.sig <-- Optional (recommended if your client verifies RSA signatures)
├── icons/
│ └── safari-private.png
└── scripts/
└── safari-private.scpt
Compute hashes and paste the hex string into public/web_controls/catalog.json:
shasum -a 256 public/web_controls/scripts/safari-private.scpt
shasum -a 256 public/web_controls/icons/safari-private.pngIf you're using RSA signing/verification in the client, generate and upload the signature:
openssl dgst -sha256 -sign private_key.pem -out public/web_controls/catalog.json.sig public/web_controls/catalog.jsonNetlify: Place catalog.json.sig in public/web_controls/ (or in the project root; the build copies it there) so it is served at /web_controls/catalog.json.sig.
- The checked-in
public/web_controls/scripts/*.scptfiles are AppleScript source for convenience. For production, compile them in Script Editor and replace the files with the compiled.scpt. - Ensure these files are served over HTTPS.
- Never commit
private_key.pemto git. Keep it local or in CI secrets. - Some scripts (e.g. ones that use
System Eventsfor keystrokes) require macOS Accessibility permissions.
Svelte components can be used in Astro pages with the client: directive:
---
import MyComponent from '../components/MyComponent.svelte';
---
<MyComponent client:load />Available directives:
client:load- Load immediatelyclient:idle- Load when browser is idleclient:visible- Load when component is visibleclient:media- Load based on media query
.dmg installers are in .gitignore because GitHub rejects files over 100 MB. To serve them:
-
GitHub Releases (recommended)
Create a release, attachMacRCDesktop_v2.1.dmg, then point the app at the asset URL (e.g.https://github.com/.../releases/download/v2.1/MacRCDesktop_v2.1.dmg) inVersionSelector.svelte,MacDownloadButton.svelte, andverify.astro. -
Git LFS
Rungit lfs track "public/files/*.dmg", add and commit the file, then push. Ensure your host (e.g. Netlify) has Git LFS enabled so the file is available in the deployed site.