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

Using Sentry integration with Datadog

I would love to use the sentry integration with Datadog (I understand that there is a Datadog log integration, but I think setting up Error tracking is actually easier using the Sentry SDK. I'm not an expert, so I don't know whether this would actually make sense in productionTM. Anyway...) Datadog supports the Sentry SDK, but you need to provide a service name, like this: ```Sentry.init({ dsn: "<DSN>", initialScope: { tags: {...

Table Aggregrate Component Question

``` likes: defineTable({ userId: v.id('users'), parentId: v.union( v.id('posts'),...

having problem authenticating when running the project in github codespaces

I am using convexAuth when i am running the project in github codespaces and try to auhtenticate or create a account in my project i am seeing this error sign-up-card.tsx:47 POST https://musical-doodle-g455gvjr7wv73994v-3000.app.github.dev/api/auth 403 (Forbidden) sign-up-card.tsx:50 SyntaxError: Unexpected token 'I', "Invalid origin" is not valid JSON...

Env variables being pushed automatically

Is something like this possible: when running npx convex dev , variables in the following files inside the convex folder get pushed to the following deployments: env.local -> development env.staging -> preview...

multiple convex deployments (nextjs and expo) - do they overwrite?

Hey just a quick question, if running npx convex deploy from one repo (nextjs) which doesnt have all the schema and function files from the other repo (expo), doest this overwrite them in the convex dashboard or potentially delete them? Just being safe.

Convex Auth session keeps dying

Hi, My app session keeps dying out of nowhere. It happens ~daily (interestingly, usually happens at the same time as on the Convex Dashboard). Most of the times I open the browser (Arc) and both my app and Convex Dashboard are logged out, so I re-sign-in on both. Sometimes it happens while I'm using it (did just now)....
No description

Convex Self-host

I built an MVP for the company I work for on convex. I plan on using it in the actual product but we have to self-host in our own servers to be compliant with company policy. If i deploy convex in my company's servers myself, do i get a dashboard similar to the one in convex.dev?

Error after updateing auth running npx convex dev

get this error trying to deploy dev changes ```✘ [ERROR] No matching export in "../../node_modules/@auth/core/index.js" for import "customFetch" node_modules/@convex-dev/auth/dist/server/oauth/lib/utils/customFetch.js:3:9:...

Lets say there are a lot of apps...

Lets assume that there are 5 apps with their individual databases on Convex. Now lets say later in the future I realize that I want to suggested recommendations on one app based on the data in other apps - would that be possible with convex? (5 apps would have 5 databases as I think it would be scalable for each of those individual services/apps). Also is it possible to share auth data amongst all 5 apps?

Keeping the user logged in forever.

I am developing a mobile application using Convex for authentication management. The app is built using two approaches: a Capacitor Next.js app and a React Native app (for testing both frameworks). How can I maintain the user authentication session across both platforms so that users only need to log in once? Could you provide guidance on implementing a persistent auth session in this setup?...

Can I setup an index with array list field

In my users table, I'm adding a new key roles which is an array. Is it possible to declare an index based on that field? If yes, how could I run a query using the .withIndex api where the values of the field are in a list? If this is not possible, is there a pattern or workaround I could choose to "limit" queries upon the (very large) users table, based on roles?

Circular dependencies in validators

I'm defining my tables using Table from convex helpers, and I want to define some enriched versions of these documents using a Convex validator in the same schema.ts file such that I can pass it around to other validators and Convex functions. I'm running into circular dependency issues, however. See the attached screenshot for the specific example. I can seemingly fix this by putting enrichment validators into a enrich.ts file in each table folder, but is this really the only way? I would love to have both table validator and enriched validators and types in the same schema.ts file....
No description

while using pagination, I'm failing to sort the elements in the right order of creation

while using the pagination function with a bunch of messgaes, I'm giving them order("desc") so we can get the last numItems that have been added to the array, when I do so, after the second load, the element are re-ordered bottom up, how can I fix this in the best way possible with convex? I tried sorting with .sort((a,b)=>a._creationTime -b.creationTime) but that resorts them on the second load,...

How to reduce bandwidth reads?

Bandwidth reads are out of place for the size of the project, how can I identify what is the cause?
No description

convex auth session across subdomains

Is there a way to make a convex auth session valid across subdomains of a same domain like it is for clerk by default?

Can't access Convex cloud hosted server

Can't open the Convex dashboard for all of my projects, and verify our client isn't able to access too: WebSocket connection to 'wss://shiny-dolphin-222.convex.cloud/api/1.18.2/sync' failed: It happened a couple days ago too, but I think after a few hours it fixed on its own. Do you what is the cause, and how to prevent it?...
No description

Passing down additional params during user signup using OAuth provider

Is there a way to pass down additional params to be written using await signIn("google")? I'm aware of the afterUserCreatedOrUpdated method but that callback won't receive the params passed from signIn. Additionally, is there a way of removing phone, phoneVerificationTime, isAnonymous, and image fields? These fields aren't relevant to my application.

discussing the best approach to add notifications on tables in a chat app.

So I have a channel with messages and users that I would like to implement notifications on, what I did so far is create a last read messages table to estimate the last message the viewer saw, from that point, what would make more sense to create notifications on the web, to run a table trigger and create a condition that when user x is sending messages and user y is receiving them, and in this case user y is not viewing the channel, we push a notification then? and when user y is viewing we turn that condition off so no notifications are being sent? does anyone have a better way to implement this?...