ClipX.AI is an Expo React Native app that converts a user photo into multiple AI-generated clipart styles (cartoon, flat, anime, pixel, sketch) using a secure Express backend proxy with Replicate.
- Photo input from gallery or camera
- Image normalization and validation before upload
- Multi-style generation (sequential processing to reduce API throttling)
- Per-style status cards (
loading,success,failed) - Before/after image compare slider
- Retry failed styles individually
- Download and share generated images
- Secure backend API secret validation
- Basic rate limiting and CORS controls
- Expo + React Native + TypeScript
- Expo Router for navigation
expo-image-picker,expo-image-manipulatorexpo-file-system,expo-sharing
- Node.js + Express
- Replicate SDK for model inference
dotenvfor environment config- In-memory request rate limiting
app/→ Screens and router layoutssrc/services/→ API and image utility servicesbackend/→ Express API server
Key files:
app/(tabs)/index.tsx– upload + style selection screenapp/generation.tsx– generation results and compare UIsrc/services/imageService.ts– image pick/normalize/validatesrc/services/clipartService.ts– client API callsbackend/server.js– API, validation, generation logic
Copy templates and fill values:
- Frontend template:
.env.example - Backend template:
backend/.env.example
Frontend .env:
EXPO_PUBLIC_API_URL=https://your-backend-domain.com
EXPO_PUBLIC_API_SECRET=your_api_secretBackend backend/.env:
PORT=3001
REPLICATE_API_KEY=your_replicate_key
API_SECRET=your_api_secret
DEMO_MODE=false
MODEL_TARGET=sdxl-img2img
REPLICATE_REQUEST_DELAY_MS=1200
CORS_ORIGINS=https://your-frontend-domain.com# frontend
npm install
# backend
cd backend
npm installcd backend
npm startnpx expo start- Ensure phone and laptop are on the same Wi-Fi network
- Set
EXPO_PUBLIC_API_URLto a reachable backend URL (notlocalhost) - Reload Expo app after env changes
Returns service status, active model target, and demo mode state.
Headers:
Content-Type: application/jsonx-api-secret: <API_SECRET>
Body:
{
"imageBase64": "<base64 image>",
"styles": ["cartoon", "anime"]
}- Deploy
backend/as a Node service on Railway/Fly/VPS - Set backend environment variables in host dashboard
- Use deployed HTTPS URL in frontend
.env
- Do not commit real
.envfiles - Rotate
REPLICATE_API_KEYandAPI_SECRETif exposed - Keep strict
CORS_ORIGINSin production
- Core app and backend flow implemented
- Ready for deployment, E2E validation, and release packaging
- APK / AAB link: Add here
- Demo video link: Add here