Development Guide
Welcome to the DevWorkbench development guide! This page contains everything you need to know about contributing to the project.
π€ The AI-First Development Story
DevWorkbench is unique in that itβs a 100% AI-generated application. Every line of code, configuration, and documentation was created through natural language conversations with AI assistants:
- Code Generation: Claude Code (Anthropic)
- UI Design: Google Stitch
- Development Workflow: Vibe Coding methodology
This project demonstrates the potential of AI-assisted development in creating production-ready applications.
ποΈ Architecture Overview
DevWorkbench is built with a modern tech stack optimized for performance and developer experience:
Frontend (React + TypeScript)
src/
βββ components/ # React components for each tool
β βββ Base64EncoderDecoder.tsx
β βββ HashGenerator.tsx
β βββ ...
βββ lib/ # Utility functions
βββ contexts/ # React contexts (theme, etc.)
βββ main.tsx # Application entry point
Backend (Rust + Tauri)
src-tauri/
βββ src/
β βββ main.rs # Tauri application setup
β βββ lib.rs # Command definitions
β βββ *.rs # Feature-specific modules
βββ tauri.conf.json # Tauri configuration
π οΈ Development Setup
Prerequisites
- Node.js (v18 or higher)
node --version # Should output v18.x.x or higher
- Rust (v1.70 or higher)
rustc --version # Should output 1.70.0 or higher
- Platform-specific dependencies:
- macOS: Xcode Command Line Tools
- Linux:
libwebkit2gtk-4.1-dev
,libssl-dev
,libgtk-3-dev
- Windows: Windows Build Tools
Getting Started
- Clone the repository
git clone https://github.com/jiayun/DevWorkbench.git cd DevWorkbench
- Install dependencies
npm install
- Start development server
npm run tauri dev
π Development Workflow
Adding a New Tool
- Create the React component
// src/components/YourNewTool.tsx import React from 'react'; export function YourNewTool() { return ( <div className="tool-container"> {/* Your tool implementation */} </div> ); }
- Add Rust backend (if needed)
// src-tauri/src/your_tool.rs #[tauri::command] pub fn your_tool_function(input: String) -> Result<String, String> { // Implementation Ok(result) }
- Register the command
// src-tauri/src/main.rs tauri::Builder::default() .invoke_handler(tauri::generate_handler![ your_tool_function, // ... other commands ])
- Add to the main app
// src/App.tsx import { YourNewTool } from './components/YourNewTool'; // Add to the tools array
Code Style Guidelines
- TypeScript: Strict mode enabled, all types must be explicit
- React: Functional components with hooks
- Rust: Follow standard Rust conventions, use
cargo fmt
- CSS: Tailwind CSS utility classes, custom styles in component files
Testing
# Run TypeScript type checking
npx tsc --noEmit
# Format Rust code
cd src-tauri && cargo fmt
# Run Rust tests
cd src-tauri && cargo test
π Building for Production
Build Commands
# Build for current platform
npm run tauri build
# The output will be in:
# - Windows: src-tauri/target/release/bundle/msi/
# - macOS: src-tauri/target/release/bundle/dmg/
# - Linux: src-tauri/target/release/bundle/appimage/
Release Process
- Update version numbers
package.json
src-tauri/tauri.conf.json
src-tauri/Cargo.toml
- Update CHANGELOG.md
```markdown
[X.X.X] - YYYY-MM-DD
Added
- New features
Changed
- Updates
Fixed
- Bug fixes ```
- New features
- Run pre-release check
npm run pre-release-check
- Create git tag
git tag -a v0.x.x -m "Release version 0.x.x" git push origin v0.x.x
π€ Contributing
We welcome contributions! Hereβs how to get involved:
Contribution Process
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Follow the code style guidelines
- Add tests if applicable
- Update documentation
- Commit your changes
git commit -m 'Add amazing feature'
- Push to your fork
git push origin feature/amazing-feature
- Open a Pull Request
What Weβre Looking For
- π Bug fixes
- β¨ New developer tools
- π¨ UI/UX improvements
- π Documentation updates
- π Internationalization
- β‘ Performance optimizations
Code Review Process
- All PRs require at least one review
- CI must pass (TypeScript compilation, tests)
- Follow the existing code patterns
- Update relevant documentation
π Resources
Documentation
Tools
- VS Code with Rust and TypeScript extensions
- Rust Analyzer
- Tauri VS Code Extension
π Debugging
Frontend Debugging
- Open DevTools: Right-click in the app and select βInspect Elementβ
- Use React Developer Tools browser extension
Backend Debugging
- Use
println!()
for basic debugging - Check the console where you ran
npm run tauri dev
- Use
RUST_BACKTRACE=1
for detailed error traces
Common Issues
Build fails with TypeScript errors
npx tsc --noEmit # Check for type errors
Rust compilation errors
cd src-tauri
cargo clean
cargo build
Missing system dependencies
- Check the platform-specific requirements in the Prerequisites section
π‘ Tips for AI-Assisted Development
Since this project was built entirely with AI, here are tips for continuing that approach:
- Be specific in your prompts
- Provide context about existing code patterns
- Iterate on the generated code
- Review all generated code carefully
- Test thoroughly before committing
π― Future Roadmap
Planned features and improvements:
- Plugin system for custom tools
- Cloud sync for settings
- More encoding/decoding tools
- Advanced text processing
- API testing tools
- Database utilities
π Get Help
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Security: Report security issues privately via GitHub Security tab
Happy coding! π