My App

Convex

Create new convex project

npx convex dev --once --configure=new
  • Creates new convex project
  • creates convex/ folder
  • creates .env.local with CONVEX_DEPLOYMENT, VITE_CONVEX_URL

srstack add-convex

npx srstack@latest add-convex
  • Adds sample schema and route
  • Adds reusable fn middleware

Prompt

### in __root.tsx

- Wrap AppProvider with AppConvexProvider from app-convex-provider.tsx

File Storage

https://docs.convex.dev/file-storage

Vercel deployment

  1. override build command
npx convex deploy --cmd 'npm run build'
  1. Settings -> URL & Deploy key -> Deploy keys | Create
  • Paste in vercel env var CONVEX_DEPLOY_KEY
  • also set VITE_CONVEX_URL with prod

On this page