|
1 | | -# README |
| 1 | +# CAN Finder Desktop |
2 | 2 |
|
3 | | -## About |
| 3 | +Base on Project: https://github.com/linker-bot/can-finder |
4 | 4 |
|
5 | | -This is the official Wails Vanilla template. |
| 5 | +## Project Overview |
6 | 6 |
|
7 | | -You can configure the project by editing `wails.json`. More information about the project settings can be found |
8 | | -here: https://wails.io/docs/reference/project-config |
| 7 | +**CAN Finder** is a cross-platform desktop application specifically designed for LinkerHand devices, providing network device auto-discovery and management functionalities. Built using Go and the Wails framework, CAN Finder listens for UDP broadcasts from devices, displaying essential information in real-time, including device name, IP address, MAC address, model, and software version. |
9 | 8 |
|
10 | | -## Live Development |
| 9 | +## Features |
11 | 10 |
|
12 | | -To run in live development mode, run `wails dev` in the project directory. This will run a Vite development |
13 | | -server that will provide very fast hot reload of your frontend changes. If you want to develop in a browser |
14 | | -and have access to your Go methods, there is also a dev server that runs on http://localhost:34115. Connect |
15 | | -to this in your browser, and you can call your Go code from devtools. |
| 11 | +* **Real-Time Device Discovery**: Automatically discovers CAN devices in real-time through UDP broadcasts. |
| 12 | +* **Intuitive Desktop Interface**: Offers an intuitive and user-friendly interface to display detailed device information, including first discovery and last active timestamps. |
| 13 | +* **Real-Time Updates**: Utilizes event-driven architecture provided by Wails for seamless real-time frontend-backend communication, eliminating the need for manual refreshes. |
16 | 14 |
|
17 | | -## Building |
| 15 | +## System Architecture |
18 | 16 |
|
19 | | -To build a redistributable, production mode package, use `wails build`. |
| 17 | +CAN Finder comprises two main parts: |
| 18 | + |
| 19 | +1. **Backend Service**: Developed in Go, leveraging Wails for backend logic, including UDP broadcast handling and event-driven data communication. |
| 20 | +2. **Frontend Display**: Created using native HTML, CSS, and JavaScript, seamlessly integrated with the backend via Wails' event-based APIs. |
| 21 | + |
| 22 | +## Technology Stack |
| 23 | + |
| 24 | +* Go Language |
| 25 | +* Wails Framework |
| 26 | +* HTML, CSS, and JavaScript |
| 27 | +* UDP Broadcast Protocol |
| 28 | + |
| 29 | +## Installation and Usage |
| 30 | + |
| 31 | +### Build and Run |
| 32 | + |
| 33 | +Ensure Go and Wails CLI are installed: |
| 34 | + |
| 35 | +```shell |
| 36 | +go install github.com/wailsapp/wails/v2/cmd/wails@latest |
| 37 | + |
| 38 | +# Verify installation |
| 39 | +wails doctor |
| 40 | + |
| 41 | +# Build and run |
| 42 | +git clone https://github.com/your-username/can-finder.git |
| 43 | +cd can-finder |
| 44 | +wails build |
| 45 | +``` |
| 46 | + |
| 47 | +### Accessing the Application |
| 48 | + |
| 49 | +After building, run the executable located in the `build/bin` directory: |
| 50 | + |
| 51 | +* **Windows**: `CAN Finder.exe` |
| 52 | +* **macOS**: `CAN Finder.app` |
| 53 | +* **Linux**: `CAN Finder` |
| 54 | + |
| 55 | +The desktop application will start automatically upon launching the executable. |
| 56 | + |
| 57 | +## Project Structure |
| 58 | + |
| 59 | +``` |
| 60 | +can-finder/ |
| 61 | +├── main.go # Main entry point of the Wails app |
| 62 | +├── backend |
| 63 | +│ └── app.go # Backend logic, handling UDP broadcasts |
| 64 | +└── frontend |
| 65 | + └── index.html # Frontend display and logic |
| 66 | +``` |
| 67 | + |
| 68 | +## Configuration Details |
| 69 | + |
| 70 | +* UDP broadcast listening port is set to `9999` (modifiable in backend source code). |
| 71 | + |
| 72 | +## Example Display Information |
| 73 | + |
| 74 | +The desktop interface dynamically updates and displays: |
| 75 | + |
| 76 | +* Device Name |
| 77 | +* IP Address |
| 78 | +* MAC Address |
| 79 | +* Device Model |
| 80 | +* Software Version (with links to GitHub Releases) |
| 81 | +* First Seen Time |
| 82 | +* Last Active Time |
| 83 | + |
| 84 | +## Error Handling and Logging |
| 85 | + |
| 86 | +Comprehensive logging is implemented to assist in troubleshooting device discovery and communication issues. Logs can be viewed directly within the Wails runtime console. |
| 87 | + |
| 88 | +## Dependencies |
| 89 | + |
| 90 | +Managed automatically via Go modules and Wails: |
| 91 | + |
| 92 | +* github.com/wailsapp/wails/v2 |
| 93 | + |
| 94 | +Use `go mod tidy` to manage dependencies. |
| 95 | + |
| 96 | +## Automated Building (GitHub Actions) |
| 97 | + |
| 98 | +CAN Finder leverages GitHub Actions for automatic builds across multiple platforms (Windows, macOS, Linux) upon tagged releases or manual triggers. See `.github/workflows/build.yml` for more details. |
| 99 | + |
| 100 | +## License |
| 101 | + |
| 102 | +CAN Finder is released under the GPL-3.0 license. |
| 103 | + |
| 104 | +--- |
| 105 | + |
| 106 | +Contributions are warmly welcomed! Feel free to submit code, raise issues, or create pull requests to help us continuously improve CAN Finder. |
0 commit comments