Getting started
How does Convex UI work?
How does Convex UI work?
- Downloads React components to your
src/components/directory - Adds Convex backend functions to your
convex/directory - Installs any required npm dependencies
- Creates environment variable templates
Will it overwrite my existing files?
Will it overwrite my existing files?
| Scenario | Behavior |
|---|---|
| New file | Created automatically |
| Existing file (same content) | Skipped |
| Existing file (different content) | You’re prompted to choose |
Can I use this in an existing project?
Can I use this in an existing project?
Do I need to set up Convex first?
Do I need to set up Convex first?
What's the difference between Convex UI and shadcn/ui?
What's the difference between Convex UI and shadcn/ui?
- Convex backend functions (queries, mutations)
- Database schema definitions
- Authentication logic
- Realtime subscriptions
- Full-stack features out of the box
Technical questions
How does realtime work?
How does realtime work?
- ❌ No WebSocket configuration
- ❌ No polling intervals
- ❌ No cache invalidation logic
- ❌ No optimistic update boilerplate
useQuery hook. This powers features like live chat, presence indicators, and collaborative cursors.How does local development work?
How does local development work?
convex/schema.ts) and is version-controlled with your app.What authentication options are available?
What authentication options are available?
@convex-dev/auth:Password-based authentication
- Email/password sign-in
- User registration with validation
- Forgot password flow
- Password reset via email
- Email verification
Social authentication (OAuth)
- GitHub sign-in
- Google sign-in
- Extensible for additional providers
Can I use my own database instead of Convex?
Can I use my own database instead of Convex?
Why React only?
Why React only?
- shadcn/ui is React-based — Convex UI builds directly on top of it
- Convex has first-class React support — Hooks like
useQueryanduseMutationmake realtime seamless - It’s established tooling — Not a new library, just React components + Convex working together
convex/ work with any frontend. Only the React components are framework-specific. You could build a Vue or Svelte frontend that calls the same Convex functions.Framework support
Which frameworks are supported?
Which frameworks are supported?
| Framework | Status | Auth | Storage | Realtime |
|---|---|---|---|---|
| Next.js | ✅ Full support | ✅ | ✅ | ✅ |
| React (Vite) | ✅ Full support | ✅ | ✅ | ✅ |
| TanStack Start | ✅ Full support | ✅ | ✅ | ✅ |
| React Router v7 | ✅ Full support | ✅ | ✅ | ✅ |
- Client configuration (
lib/convex/client.ts) - Provider setup (
lib/convex/provider.tsx) - Routing patterns (pages vs routes)
- Environment variable prefixes (
NEXT_PUBLIC_vsVITE_)
I already have shadcn/ui installed
I already have shadcn/ui installed
add command to install Convex UI components:components.json configuration and theme settings.I already have Convex set up
I already have Convex set up
convex/ directory alongside your existing functions.Can I use this with App Router (Next.js)?
Can I use this with App Router (Next.js)?
I used an AI code generator (v0, Bolt, Lovable)
I used an AI code generator (v0, Bolt, Lovable)
Troubleshooting
Components aren't connecting to Convex
Components aren't connecting to Convex
.env.local):.env or .env.local):Schema type errors after adding components
Schema type errors after adding components
convex/schema.ts, you likely have conflicting table definitions.How to fix:Authentication isn't working
Authentication isn't working
| Issue | Solution |
|---|---|
| ”Invalid URL” error | Check CONVEX_SITE_URL matches your dev server (e.g., http://localhost:3000) |
| OAuth redirect fails | Verify callback URLs in GitHub/Google provider settings |
| Session not persisting | Ensure provider wraps your app in layout.tsx or _app.tsx |
| ”Not authenticated” in API calls | Check that auth middleware is properly configured |
Realtime updates aren't working
Realtime updates aren't working
convex devis running — The dev server must be active for realtime to work- You’re using
useQuery— Only queries (not actions) provide realtime subscriptions - Provider is configured — Your app must be wrapped with
ConvexProvider - Network connection — Check browser console for connection errors
File uploads failing
File uploads failing
- Storage is enabled — It’s enabled by default in Convex
- File size limits — Default max is 1GB, configurable in Convex settings
- CORS configuration — Check
convex/http.tsfor proper CORS headers - Authentication — File uploads may require an authenticated user
TypeScript errors in _generated folder
TypeScript errors in _generated folder
convex/_generated folder is auto-generated. Never edit it manually.To fix TypeScript errors:convex/schema.ts or function files.