How to run multiple local-only apps that use Convex
I'm finally getting my feet wet with Convex, and so far I'm really loving it. Aside from future plans for work-related projects, I would also love to migrate a bunch of personal databases from Airtable and create custom apps for them (probably in Remix, which I'm also learning at the same time). However, these would purely be for my own personal use; i.e. no public hosting. Each app would likely have its own Convex project, but I'd like some of them to be able to talk to each other; e.g. on the splash page for my planning app I'd like to pull a random quote from my quotes database.
The thing I'm struggling to figure out is how to best run all of this stuff locally, partly when it comes to launching each app, but also with the aforementioned interactivity in mind. The only idea that's come to mind so far is to possibly use Docker (another tool I'm just getting started with), but even after building a separate image for each app, that would still involve (I think) a bunch of terminal-based steps to get each container running before launching any of the apps. Or maybe there's some aspect of using Docker that I haven't discovered yet that would make this easier?
At any rate, whether or not you've gone this route yourself, I'd be grateful for any input on how I might pull this off.
11 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Or would it be better to put everything into one Convex project, and make a single app that covers everything? Even there, though, how to launch that in a more efficient way is still a question.
Hey @Clever Tagline just throwing in my 2 cents here.
Are you planning on using Remix as Server Side rendering or more for the SPA? I use Remix, and i Love Love it. But for my convex project I decided not to use remix because the paradigm of Convex's realtime updates and Remix being SSR just didn't mesh well with me.
So, for my convex project, i decided to use Svelte. And man oh man, have i loooveed working in Svelte 5
For me, choosing Remix was more about the nested routing behavior, which I'm already loving even though I've barely started on the project. The only other framework I've spent much time with is Next, and I knew I didn't want to use that again. With Remix I get the benefits of of its nested routing while designing something that has the feel of a SPA.
Does that make sense?
I guess I'm also leaning towards Remix because it's React-based, and I'm familiar with React after having used Next, and also from building custom Airtable extensions for work using React. I don't feel like I have the mental bandwidth at the moment for learning a new system like Svelte. (I tried learning Astro for redesigning my personal website a while ago, and I'm still fighting that at many levels, so that's on the back burner.)
yeah of all the react-based ones out there I like Remix alot. Ive never tried Astro. This is my first time using Svelte and it fits well with Convex, because of how svelte manages state.
But I only entertained the thought of learning Svelte because i knew I didnt want to use a SSR framework with convex since what I love the most about Convex is the realtime capabilities.
To answer your question about the multiple local only apps. I have no idea lol. It should all be doable since convex is accessed via just APIs anyways
Okay, clearly I need to take off whatever blinders I've been wearing.
As I said above, part of my reason for being so local-focused with this plan is because I assumed (incorrectly, as we'll soon see) that hosting a non-static site couldn't be done without incurring a cost. I actually hadn't looked very far to see if anyone broke from that pattern, so it was admittedly a little surprising to discover that Vercel—a service I've heard about for ages but never explored until today; 100% my own fault—might actually be an option for free hosting for these apps. I can add auth (either Convex or Clerk) to restrict access, and this might just work after all.
yeah my tech stack usually consists of
* vercel for hosting
* supabase for db and file storage, but now might be doing more in convex
* clerk for auth
With all of those being able to get by on the free tier
There’s a template for using Convex in a monorepo which is generally better so you always have up to date types. Or a recent article on Stack talks through generating an API for another repo so you get type safety there without having the functions in the same repo. convex.dev/templates
stack.convex.dev
I see your question is mainly around bundling locally. For fetching from another DB you can make a http client and use the generated api types to query. They’d need to be discoverable, eg on known ports
Local bundling was the original goal, but if I can get Vercel's free hosting to work, I can do that and use auth to prevent anyone else from using the apps. That way I can launch each app via a browser bookmark, which is faster than any local-launching option that I can think of.
Bundling in electron seems to work well too. So it can be a desktop app
If the local backend is always running you could have your electron app target localhost, but yeah easiest way would be to use freemium products for now
I must admit, Electron is tempting. I might play with that at some point.