
New Open-source Starter Kit: Convex v1 based on Midday.
all right folks we are going to check out a new starter today everybody's got there's just all these starters starters everywhere so we're going to look at a quick way to get a SAS app software as a service up and running with authentication subscriptions language support bunch of other stuff curtain rods fish maybe that's not funny we'll see a starter helps you get an idea off the ground quickly has a bunch of decisions that it comes with already made so you can just focus on your idea a good starter can go all the way to production we're going to look at first middays V1 the V1 template from midday provides server actions from verel database and authentication with superbase long running background functions with trigger dodev and file storage and upload with up stash if I copy this command and run it in my terminal it'll clone the repo and I can get started setting up services and getting things deployed so the V1 St midday is already pretty great they've picked out some top tier services that handle the more complex parts of application development so you don't have to saving you time Googling things looking on Reddit stack Overflow calling your mom yes I know I can do whatever I'm trying to do on a $5 BPS can you just answer the question but what if we could replace three or four of those services with one service what if we had one back in service that handled all the backend things we can and that service is called convex so we made convex VX V1 convex V1 gives you server actions with convex it's actually better than server actions because you don't have to use forms it's just typescript that runs securely on the server you get database and authentication from convex not just any database a database that makes it really easy to keep everything in sync you get long running background functions from convex if you need them you usually don't but you can and you get file storage and upload with convex there's also a CLI for setting up the convex V1 starter it walks through environment variables setting up services let's walk through it now so here we're looking at the landing page for convex b1. run I'm going to copy this command now note as of the moment we have this under my own personal account so this is going to look different probably when you follow this video just FYI and we're going to hop over here and paste and then we're going to go ahead and create a new project my V1 project sounds like a great name for a realistic thing that someone would do we're going to go ahead and create a new project um my V1 sounds like a good name all right so it's setting up the convex project here we're going to set up convex off so it's giving us the default site URL there which is correct for local here it's giving you the correct URL for your Dev convex deployment so we'll just hit enter there so here for Google authentication it's explaining what's happening it's giving you a link to a guide then also here's a little call out which says use this as your authorized redirect URI so um we'll need that um but for now let's go ahead and click the link that it says to uh follow for the guide so this is Google's guide for setting up 2.0 step one is to hit the Google platform Cloud console the Google Cloud platform console one two um we're going to go ahead and create a new project we'll call it uh convex V1 don't need an organization b boom so we're going to go to apis and services right here it says credentials on the credentials screen we're going to hit create credentials allaf client ID first thing if you haven't done this before you're going to if you're in a project that you haven't set up Google Olo for you're going to have to configure the consent screen so we're going to say external so that people can use it outside of our or that's the more complicated setup so we'll walk through that um app's name is convex V1 user support email you can just hit me directly if you have a problem with this application that millions of people are going to use no app logo no app domain we can skip all that because this is all for testing purposes we're not going to worry about this part developer cont contact information same thing save and continue don't need Scopes uh do we need scopes so we'll just ask for publicly available info so we can get the Avatar and that sort of thing update we're going to hit save and continue uh we don't need to add any test users good to go now let's go back to credentials here let's try to create credentials again allo client ID we're going to say it's a web application web client one sounds great um and then we can leave off authorized JavaScript Origins for now because Local Host just works when you deploy your app and have it at a real publicly accessible domain you're going to want to hit add URI and add that domain but we don't need that for now authorize redirect uis this is the URI that after someone logs in with Google Google's going to redirect back to this URI and it'll only do that if the URI you Prov provide is listed here so we're going to go back here we're going to copy that URL paste it and hit add URI actually we don't have to hit add URI we're going to hit create it says it takes five minutes I've never seen it take more than 5 seconds but your mileage may vary and here don't hit okay you can get back to it anyway so I'll just hit okay just for those that accidentally do that so you have a client ID here um hit web client one there's the goods client ID we're going to go ahead and copy and here it says enter the off Google ID and then it's asking for the O Google secret copy that paste it in so it set both of those on your Dev deployment um and now Google off is all set the next thing that we needed to set up Polar Polar handles subscription billing um we have a URL here we're going to set up a project in the sandbox and we're going to continue with GitHub authorized we're going to give an or organization name B1 test already exists this already exist exist no let's see so the steps here say uh set up a Creator account find your organization ID in the polar dashboard sidebar under organization settings here's our organization ID I'm going to copy that paste and enter create a web hook in the polar dashboard under settings web hooks we have some information about how we want it to be um let's see settings web hooks right settings web hooks it's over here um add inpoint this is the endpoint that we want to add that goes here payload format is going to be raw we're just going to generate a secret copy it and we're also going to set up sub subcription created and subscription updated um as events hit create and then we're going to go ahead and paste that secret here as well we're going to need that in our convex deployment and then generate a personal access token in the polar dashboard under account developer settings we have required permissions mentioned there as well that's where we go up here and go to account and and developer settings personal access tokens we're going to select uh products read and write um and we need to be able to is it read yeah it's read subscriptions right yeah and we'll set this okay we all know we're going to hit that button let's not pretend that we're actually rotating things here all right copy so we're going to copy our personal access token all right the rest of these are not required to actually get this running um but the instructions are there so feel free to to run through and set them up but for our purposes here um we want to get to we want to get to up and running so right now it's creating placeholder products in polar and it's seeding the database with polar data so it gives me a few instructions to run here um we're going to CD into that we're going to bun dev then as it says we're going to hit Local Host 3001 so you'll see there's a few different things running here 3001 here is the website 3000 is the web app they're two separate applications um so we're going to go ahead and hit the website [Music] if you hit sign in or get started either of those it'll go to the app which is taking a second on local we have our sign in with Google [Music] button with polar you have to actually the user has to set up a free subscription so they're going to get hit with this right away um it just requires email it's a free subscription you hit subscribe and that should drop us back here going to give my username hit continue and we're in so this is all running now locally it's using uh polar for subscriptions here um I can upgrade to Pro if I [Music] want and this is in test mode now we're using the polar sandbox makes everything test mode so you can see this is legitimately fully Interactive working this link goes to their polar dashboard um so this is like where you put the app here right you still have an app to make but it provides a lot of the things that you're going to end up setting up yourself so I can update my avatar stop at Jordan meme I recently had to send someone so we'll make that our Avatar there's a lot more to explore in this starter but all of that is beyond the scope of this video my name is Sean Ard I'm a member of the convex Community I hope the starter is helpful for you can't wait to see what y'all build
tl;dr Check it out here: https://convex-v1.run
Midday recently released an excellent SaaS starter called v1, based on their own production setup. It includes configuration and boilerplate for everything from monorepo management with Turborepo to subscription transactional emails with Resend. And of course what better way to simplify things than to bring in Convex? Convex v1 is our own fork (with Midday’s blessing!) with a few additions:
- Replaces Supabase, Upstash, and Trigger.dev with Convex.
- Provides a sample application that provides working implementations of CRUD, theming, file uploads, langue support and more.
- Implements a Polar.sh integration for subscription billing.
- Provides a CLI to guide you through the setup process, including setting up services and environment variables.
Try the working app or generate your own at convex-v1.run, and the repo at github.com/get-convex/v1..
Convex is the backend platform with everything you need to build your full-stack AI project. Cloud functions, a database, file storage, scheduling, workflow, vector search, and realtime updates fit together seamlessly.