Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/dist/
/target/
/Cargo.lock
/node_modules/
3 changes: 3 additions & 0 deletions .taurignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/src
/public
/Cargo.toml
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"emmet.includeLanguages": {
"rust": "html"
}
}
32 changes: 32 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[package]
name = "netwatch-ui"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
yew = { version = "0.21", features = ["csr"] }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3.60", features = [
"HtmlInputElement",
"HtmlFormElement",
"HtmlSelectElement",
"HtmlOptionElement",
"HtmlTextAreaElement",
"Navigator", "MediaQueryList",
] }
js-sys = "0.3"
serde = { version = "1", features = ["derive"] }
serde-wasm-bindgen = "0.6"
console_error_panic_hook = "0.1.7"
log="0.4.0"
yew-hooks="0.3.3"
gloo-storage = "0.2.2"
gloo = "0.11.0"




[workspace]
members = ["src-tauri"]
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
# NetWatch
# NetWatch Template

This project helps you watch network trafic, filter by protocol and import export data using [Tauri](https://tauri.app/) and [Yew](https://yew.rs/). It provides a foundation for building lightweight, secure apps with a Rust backend and a web-based frontend.

## Getting Started

### Prerequisites
- [Rust](https://rustup.rs/) - Install via rustup
- [Node.js](https://nodejs.org/en/download/) and Yarn - For managing frontend dependencies
- Recommended IDE: [VS Code](https://code.visualstudio.com/) with the [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) and [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) extensions

## Installation

| Step | Command/Instruction |
|-----------------------|-------------------------------------------------|
| Clone Repository | `git clone https://github.com/JhonnyMahony/NetWatch.git` |
| Navigate to Directory | `cd NetWatch` |
| Install Dependencies | `cargo install tauri-bundler` and `yarn install`|
Comment on lines +16 to +18
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix installation steps for better user experience.

The current installation instructions might confuse users with the combination of cargo install tauri-bundler and yarn install in a single step. Also, the tauri-bundler command is no longer needed for Tauri 2.

 | Step                  | Command/Instruction                              |
 |-----------------------|-------------------------------------------------|
 | Clone Repository      | `git clone https://github.com/JhonnyMahony/NetWatch.git` |
 | Navigate to Directory | `cd NetWatch`                                   |
-| Install Dependencies  | `cargo install tauri-bundler` and `yarn install`|
+| Install Dependencies  | `yarn install`                                  |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
| Clone Repository | `git clone https://github.com/JhonnyMahony/NetWatch.git` |
| Navigate to Directory | `cd NetWatch` |
| Install Dependencies | `cargo install tauri-bundler` and `yarn install`|
| Clone Repository | `git clone https://github.com/JhonnyMahony/NetWatch.git` |
| Navigate to Directory | `cd NetWatch` |
| Install Dependencies | `yarn install` |


## Running the Project

- **Development Mode**: Run `yarn dev` to start the app in development mode with hot reloading.
- **Runtime**: After building, the app runs on Windows, macOS, or Linux, depending on your platform.

## Building the Application

- Run `yarn build` to create a release build.
- Find the executable in the `target/release` directory (e.g., `.exe` for Windows, `.app` for macOS).

## Customizing the Template

- **Frontend**: Modify Yew components in the `src/web` directory.
- **Backend**: Adjust Rust logic in the `src/tauri` directory.
- **Configuration**: Edit `tauri.conf.json` for app settings and `package.json` for scripts.
Comment on lines +32 to +34
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Correct directory paths in customization instructions.

The directory paths mentioned in the customization instructions don't match the actual project structure. Based on the PR files, the correct paths should be updated.

 ## Customizing the Template
 
-* **Frontend**: Modify Yew components in the `src/web` directory.
-* **Backend**: Adjust Rust logic in the `src/tauri` directory.
+* **Frontend**: Modify Yew components in the `src/ui` directory.
+* **Backend**: Adjust Rust logic in the `src-tauri/src` directory.
 * **Configuration**: Edit `tauri.conf.json` for app settings and `package.json` for scripts.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **Frontend**: Modify Yew components in the `src/web` directory.
- **Backend**: Adjust Rust logic in the `src/tauri` directory.
- **Configuration**: Edit `tauri.conf.json` for app settings and `package.json` for scripts.
## Customizing the Template
* **Frontend**: Modify Yew components in the `src/ui` directory.
* **Backend**: Adjust Rust logic in the `src-tauri/src` directory.
* **Configuration**: Edit `tauri.conf.json` for app settings and `package.json` for scripts.


## Contributing

Feel free to fork this repository and submit pull requests with improvements or bug fixes. Please follow standard Rust and JavaScript coding conventions.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

9 changes: 9 additions & 0 deletions Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[build]
target = "./index.html"

[watch]
ignore = ["./src-tauri"]

[serve]
port = 1420
open = false
12 changes: 12 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>Tauri + Yew App</title>
<link data-trunk rel="copy-dir" href="public" />
<link href="./styles/output.css" data-trunk rel="css" />
<link data-trunk rel="copy-dir" href="static" />

</head>
<body></body>
</html>
Loading