from Hacker News

Ask HN: How Do I Plan My Application's Architecture?

by OulaX on 2/6/23, 7:37 PM with 1 comments

As a sideproject I have an idea to build an app, that'll eventually have frontends on multiple platforms, smart tvs, phones, tablets and web.

I have never built an app from scratch before, so the I am afraid of the journey, I also want to plan things properly so I can sleep well at night, not thinking about crashes that might happen.

How do I decide which stack to use? Should I start with the DB schema? Do I even need to use SQL? Should I go with NoSQL? Firebase or Supabase? Why? GraphQL or REST? Why?

I am aware that these are decisions are hard to make without knowing anything about the project or the actual data, but I just want to get a general idea of how the process is laid out!

Thanks.

  • by lgl on 2/7/23, 3:10 PM

    As you've stated, it's hard without knowing for sure what you're wanting to build. That being said, keeping it simple is my recommendation.

    If you already know SQL and need a database of some sort, use it as it's absolutely rock solid tech and used pretty much universally.

    Firebase or Supabase I can't really recommend as all my stuff is always just hosted on a VPS or dedicated server. I personally still haven't needed "the cloud" for basically anything, and I'd only consider it if I had some project with a truly massive amount of traffic or that absolutely needed the auto-grow features that one can setup on most cloud provides. So, if in doubt, start with a regular server and then think about growing it out into the cloud or to better servers. Do not waste too much time going into premature optimization!

    GraphQL or ReST? If you really need an API for your app, I'd go with ReST. It's simpler, has better documentation/support and much more people use and know it than GraphQL. Once you have a working ReST API you can eventually also build a GraphQL one if needed.

    Don't get too stressed about or lose too much time with the tech or stack. Focus on building the "product" with the technologies that you know best, even if they're not "fashionable" or "used at FAANG" etc.

    99% of the product's users will not care about the underlying technology and will only demand that the product's functionality itself works correctly and solves their problem.

    Just my $0.02. Hope it helps, cheers!