erquhart
erquhartβ€’3mo ago

Next.js SaaS Starter - Convex V1

21 Replies
sam
samβ€’3mo ago
erquhart, may need to request sidebar with you. The velocity to which you and the crew ship greatness makes old-timers like me seem obsolete. Sets a bad precedent. Clearly you’re not familiar with the milky waterfall ways. I’ve been a lurker here since forever, as far as I’m concerned you’re the Oden of the Convex community. Thanks for all you do and of course to your collaborators too! πŸ”₯πŸ™πŸ½πŸ‘πŸ½πŸ«ΆπŸ½πŸ†
erquhart
erquhartOPβ€’3mo ago
I'm actually just a community member ("champion") myself! Appreciate the love though ❀️ Definitely done my time in the world of waterfalls, nothing like corporate dev work πŸ˜‚
makrdev
makrdevβ€’3mo ago
Thanks for the video! I have a similar setup but couldn't deploy to Vercel so far. How to deploy Convex when it's living in packages/backend ? What did you put into build command?
Clayton
Claytonβ€’3mo ago
Amazing starter, but why polar over stripe directly?
erquhart
erquhartOPβ€’3mo ago
Build command is in vercel.json, we actually cd out of the app directory (for both web and app sites) and into the backend package. Main reason is Midday's v1 already selected Polar as an integration, except they had it as coming soon. I also liked the idea of a developer focused api (compared to paddle/lemonsqueezy/etc) that is simpler and more focused than stripe's for saas subscriptions specifically. I did learn in the process of integrating that Polar is missing a couple of things for basic saas that it needs to be on par with Stripe (which is what Polar uses under the hood anyway), but they'll be bridging that gap really soon.
Gustav
Gustavβ€’3mo ago
I love this, perfect for getting up and running quickly. Also, great job on the video @erquhart , really well done πŸ‘
erquhart
erquhartOPβ€’3mo ago
Thank you!
ampp
amppβ€’3mo ago
Nice, thanks for helping out the community showing some different services. Why didn't i know about biome sooner πŸ˜… . I'm curious with midday how you have structured your mono-repo. Do you have a packages/shared folder or something like that? We are sharing common react components among multiple apps, including types and constants that are used by convex. I have looked for anyone doing this and have found zero.
Everything in packages/shared has to use GenericId, and generated API otherwise it causes apps/web(which is using packages/shared) to build the /packages/convex.. but like v1 using the _generated/api or Id works just fine accessing packages/convex directly from the apps/web.
erquhart
erquhartOPβ€’3mo ago
Convex is in packages/backend, type imports seem to work fine as you said. There are shadcn components that I think are shared between both apps from packages/ui. Didn't run into the issue you mentioned around both app directories building convex.
ampp
amppβ€’3mo ago
Yeah just those ui components don't also use the convex types/api, maybe i could just add some imports from the ui to convex and see if it gets angry in v1. unfortunately i cant seem to do automated or manual install on native ubuntu 24. not sure whats up with that.
erquhart
erquhartOPβ€’3mo ago
Ah you're trying to access convex types from another shared package, I see Yeah have not played with that
ampp
amppβ€’2mo ago
And another pattern i haven't seen is having classes in a shared file that help serialize and deserialize payloads between front end and back end. Then get imported to and extended within the convex folder with context for db writes. It seems like its ok if its done with caution... Its definitely really easy to get the apps folder to build the convex folder if you just put the whole class within convex Is there any desire out there to do a full convex release of midday?
erquhart
erquhartOPβ€’2mo ago
There's definitely more that can be done, but there hasn't been a lot of feedback that folks are having issues with what's there or needing more. Is the shared packages issue still top of list for you?
ampp
amppβ€’2mo ago
When i had looked at it before i didn't realize that the main midday was also open source (not sure how i missed that) i assumed that the whole project was written in convex and just reduced to v1. Yeah shared stuff is still annoying but vercel is handling it fine so i cant worry too much. We want to plugin something like midday to our system and allow people to enable that module/feature set. I'm also confirming just how unique or backend design is and even just structuring. I've been hoping to find something that uses the principles of Ai-town built into the a SaaS service to compare with πŸ™‚
erquhart
erquhartOPβ€’2mo ago
So, Midday is a business time tracking and invoicing solution, and the team behind midday made the v1 template for general saas use. When you say "we want to plugin something like midday to our system", are you referring to their product or the v1 template?
ampp
amppβ€’2mo ago
Their product
erquhart
erquhartOPβ€’2mo ago
Pretty sure you mean v1, just confirming aaahhh
ampp
amppβ€’2mo ago
It's just not convexified
erquhart
erquhartOPβ€’2mo ago
I thought we were talking template here. I don't know much about Midday's product or how it might integrate, but that sounds cool
ampp
amppβ€’2mo ago
Yeah well once you play with convex its hard to go back to anything else, so figured there might be a chance their product coverts to 100% convex πŸ˜…
erquhart
erquhartOPβ€’2mo ago
Agree! If you're talking integrating, though, it may be possible today depending on whether they have apis available. I know they're in beta so maybe not yet.

Did you find this page helpful?