{"id":29213784,"url":"https://github.com/mistricky/zzhack","last_synced_at":"2025-07-02T23:05:27.432Z","repository":{"id":37016021,"uuid":"362553960","full_name":"mistricky/zzhack","owner":"mistricky","description":"🦀️ WASM WebApp template written in Rust","archived":false,"fork":false,"pushed_at":"2025-06-27T11:28:03.000Z","size":23750,"stargazers_count":329,"open_issues_count":1,"forks_count":27,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-27T11:28:27.674Z","etag":null,"topics":["rust","template","wasm","webapp","yew","zzhack","zzhack-cli"],"latest_commit_sha":null,"homepage":"https://zzhack-stack.github.io/zzhack/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mistricky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-28T17:29:27.000Z","updated_at":"2025-06-27T11:28:07.000Z","dependencies_parsed_at":"2024-01-17T10:02:09.503Z","dependency_job_id":"441c2bf8-8f95-402d-a4fd-46524ae25279","html_url":"https://github.com/mistricky/zzhack","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mistricky/zzhack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistricky%2Fzzhack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistricky%2Fzzhack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistricky%2Fzzhack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistricky%2Fzzhack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mistricky","download_url":"https://codeload.github.com/mistricky/zzhack/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mistricky%2Fzzhack/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263229088,"owners_count":23434003,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rust","template","wasm","webapp","yew","zzhack","zzhack-cli"],"created_at":"2025-07-02T23:04:43.739Z","updated_at":"2025-07-02T23:05:27.393Z","avatar_url":"https://github.com/mistricky.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terminal Emulator\n\nA browser-based terminal emulator built with Rust, Yew framework, and TailwindCSS for modern, responsive styling.\n\n## Features\n\n- **Interactive Terminal Interface**: Full-featured terminal UI with command history\n- **Built-in Commands**: \n  - `help` - Display help information for all available commands\n  - `echo` - Output text to the terminal\n- **Modern Web Technologies**: Built with Rust, Yew, WASM, and TailwindCSS\n- **Functional Components**: Modern Yew functional components with hooks\n- **Responsive Design**: TailwindCSS for consistent, responsive styling\n- **Hot Reload**: Development server with automatic reloading\n- **Syntax Highlighting**: Real-time command syntax highlighting with preview\n\n## Prerequisites\n\n- [Rust](https://rustup.rs/) (latest stable version)\n- [Node.js](https://nodejs.org/) (for npx to run TailwindCSS)\n- [Trunk](https://trunkrs.dev/) - WASM web application bundler\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd terminal-emulator\n   ```\n\n2. Install Trunk (if not already installed):\n   ```bash\n   cargo install --locked trunk\n   ```\n\nNote: TailwindCSS will be automatically downloaded and run via `npx` during the build process - no local installation needed!\n\n## Development\n\n### Option 1: Use the development script (recommended)\n```bash\n./dev.sh\n```\n\n### Option 2: Manual steps\n1. Generate TailwindCSS styles:\n   ```bash\n   ./generate-css.sh\n   ```\n\n2. Start the development server:\n   ```bash\n   trunk serve --open\n   ```\n\nThe application will be available at `http://127.0.0.1:8080`. \n\n**Note**: When you modify Tailwind classes in your Rust code, run `./generate-css.sh` to regenerate the CSS styles.\n\n## Building for Production\n\nBuild the application for production deployment:\n\n```bash\n./build.sh\n# Or manually:\ntrunk build --release\n```\n\nThe built files will be available in the `dist` directory.\n\n## Usage\n\nOnce the application is running:\n\n1. Click in the terminal input field or it should be automatically focused\n2. Type commands and press Enter to execute them\n3. Available commands:\n   - `help` - Show all available commands and their usage\n   - `echo \u003ctext\u003e` - Output the specified text\n\n## Project Structure\n\n```\nsrc/\n├── lib.rs              # Library root and module exports\n├── main.rs             # WASM entry point\n├── app.rs              # Main App component (functional)\n├── components/\n│   ├── mod.rs          # Components module\n│   └── terminal.rs     # Terminal UI components (functional)\n└── commands/\n    └── mod.rs          # Command system and built-in commands\n\nTrunk.toml              # Trunk configuration\nCargo.toml              # Rust project configuration\nindex.html              # HTML template\ninput.css               # TailwindCSS input file\ntailwind.config.js      # TailwindCSS configuration\nbuild.sh                # Production build script\ndev.sh                  # Development script\ngenerate-css.sh         # TailwindCSS generation script\n```\n\n## Architecture\n\n- **Frontend**: Yew functional components with hooks for reactive UI\n- **Styling**: TailwindCSS for utility-first, responsive design\n- **Command System**: Extensible command architecture with trait-based design\n- **Build System**: Trunk for WASM bundling with TailwindCSS integration\n- **State Management**: Yew hooks (use_state, use_effect) for component state\n\n## Adding New Commands\n\nTo add a new command:\n\n1. Create a struct that implements the `Command` trait in `src/commands/mod.rs`\n2. Register the command in `CommandExecutor::new()`\n3. The command will automatically be available in the terminal\n\nExample:\n```rust\npub struct MyCommand;\nimpl Command for MyCommand {\n    fn execute(\u0026self, args: \u0026[String]) -\u003e CommandResult {\n        CommandResult::Success(\"Hello from my command!\".to_string())\n    }\n    \n    fn description(\u0026self) -\u003e \u0026'static str {\n        \"My custom command\"\n    }\n    \n    fn usage(\u0026self) -\u003e \u0026'static str {\n        \"mycommand\"\n    }\n}\n```\n\n## License\n\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmistricky%2Fzzhack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmistricky%2Fzzhack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmistricky%2Fzzhack/lists"}