A collection of essential developer tools and utilities to streamline development workflows and boost productivity.
Check out the live application here: DevTools Website
- Base64 encoder
- Base64 decoder
- Base64 url encoder
- Base64 url decoder
- JWT parser
- XML formatter
- JSON formatter
- Clone the repository:
git clone https://github.com/amanshaw4511/devtools.git cd devtools
- Install Node dependencies:
pnpm install
- Run the React application:
pnpm run dev
The backend tools are written in Rust and compiled into WebAssembly, enabling seamless integration into the React application without requiring a backend server.
- Ensure Rust is installed. Follow the Rust installation guide.
- Navigate to the Rust project directory:
cd dev-tools-wasm
- Install
wasm-pack
:cargo install wasm-pack
- Compile the Rust code into WebAssembly:
wasm-pack build --target web
- The compiled WebAssembly module will now be accessible from the React application.
To add a new tool, follow the steps below. We'll demonstrate this by adding a Character Counter tool.
- Create a new file in the
dev-tools-wasm/src
directory namedcharacter-counter.rs
. - Add the following code:
#[wasm_bindgen] pub fn character_counter(input: &str) -> String { input.len().to_string() } // Unit tests #[cfg(test)] mod tests { use super::*; #[test] fn test_character_counter() { assert_eq!(character_counter("hello world!"), "12"); } }
- Open
dev-tools-wasm/src/lib.rs
and add the new module.mod character_counter;
Rebuild the project to compile the new tool into WebAssembly:
wasm-pack build --target web
- Open
src/transformer/index.ts
. - Update the
configs
array to add your new tool:export const configs: Config[] = [ // ... other tools { title: "Character Counter", method: "character_counter", // This should match the Rust function name } ]
- Run the application to see the new tool in action:
pnpm run dev