|  | 
|  | 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`.- 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. | 
|  | 31 | + | 
|  | 32 | +Reporting issues | 
|  | 33 | + | 
|  | 34 | +- For bugs or feature requests related to HTTP Toolkit itself, prefer filing issues at the main repo: https://github.com/httptoolkit/httptoolkit/ | 
|  | 35 | +- For issues specific to this desktop shell (packaging, Electron behaviour, installers), open an issue in this repo. | 
|  | 36 | + | 
|  | 37 | +Making changes & pull requests | 
|  | 38 | + | 
|  | 39 | +- Create a feature branch from main for each change. | 
|  | 40 | +- Keep PRs focused and include a clear description of the problem and your solution. | 
|  | 41 | +- Ensure the TypeScript compiles: `npm run build:src` | 
|  | 42 | +- If your change affects packaging or build steps, include instructions to reproduce locally. | 
|  | 43 | +- CI must pass before merging; maintainers will review and merge. | 
|  | 44 | + | 
|  | 45 | +Coding style & tests | 
|  | 46 | + | 
|  | 47 | +- This project is TypeScript. Follow existing code patterns and style. | 
|  | 48 | +- Run the TypeScript compiler to check for errors: `npm run build:src` | 
0 commit comments