Overview of My App Concept
I am building a React-based application that integrates AI APIs and Shopify features. The app provides the following functionality:
- Face Scanning and Avatar Customization:
- Users grant camera access to scan their face.
- Captured face data is sent to an AI API that generates avatars and applies wig styles (color, style, etc.) selected by the user.
- Product Selection from Shopify:
- Users can view products (wigs) from my Shopify store.
- After customization, users can add the selected wig to the Shopify cart.
- Chatbot Integration:
- An AI chatbot recommends wigs to users based on their preferences.
The app has multiple pages, routing, data passing, API integrations, and real-time components that need to work seamlessly.
My Main Concern
I initially planned to inject this React-based application into the Shopify storefront using a Theme App Extension, but I foresee significant challenges:
- Shopify Theme App Extensions Are Limited in Scope:
- Shopify Theme App Extensions are designed to inject small, modular components (e.g., product reviews, ratings, or banners) into the storefront, not full-scale applications.
- Routing and State Management Issues:
- React applications typically rely on client-side routing (e.g., React Router), which conflicts with Shopify’s Liquid templating and server-side routing structure.
- Performance Constraints:
- Shopify enforces strict limits on JavaScript asset size to ensure storefront performance. A large React app with dependencies (e.g., AI chatbot, API integrations) might exceed these limits.
- Real-Time AI Features:
- My app requires real-time camera access, face scanning, and chatbot interactions, which are complex to implement within Shopify’s storefront environment.
- Maintainability Concerns:
- Injecting a complex application directly into Shopify themes can make updates and scalability difficult.
Question to the Community
Is it feasible to inject a large-scale React application with multiple pages, routing, AI API integrations, and real-time features (like face scanning and chatbots) into the Shopify storefront using Theme App Extensions?
- If not, what are the limitations of Theme App Extensions that prevent this use case?
- Is there an alternative or best practice for achieving this functionality while maintaining Shopify’s performance and architectural guidelines?