- Documentation
- Development
Development
3 min read
Command Palette
Search for a command to run...
If you want to further customise Mue, fork it, or open a pull request implementing fixes or changes you can follow this guide here to get started.
Mue Tab
The Mue development utilities we use are Git for version control and Node.js and Webpack to run the development server and create production builds to be submitted to the extension stores. You should always use the latest versions of each unless noted. Cloudflare Pages is linked to our repository in order to automatically deploy new changes to our demo which is embedded on the Mue website. Codacy is also linked to check for errors on the code.
Installation
Requirements
- Git
- Bun
- A suitable browser (Only modern versions of Firefox and Chromium-based browsers are supported)
Starting
- Clone the repository using
git clone https://github.com/mue/mue.git --depth 1 - Run
bun installto install all needed dependencies - Run
bun startto start the development server - Code your heart out! (See the sections below for how to build the extension)
Building
- Run
bun run build - Run the command for your browser (Chrome, Firefox), for example
bun run chrome
Chromium Browser Testing
If you need to add the built extension to your browser, follow these steps:
- Visit the "extensions" page in your browser (this is normally accessible through
<browsername>://extensions, e.gedge://extensions) - Check the "Developer Mode" toggle
- Click "Load Unpacked" and find your manifest.json in the build directory
- Click ok and then open a new tab. You may need to disable the production Mue extension for your development one to appear.
Firefox Browser Testing
If you need to add the built extension to your browser, follow these steps:
- Visit the
about:debugging#/runtime/this-firefoxpage in Firefox - Click "Load Temporary Add-on..."
- Select your manifest.json in the build directory and then open a new tab. You may need to disable the production Mue extension for your development one to appear.
API
The API is a Cloudflare Worker deployed via Wrangler. It also serves the marketplace at marketplace.muetab.com.
Requirements
- Git
- Bun
- Wrangler CLI (
bun install -g wrangler)
Starting
- Clone the repository using
git clone https://github.com/mue/api.git - Run
bun installto install dependencies - Create a
.dev.varsfile in the root with your local secrets:
SUPABASE_URL=
SUPABASE_TOKEN=
UNSPLASH_TOKEN=
PEXELS_TOKEN=
MAPBOX_TOKEN=
OPENWEATHER_TOKEN=
- Run
bun run devto start the local Wrangler dev server
Deploying
Run bun run deploy to deploy to Cloudflare Workers. You must be authenticated with wrangler login first.
Secrets are set via wrangler secret put <SECRET_NAME> rather than .dev.vars.
Marketplace
The marketplace is a static content repository. The build script processes item JSON files and outputs bundled manifests used by the API and extension.
Requirements
Building
- Clone the repository using
git clone https://github.com/mue/marketplace.git - Run
bun installto install dependencies - Run
bun run buildto generate the output manifests, orbun run build:fullfor the full build including all item data
Testing
Run bun test to run the test suite, or bun run test:watch for watch mode.
Website
The website is built with Next.js and deployed to Cloudflare Pages.
Requirements
Starting
- Clone the repository using
git clone https://github.com/mue/website.git - Run
bun installto install dependencies - Run
bun devto start the development server
Building
- Run
bun buildto create a production build (also generates the sitemap vianext-sitemap) - Run
bun startto serve the production build locally
Missing something?
If you can see an area that needs more detail, feel free to improve it!