Skip to content

AlejandroGispert/MacRemoteClient-webpage

Repository files navigation

MacRemoteClient-webpage

A modern web interface built with Astro and Svelte.

Why Astro + 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

🚀 Getting Started

This project uses Bun for faster package management and runtime performance.

Install Dependencies

bun install

Development

Start the development server:

bun run dev
# or simply: bun dev

Visit http://localhost:4321 to see your site.

Build

Build for production:

bun run build
# or: bun build

Preview

Preview the production build:

bun run preview
# or: bun preview

Note: You can also use npm commands if preferred, but Bun is significantly faster for installs and can be used as a runtime alternative.

📁 Project Structure

/
├── public/          # Static assets (images, fonts, etc.)
├── src/
│   ├── components/  # Svelte components
│   ├── layouts/     # Astro layouts
│   └── pages/       # Astro pages (file-based routing)
└── astro.config.mjs # Astro configuration

Announcing a New Version

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/"
}

Remote Controls Catalog (Web)

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

Hashes (SHA-256)

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

Signing the manifest (RSA)

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.

Notes

  • The checked-in 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.
  • Ensure these files are served over HTTPS.
  • Never commit private_key.pem to git. Keep it local or in CI secrets.
  • Some scripts (e.g. ones that use System Events for keystrokes) require macOS Accessibility permissions.

🎨 Using Svelte Components

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 immediately
  • client:idle - Load when browser is idle
  • client:visible - Load when component is visible
  • client:media - Load based on media query

Hosting the DMG

.dmg installers are in .gitignore because GitHub rejects files over 100 MB. To serve them:

  1. 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.

  2. 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.

📚 Learn More

About

A webpage for the Mac Remote Controller App.

Topics

Resources

Stars

Watchers

Forks

Contributors