A modern web interface built with Astro and Svelte.
This project uses Bun for faster package management and runtime performance.
bun install
Start the development server:
bun run dev
# or simply: bun dev
Visit http://localhost:4321 to see your site.
Build for production:
bun run build
# or: bun build
Preview the production build:
bun run preview
# or: bun preview
Note: 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.jsonFor 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.png
If 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.json
Netlify: 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.
public/web_controls/scripts/*.scpt files are AppleScript source for convenience. For production, compile them in Script Editor and replace the files with the compiled .scpt.private_key.pem to git. Keep it local or in CI secrets.System Events for 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, attach MacRCDesktop_v2.1.dmg, then point the app at the asset URL (e.g. https://github.com/.../releases/download/v2.1/MacRCDesktop_v2.1.dmg) in VersionSelector.svelte, MacDownloadButton.svelte, and verify.astro.
Git LFS
Run git 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.