
Vectr is an AI-powered image search application template that automatically generates descriptions for uploaded images and indexes them for semantic search.
When you upload an image, Vectr automatically:
Each step in the image processing workflow is isolated and runs on a separate serverless function with automatic retries:
Step 1: Upload Image (upload-image.ts)
Step 2: Generate Description (generate-description.ts)
Step 3: Index Image (index-image.ts)
Vectr uses sophisticated error handling to ensure reliable processing:
The easiest way to deploy Vectr is using the Vercel Marketplace:
During deployment, you'll be prompted to set up:
Both services have generous free tiers and will be automatically configured. No database needed!
Create a .env.local file with:
Open http://localhost:3000 to see your app.
pnpm dev - Start development server with Turbopackpnpm build - Build for productionpnpm check - Run linting checkspnpm format - Format code with Biome
| Variable | Description | Required | 
|---|---|---|
| UPSTASH_SEARCH_URL | Upstash Vector Search endpoint | Yes | 
| UPSTASH_SEARCH_TOKEN | Upstash authentication token | Yes | 
| BLOB_READ_WRITE_TOKEN | Vercel Blob Storage token | Yes | 
| XAI_API_KEY | xAI API key for Grok Vision | Yes | 
Vectr includes comprehensive logging for monitoring and debugging:
[WORKFLOW] - Workflow-level events and timing[stepId] - Step-level events with unique identifiers[API] - HTTP request/response loggingAll logs include timestamps, attempt counts, and duration metrics.
Contributions are welcome! Please feel free to submit a Pull Request. Our Contributing Guide has more information on how to get started.
MIT