Next.js SaaS Starter - Convex V1
Template link: https://www.convex.dev/templates/v1-run
YouTube: https://www.youtube.com/watch?v=YIo2egdKKOA
Stack Post with YouTube Video embedded: https://stack.convex.dev/open-source-starter-kit-convex-v1-based-on-midday
21 Replies
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! π₯ππ½ππ½π«Άπ½π
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 π
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?
Amazing starter, but why polar over stripe directly?
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.
I love this, perfect for getting up and running quickly. Also, great job on the video @erquhart , really well done π
Thank you!
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.
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.
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.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.
Ah you're trying to access convex types from another shared package, I see
Yeah have not played with that
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?
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?
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 π
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?
Their product
Pretty sure you mean v1, just confirming
aaahhh
It's just not convexified
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
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 π
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.