Stream: beginners

Topic: Web App Architecture


view this post on Zulip Luke Boswell (Nov 24 2023 at 22:48):

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.

view this post on Zulip Brendan Hansknecht (Nov 24 2023 at 23:10):

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.

view this post on Zulip Luke Boswell (Nov 24 2023 at 23:13):

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.

view this post on Zulip Brendan Hansknecht (Nov 24 2023 at 23:14):

anyway, that is just an optimization, so you shouldn't need it to get this working.

view this post on Zulip Richard Feldman (Nov 24 2023 at 23:31):

a cool thing about doing server-side rendering is that you already have the tools to do everything in Roc that way :smiley:

view this post on Zulip Richard Feldman (Nov 24 2023 at 23:33):

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

view this post on Zulip Richard Feldman (Nov 24 2023 at 23:33):

this is really exciting! :smiley:


Last updated: Jul 05 2025 at 12:14 UTC