Are there example repos using Convex Ents?
Are there open source or example repos using Convex Ents?
I didn't get any search results from the GitHub search bar in the get-convex org.
https://github.com/search?q=org%3Aget-convex%20defineEntSchema&type=code
GitHub
Build software better, together
GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.
14 Replies
Ah, I just found an example in the saas-starter.
https://github.com/xixixao/saas-starter/blob/main/convex/schema.ts
GitHub
saas-starter/convex/schema.ts at main · xixixao/saas-starter
Convex, Clerk, Next.js, Convex Ents. Contribute to xixixao/saas-starter development by creating an account on GitHub.
Convex Ents - Convex Ents
Relations, default values, unique fields and more for Convex
I've been tempted to convert a couple of the normal convex templates to ents. Some day in the distant future we will open source, already past 20k ts lines in our convex folder.
Ampp - launch already, we want to see it 🙂
@Michal Srb - I tried to migrate to Ents today. I think I correctly changed my schema.ts, and it’s easier to comprehend now with the edge relationships so prominent
I do think the partial transition is difficult enough for me to not try. I couldn’t really understand how to use Pick. A dedicated section in the docs for it would help. At this point, I think I need to do a full migration
@Michal Srb ive been using convex ents, the ux is much better than the base code and i wonder why is it not the definitive way to build with convex
Yeah, I've thought this many times.
Yeah when I did it i just did the whole project, it took too much effort to exclude tables and such.
The level of abstraction of ents and helpers has fewer requirements than the core product does. Can make more opinionated solutions that not every customer would want
If i understood contexts/functions.ts file better it may of been easier to configure for db and table setups.
At what point in your project did you make the migration to Ents?
So now i have SessionAction, Query, Mutation and SessionInternal variations that works with automatic session ids from wrapped nextjs functions that adds ents with context, so every subfunction has access to sessionId, it might be overkill. but then i setup another set for no context situations
oh like a week 3 or so, jumped all in
Do you use it for any social graph use case? Like my friend-of-a-friend analysis?
I want to explore this use case with Ents
Almost, right now the goal is that the all Session functions monitor actions/mutations and rates limit every user and org, and track every action. But i need to track database bandwidth /read and writes for all users as well as eventually vector usage etc.
ideally im tracking all queries too
our structure is closer to RTS so the goal for some users would be to do the least actions for the most social reward
and more interested in who should be your friend rather than who is possibly your friend
I’m assuming RTS is real time strategy - I’ll try your game!
@Matt Luo feel free to suggest changes to the docs, they're in the Ents repo. The dedicated page to partial adoption is: https://labs.convex.dev/convex-ents/setup/existing
Setup Ents in an existing Convex project - Convex Ents
Relations, default values, unique fields and more for Convex