-
Notifications
You must be signed in to change notification settings - Fork 58
feat: Migrate legacy jQuery frontend to Vue3 + Rust/WASM architecture #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This is a comprehensive migration of the AnyCommerce e-commerce platform from a 2014-era jQuery-based RIA to a modern Vue3 + Rust/WASM architecture for app4.dog smart pet treat dispensers. ## Major Changes ### Frontend (Vue3 + TypeScript) - Created modern Vue3 SPA using Composition API - Implemented TypeScript for full type safety - Set up Pinia for reactive state management - Configured Vite for fast HMR and optimized builds - Created Product and Cart components with 1:1 feature parity ### WASM API Layer (Rust) - Implemented DispatchQueue system for API request batching - Created ProductProcessor for variations and SKU calculation - Built CartManager for shopping cart operations - Added Validator for form validation (email, phone, credit card) - Optimized for size with LTO and panic=abort ### Infrastructure - Multi-stage Dockerfile for optimized production builds - justfile with comprehensive build automation recipes - b00t methodology integration for consistent workflows - Nginx configuration with WASM MIME types and SPA routing ### Project Structure ``` anycommerce/ ├── frontend-v3/ - Vue3 TypeScript frontend ├── wasm-api/ - Rust/WASM business logic ├── legacy/ - Original jQuery code (moved for reference) ├── .b00t/ - b00t methodology tools (submodule) ├── Dockerfile - Multi-stage production build ├── justfile - Build automation └── README.md - Comprehensive documentation ``` ## Technology Stack - Vue 3.x + TypeScript + Vite - Rust 1.91 + wasm-bindgen - Pinia for state management - Axios for HTTP client - Docker + nginx for deployment ## API Compatibility Maintains 1:1 compatibility with existing backend API: - appProductGet, appCartCreate, cartDetail, cartItemAppend - appCategoryList, appPublicSearch, and more ## Performance Improvements - Near-native performance for complex calculations via WASM - Reduced bundle size compared to legacy jQuery - Efficient product variation processing - Fast cart calculations ## Migration Notes - Legacy code preserved in /legacy directory - No XML data structures found (already JSON-based) - Markdown support maintained for backend compatibility - Ready for early integration testing ## Quick Start ```bash just install # Install all dependencies just build # Build WASM + frontend just dev # Start dev server (port 3000) just docker-run # Build and run in Docker ``` See API_MIGRATION_PLAN.md and README.md for detailed documentation. Co-authored-by: b00t AI Agent <b00t@elasticdotventures.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a comprehensive migration of the AnyCommerce e-commerce platform from a legacy jQuery-based architecture (circa 2014) to a modern Vue3 + Rust/WASM stack. The migration focuses on creating a high-performance frontend for app4.dog smart pet treat dispensers while maintaining complete API compatibility with the existing backend.
Key Changes:
- Implemented Vue3 frontend with TypeScript, Pinia state management, and Vite build tooling
- Created Rust/WASM API layer for performance-critical operations (cart management, product variations, validation)
- Established containerized deployment with multi-stage Docker builds and nginx configuration
Reviewed Changes
Copilot reviewed 35 out of 212 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
wasm-api/Cargo.toml |
Rust dependencies and build configuration for WASM module with size optimizations |
wasm-api/src/*.rs |
Core WASM modules: dispatch queue, product processor, cart manager, validation, and utilities |
frontend-v3/src/** |
Vue3 application structure including components, stores, types, and API client |
frontend-v3/package.json |
Frontend dependencies for Vue3, Pinia, TypeScript, and WASM integration |
frontend-v3/vite.config.ts |
Vite configuration with WASM plugin and API proxy setup |
justfile |
Build automation recipes using b00t methodology |
Dockerfile |
Multi-stage build for optimized production deployment |
README.md |
Comprehensive project documentation |
API_MIGRATION_PLAN.md |
Detailed migration strategy and API mapping |
Files not reviewed (1)
- frontend-v3/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
wasm-api/target/.rustc_info.json:1
- Build artifacts like target/.rustc_info.json and CACHEDIR.TAG files should not be committed to version control. Add
wasm-api/target/to .gitignore to prevent build artifacts from being tracked.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This is a comprehensive migration of the AnyCommerce e-commerce platform from a 2014-era jQuery-based RIA to a modern Vue3 + Rust/WASM architecture for app4.dog smart pet treat dispensers.
Major Changes
Frontend (Vue3 + TypeScript)
WASM API Layer (Rust)
Infrastructure
Project Structure
Technology Stack
API Compatibility
Maintains 1:1 compatibility with existing backend API:
Performance Improvements
Migration Notes
Quick Start
See API_MIGRATION_PLAN.md and README.md for detailed documentation.