|
| 1 | +# Contributing to HTTP Toolkit Desktop |
| 2 | + |
| 3 | +Thanks for helping improve HTTP Toolkit. This document explains the quickest way to get started working on the desktop shell and how to contribute changes. |
| 4 | + |
| 5 | +Prerequisites |
| 6 | + |
| 7 | +- Node: >= 22 (this repo targets Node 22.x). We recommend using nvm to manage Node versions. |
| 8 | +- To use the pinned version (if you have nvm installed): |
| 9 | + - nvm install # installs the version in .nvmrc |
| 10 | + - nvm use |
| 11 | +- Or use your system Node if it meets the minimum version requirement. |
| 12 | + |
| 13 | +To get started |
| 14 | + |
| 15 | +- Clone this repo. |
| 16 | +- Install dependencies: `npm install` |
| 17 | +- To build & run the electron app locally: |
| 18 | + - `npm start` - runs the desktop app, downloading the latest live server & using the live UI from `app.httptoolkit.tech`. |
| 19 | + - Useful when working on just the desktop app and you want to test against the real live environment. |
| 20 | + - `npm run start:dev` - runs the desktop app with no built-in server, using the UI from `http://localhost:8080`. |
| 21 | + - Useful when you're running a local UI and/or server and want the desktop shell to host that UI. |
| 22 | + - To work on the UI and see it inside the desktop app, start the UI project (https://github.com/httptoolkit/httptoolkit-ui) with `npm start`. |
| 23 | + - Alternatively, run the server project (https://github.com/httptoolkit/httptoolkit-server) with `npm start`, and `npm run start:web` in the UI project to run server + UI locally. |
| 24 | +- To build distributable packages: |
| 25 | + - `npm run build` - builds & packages the desktop app for your current platform. |
| 26 | + |
| 27 | +A few tips |
| 28 | + |
| 29 | +- Electron dev behaviour isn't identical to production build behaviour — verify changes in a real built version too. |
| 30 | +- Most distributable build configuration lives in the `build` field of `package.json`. |
| 31 | + - On some platforms, building packages may require signing certificates; you can disable signing-related fields (for example `forceCodeSigning`) locally if needed. |
| 32 | +- CI pull requests do not receive secret environment variables, so packaging-related builds may fail in CI for PRs. This is expected — maintainers will manually build and evaluate such PR changes when necessary. |
| 33 | + |
| 34 | +Reporting issues |
| 35 | + |
| 36 | +- For bugs or feature requests related to HTTP Toolkit itself, prefer filing issues at the main repo: https://github.com/httptoolkit/httptoolkit-server/ |
| 37 | +- For issues specific to this desktop shell (packaging, Electron behaviour, installers), open an issue in this repo. |
| 38 | + |
| 39 | +Making changes & pull requests |
| 40 | + |
| 41 | +- Create a feature branch from main for each change. |
| 42 | +- Keep PRs focused and include a clear description of the problem and your solution. |
| 43 | +- Ensure the TypeScript compiles: `npm run build:src` |
| 44 | +- If your change affects packaging or build steps, include instructions to reproduce locally. |
| 45 | +- CI must pass before merging; maintainers will review and merge. |
| 46 | + |
| 47 | +Coding style & tests |
| 48 | + |
| 49 | +- This project is TypeScript. Follow existing code patterns and style. |
| 50 | +- Run the TypeScript compiler to check for errors: `npm run build:src` |
0 commit comments