|
1 | | -# [Live Site - HackRF.app](https://hackrf.app/) |
| 1 | +# Mayhem Hub |
2 | 2 |
|
3 | | -This is a [Next.js](https://nextjs.org/) TypeScript project. We use [Tailwind](https://tailwindcss.com/) for styling. |
| 3 | +## [Live Site → HackRF.app](https://hackrf.app/) |
4 | 4 |
|
5 | | -We have make this website a PWA, so you can load it even without an internet connection! |
| 5 | +The web interface for everything HackRF/Portapack Mayhem. This project provides a comprehensive, browser-based dashboard to interact with your device, eliminating the need for command-line tools or constant SD card swapping for many common tasks. |
6 | 6 |
|
7 | | -# What is this? |
| 7 | +This application is a Progressive Web App (PWA), so you can install it on your desktop and use it offline! |
8 | 8 |
|
9 | | -If you are new to *HackRF+PortaPack+Mayhem*, check this: |
| 9 | +## What is this? |
| 10 | + |
| 11 | +If you are new to the _HackRF + PortaPack + Mayhem firmware_, this video provides a great overview of what the firmware can do: |
10 | 12 |
|
11 | 13 | [<img alt="The Best HackRF Portapack Firmware Yet - Mayhem Version 2" src="https://img.youtube.com/vi/WZqCENz-YAg/maxresdefault.jpg" width="512">](https://www.youtube.com/watch?v=WZqCENz-YAg) |
12 | 14 |
|
| 15 | +Mayhem Hub extends the functionality of your device by bringing it to your web browser. |
| 16 | + |
| 17 | +## Features |
| 18 | + |
| 19 | +- **Live Screen Streaming**: View your PortaPack's screen in real-time on your computer. |
| 20 | +- **Remote Control**: Interact with your device's screen and buttons directly from the web UI, including keyboard shortcuts. |
| 21 | +- **File Management**: Upload and download files to/from your device's SD card without removing it. |
| 22 | +- **One-Click Firmware Updates**: Easily update to the latest stable or nightly Mayhem firmware builds. |
| 23 | +- **Custom Firmware Flashing**: Flash `.tar` firmware files of your choice. |
| 24 | +- **Serial Console**: Access a full serial console for sending commands and viewing logs. |
| 25 | +- **Scripting**: Run `.ppsc` scripts on your device. |
| 26 | +- **PWA Support**: Installable as a desktop app for a native-like experience and offline access. |
| 27 | +- **Customizable UI**: Toggle visibility of different UI components to suit your workflow. |
| 28 | + |
| 29 | +## Requirements |
| 30 | + |
| 31 | +### Hardware & Firmware |
| 32 | + |
| 33 | +- A **HackRF** with a **PortaPack**. |
| 34 | +- **Mayhem Firmware**: Ensure you are running at least stable version `v2.0.0` or nightly `n_240114` (or newer). |
| 35 | +- Your PortaPack must be in **normal mode** (not HackRF mode) to connect. |
| 36 | + |
| 37 | +### Browser Support |
| 38 | + |
| 39 | +This application relies on the **Web Serial API**, which is not supported by all browsers. For the best experience, please use a compatible browser like: |
| 40 | + |
| 41 | +- Google Chrome |
| 42 | +- Microsoft Edge |
| 43 | +- Opera |
| 44 | + |
| 45 | +You can check the latest browser compatibility on [caniuse.com/web-serial](https://caniuse.com/web-serial). |
| 46 | + |
| 47 | +### Operating System Notes |
| 48 | + |
| 49 | +- **macOS Users**: There are known issues with Web Serial on macOS. If you encounter problems, please check and contribute to the discussion [here](https://github.com/portapack-mayhem/MayhemHub/issues/43). |
| 50 | + |
| 51 | +## Tech Stack |
| 52 | + |
| 53 | +- [Next.js](https://nextjs.org/) - React Framework |
| 54 | +- [TypeScript](https://www.typescriptlang.org/) - Language |
| 55 | +- [Tailwind CSS](https://tailwindcss.com/) - CSS Framework |
| 56 | +- [DaisyUI](https://daisyui.com/) - Tailwind CSS Component Library |
| 57 | +- [Web Serial API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API) - Hardware Communication |
| 58 | +- [PWA](https://web.dev/progressive-web-apps/) - for app-like features and offline support |
13 | 59 |
|
14 | 60 | ## Getting Started |
15 | 61 |
|
16 | | -First, install the dependencies |
| 62 | +Follow these steps to get a local copy up and running. |
| 63 | + |
| 64 | +### Prerequisites |
| 65 | + |
| 66 | +- [Node.js](https://nodejs.org/) (v18.17.0 or later) |
| 67 | +- npm, yarn, or pnpm |
| 68 | + |
| 69 | +### Installation & Running |
| 70 | + |
| 71 | +1. **Clone the repository:** |
17 | 72 |
|
18 | 73 | ```bash |
19 | | -npm i |
| 74 | + git clone https://github.com/portapack-mayhem/MayhemHub.git |
| 75 | + cd MayhemHub |
20 | 76 | ``` |
21 | 77 |
|
22 | | -Then, run the development server: |
| 78 | +2. **Install dependencies:** |
23 | 79 |
|
24 | 80 | ```bash |
25 | | -npm run dev |
26 | | -# or |
27 | | -yarn dev |
28 | | -# or |
29 | | -pnpm dev |
30 | | -# or |
31 | | -bun dev |
| 81 | + npm install |
32 | 82 | ``` |
33 | 83 |
|
34 | | -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 84 | +3. **Run the development server:** |
| 85 | + |
| 86 | +```bash |
| 87 | + npm run dev |
| 88 | +``` |
| 89 | + |
| 90 | + You can also use `yarn dev`, `pnpm dev`, or `bun dev`. |
| 91 | + |
| 92 | +4. Open [http://localhost:3000](http://localhost:3000) with a compatible browser to see the result. |
| 93 | + |
| 94 | +### Other Scripts |
| 95 | + |
| 96 | +- **Build for production:** |
| 97 | + |
| 98 | +```bash |
| 99 | + npm run build |
| 100 | +``` |
| 101 | + |
| 102 | +- **Lint the project:** |
| 103 | + |
| 104 | +```bash |
| 105 | + npm run lint |
| 106 | +``` |
| 107 | + |
| 108 | +## Cloudflare Development |
| 109 | + |
| 110 | +To run the Cloudflare Functions locally for development, you can use Wrangler: |
| 111 | + |
| 112 | +```bash |
| 113 | +npx wrangler pages dev public |
| 114 | +``` |
| 115 | + |
| 116 | +## Contributing |
| 117 | + |
| 118 | +Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. |
35 | 119 |
|
36 | | -## Cloudflare |
| 120 | +If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". |
37 | 121 |
|
38 | | -To run the Cloudflare Functions locally you can run |
39 | | -`npx wrangler pages dev public` |
| 122 | +1. Fork the Project |
| 123 | +2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) |
| 124 | +3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) |
| 125 | +4. Push to the Branch (`git push origin feature/AmazingFeature`) |
| 126 | +5. Open a Pull Request |
0 commit comments