Transform any image into stunning 3D/AR models with AI-powered conversion. Built with Next.js, FastAPI, and cutting-edge AI models.
- Image to 3D Conversion: Upload any image and convert it to a 3D model using InstantMesh
- AI Prompt Generation: Generate cinematic prompts using Groq AI (Llama 3.3)
- Text to Image: Create images from text prompts using Replicate SDXL
- AR Support: Export models in GLB and USDZ formats for AR experiences
- Authentication: Secure user authentication with Supabase
- Intelligent Caching: 60-80% cache hit rate reduces API costs
- Dark Mode: Beautiful UI with dark mode support
- Next.js 16 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Radix UI - Accessible component primitives
- Supabase Auth - User authentication
- FastAPI - High-performance Python API framework
- Replicate API - InstantMesh (3D conversion) & SDXL (image generation)
- Groq AI - Llama 3.3 for prompt generation
- Supabase - PostgreSQL database and storage
- Pydantic - Data validation
- Node.js 18+ and npm
- Python 3.13+
- Supabase account
- API keys for: Replicate, Groq, Google Gemini
- Clone the repository
git clone https://github.com/yourusername/arvia.git
cd arvia- Install dependencies
# Frontend
npm install
# Backend
cd api
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
cd ..- Configure environment variables
Frontend (.env.local):
cp .env.example .env.localEdit .env.local:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_keyBackend (api/.env):
cp api/.env.example api/.envEdit api/.env:
REPLICATE_API_TOKEN=your_replicate_api_token
GROQ_API_KEY=your_groq_api_key
GOOGLE_API_KEY=your_google_api_key
SUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key- Set up database
Run the SQL schema in your Supabase SQL Editor:
# See api/database_setup.sql- Run development servers
# Terminal 1: Frontend
npm run dev
# Terminal 2: Backend
cd api
source venv/bin/activate
uvicorn api.main:app --reload --port 8000- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
- Install Vercel CLI
npm install -g vercel- Deploy
vercel- Set environment variables in Vercel dashboard
Go to Settings → Environment Variables and add all variables from api/.env.example
- Deploy to production
vercel --prodRequired environment variables (set in Vercel dashboard):
REPLICATE_API_TOKENGROQ_API_KEYGOOGLE_API_KEYSUPABASE_URLSUPABASE_KEYSUPABASE_SERVICE_ROLE_KEY
All backend endpoints are available at /api/python/*:
POST /api/python/convert-image- Convert image to 3D modelGET /api/python/poll-status/{job_id}- Check conversion statusPOST /api/python/generate-prompt- Generate AI promptsPOST /api/python/generate-image- Generate images from textGET /api/python/health- Health check
See API Documentation for detailed endpoint information.
# Backend tests
cd api
python test_setup.py # Unit tests
./test_api.sh # API integration tests
python test_integration.py # Full integration testsarvia/
├── app/ # Next.js pages
│ ├── page.tsx # Home page (image conversion)
│ ├── prompt-generator/ # Prompt generator page
│ ├── signin/ # Sign in page
│ └── signup/ # Sign up page
├── components/ # React components
│ ├── ui/ # UI components
│ └── auth-modal.tsx # Authentication modal
├── lib/ # Utilities
│ ├── api.ts # API client
│ ├── auth-context.tsx # Auth context
│ └── supabase.ts # Supabase client
├── api/ # Python backend
│ ├── api/ # FastAPI routes
│ ├── services/ # External API integrations
│ ├── utils/ # Database, cache, storage
│ └── models/ # Pydantic schemas
├── public/ # Static assets
└── vercel.json # Deployment config
- ✅ No API keys in code
- ✅ Environment variables for sensitive data
- ✅ Supabase Row Level Security (RLS)
- ✅ CORS properly configured
- ✅ Input validation on all endpoints
- ✅ HTTPS enforced in production
- Frontend: < 3s page load
- API responses: < 500ms (non-3D endpoints)
- 3D conversion: 10-30s (depending on quality)
- Cache hit rate: 60-80%
- Cost savings: $240-600/year vs traditional hosting
cd api
pip install -r requirements.txt- Verify
SUPABASE_URLandSUPABASE_KEYare correct - Check Supabase project is active
- Ensure database schema is created
- Ensure all environment variables are set in Vercel
- Check
vercel.jsonis present - Review Vercel deployment logs
See CONTRIBUTING.md for contribution guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
- InstantMesh for 3D conversion
- Groq for fast AI inference
- Replicate for model hosting
- Supabase for backend infrastructure
Built with ❤️ by the Arvia team