Convex Community

CC

Convex Community

Join the Convex Discord! Explore Convex, the fullstack TypeScript platform for developers and startup founders.

Join

support-community

show-and-tell

general

self-hosted

announcements

Unable to get Tanstack Trellaux Start working

So brand new here... to start i'm trying to get this demo repo and running and getting this error. THe project did successfully get created on Convex and there's a .env.local file created with CONVEX_DEPLOYMENT and CONVEX_URL so not sure why the error is saying missing envar CONVEX_URL...
No description

Is nextjs recommended with convex? or not ideal?

I’m trying to decide what react framework I should use when building on convex. I’m fairly new to the react world but I’ve built apps with many types of tech stacks over the years. I know convex works with any react framework. Though it seems like it overlaps with some nextjs functionality and maybe I would be better off using vite + tanstack pieces, etc. I’m building a single page app and don’t need SSR but it seems like nextjs is still popular for most use cases. This is a real b2b SaaS app I’m building so I want a solid framework foundation for a bigger/complex product....

Recommended pattern for initializing useQuery with server loaded value

Hey folks, Is there a recommended NextJS-compatible pattern for initializing a useQuery hook with a result from the server so that initial page load is very snappy but subsequent changes are fully reactive? (I realize this involves double fetching) e.g....

Convex auth

Hey guys, I wanted to switch to convex auth and I have a type issue for the OPT: Object literal may only specify known properties, and 'id' does not exist in type 'EmailUserConfig<GenericDataModel> & Pick<EmailConfig<GenericDataModel>, "sendVerificationRequest">' from the file ResendOTP.ts:...

deploy turbo project - nextjs, react native, convex on vercel

how to deploy this repo to vercel ? https://github.com/get-convex/turbo-expo-nextjs-clerk-convex-monorepo eg. how to structure builld command ? currently I have this in turbo.json...

Clerk With Convex in Backend Functions

I want to store a score variable in the public metadata but I can't figure out how to modify that from the backend and I get an error? Error: ``` Uncaught Error...

Using HTTP "Host" header to help validate requests

I'm building some HTTP endpoints for internal use and want to validate requests through them using a token. However, I want to use a different token for prod and dev Convex environments. In looking for a way to identify programmatically which environment is running the function, I noticed that the request's "Host" header matches the root HTTP endpoint URL; e.g. "perfect-ant-202.convex.site". Is it safe to compare against that to determine if the dev or prod URL was called? Is there a chance that...

Don't see db results after mutation, but only after the action is done running.

I'm updating file a couple rows at a time. But even though I see a console log before mutation (which changes data) for every batch, i see results on frontend only after all batches and so the action has finished running.

BUG: Convex Auth Instagram Login - pkce cookie is missing

I'm getting this msg after trying to authorize the callback webhook on https://developers.facebook.com/ I have set the instagram app and env (on convex) as said in the convex auth (and auth.js) docs. here is the error:...
No description

Help Needed: EAS Build Failing for iOS in Monorepo Setup (Module Resolution Issue)

Hi everyone, I’m running into an issue with my Expo project during an iOS build using EAS, and I’m hoping someone can help me figure out what’s going wrong. The Issue:...

What is the best approach for handling members?

In my application ill have teams and each team will have multiple projects, chats, etc... ANd I want to handle members. For the teams I have a team table and a teamMembers table (where I track members and roles). What about the projects and chats inside the team (ill have public ones -> Everyone is member, and then private ones -> the admin assigns who is a member there), so I don't know if I should store this chat/project members as an array of ids inside the project/chat table or also have sep...

Vector search with images using Convex

Hi, everyone. I'm considering using Convex for a react app where the input is an image(of a product) provided by the user, and the output should be the info of the product in the image. This would be a basic customer support app where the user take a picture of the product he has problems with and the app recognizes the product using the image and provides info(FAQs or related). The idea would be to vectorize all the product images, save them in a vector DB, and use it for a vector search. I have found examples using Supabase as the DB. How suitable would be Convex for this project? Do you have any sample project/repository I could use as a reference? Thx for your help....

Schema with array of objects

Is it efficient to have an array of objects? Let's say that I have a task with the field sub tasks, and I want those to be objects with x,y,z fields and each task can handle multiple sub taks.

Best Practices? SvelteKit5, Kinde, Server To Server Auth, Python as backend resource

Hi all, I am hoping you can give me a few pointers! First, I am using sveltekit5 and the Convex sveltekit libraries - I believe I have that working ok - has anyone else used this for a production project considering Sveltkit5 is in early release? Does Convex work on SvelteKit4? Second, I am using Kinde for authentication. I have that working perfectly for my sveltekit project, but the callbacks are against local api routes within the project. How do I pass this back to Convex so Convex recognizes the authentication? I've started doing some goofy things that just feel wrong such as passing the token in the request body to Convex in order to see who the user is. ...

invalid args for renaming a file

when calling a function to rename a file, it says that the arguments are invalid, although I specified everything that is needed ```tsx await renameFile({ fileId: file.fileId,...
No description

Struggling using convex mutations

Hey guys, I just switched from mongoDB to convex. I created some functions on my nextJS app, and connected it to my current front-end: - one dev dashboard to insert mocked data to try my app - one admin dashboard for the clients to insert/read data...

Using Convex Triggers Across Multiple Frameworks: Jetpack Compose, SwiftUI, and Next.js

I'm working on a multi-framework project using Jetpack Compose (Kotlin) and SwiftUI (Swift) for the native apps, and Next.js (React) for the admin dashboard. I want to implement a Convex trigger that logs every insert on the user table to an activity tracker table. Since each framework has its own "convex" folder at the root, do I need to set up the trigger in all three folders, or can I define it once for the entire project? How should I structure the Convex backend for such use cases? Here are convex sample project repos for reference:...

convex auth.getUserIdentity() is inconsistent

In my nextjs app, I have upgraded convex-dev/auth to the latest version 0.0.71. I went through the documentation and correctly setup authentication including properly setting up the middleware. (also I use email provider with resend). Now in my app, after login, I navigate to route /partners. This route accesses the session user (in the backend) by calling contex.auth.getUserIdentity(). This first call works fine as it returns the logged in user object. But when I navigate to the subroute /partners/[id] and makes the same call, this time it returns an empty. If I go back to the previous screen and refresh the page, I'm able to get the user object just fine....

Problem with internalAction

I'm calling this like this: const updatedRows: string[][] = await ctx.scheduler.runAfter( 0, internal.files.handleBatchEnhance, {...

Nextjs server actions does not work with revalidatePath

Hi there! I'm struggling with basic data refreshing on a simple next14 app directory page.tsx. Basically this is all code taken from https://docs.convex.dev/client/react/nextjs/server-rendering#server-actions-and-route-handlers. /src/app/testpage ```...