Client-Side AI React Hooks Powered by Transformers.js and Web Workers
Posted by baskvava 3 hours ago
Comments
Comment by baskvava 3 hours ago
I built react-zero-ai because I was tired of spinning up backend infrastructure and handling CORS just to do basic sentiment analysis or vector embeddings in my React apps. I also wanted a solution that guarantees absolute user privacy (no data leaves the browser).
Under the hood, it wraps Transformers.js models into standard React Hooks (useSentimentAnalysis, useEmbeddings, useImageClassifier) and automatically delegates the heavy ML workload to a pool of background Web Workers to keep the main UI thread silky smooth.
It's 100% offline, free (compute is offloaded to the user), and requires zero config (no WASM tooling required on your end).
I created a live demo here if you want to try it out right away: https://baskvava.github.io/react-zero-ai/
Would love to hear your feedback on the architecture or answer any questions about running WASM/Web Workers in React!