I've got an idea for a basic web app that I would like to write. It's a pretty simple CRUD app that replaces a spreadsheet for running and scoring fantasy hockey with my mates.
I think it would be fun to write it using Roc, it would help test out some things and I might find issues along the way that benefit others.
I would like to crowd source some architecture wisdom if possible. I've got the following idea and just wondering if I'll likely run into any major issues with this design.
Screenshot-2023-11-25-at-09.47.54.png
My goal is to keep it really simple.
It doesn't need to be the most secure app, but I don't want random bots breaking things or turning my server into ransomware.
It doesn't need to serve thousands of requests per second, but it would be nice if it was reliable enough that it isn't a headache to run during the season next year.
I figured I'd just start building things and see how it goes, it may be easier to write a front end using Elm or React, but maybe it's also easy to just SSR everything.
You may want to add some sort of database pool to basic-webserver instead of launching a new connection to the database on every request, but otherwise, seems like this should be doable now.
I'm open to building that if that would make this better, I'm certainly in no hurry to get this done. I'll do some research and see how we might add that.
anyway, that is just an optimization, so you shouldn't need it to get this working.
a cool thing about doing server-side rendering is that you already have the tools to do everything in Roc that way :smiley:
also yeah I have some ideas about how to make connection pooling part of the platform, such that you wouldn't need to change the code anyway (or at most swap out one function for a different one when making the connection) but I wouldn't consider that a blocker
this is really exciting! :smiley:
Last updated: Jul 05 2025 at 12:14 UTC