If you were to build a new web app product with a fairly complex database schema and functionality, what tech stack would you use as a starter? Obviously things depend a bit on the use case, but let's assume it's a web application that doesn't need high concurrency.
More like building a PoC of a web app start-up that can scale for a few years.
Most known and good frameworks can do what you want. If the product becomes succesfull, scaling up your team with good engineers is harder than scaling the product.
As long as you can do raw queries on your complex database, I do not see how a backend framework you don’t know yet will help you. You will sell the product, not the framework it is running on. If your current stack is still widely used in the industry, focus on the product, not on new tech
Small addition: if it is for hobby or learning: pick one new framework and keep the rest of the stack.
Host on Heroku.
The boilerplate features are covered. Productive developer patterns are already in place. Great test coverage.
You can jump right in to building out the business logic.
Unless you have specific requirements where that stack isn't a good fit, or other reasons not to choose it like it's too niche to hire people for.
Or if you're doing this for fun, use the most exciting one that still looks like it's at least somewhat stable and won't cause you too much trouble.
"How rich is your frontend?" (and how rich will it need to get in the next few years)?
If the answer is "rich enough" - ie you want a fair deal of dynamic content and a web-app feel, I'd do:
- ReactJS via create-react-app with typescript and ReactQuery for talking to the API
- Rails in api mode serving a rest api
- Postgres for the db and Redis for caching/job storage.
- Heroku
If the answer is "not that rich," save yourself some complexity:
- Normal Rails with server-rendered pages
- Postgres/redis
- Heroku
Note: swap out Rails with whatever similar thing is in a language you know: Django, Phoenix, Laravel, etc.
Now, all that said, I strongly suspect the dominant answer to this question is shifting. There seems to be a new wave of JS-based tools like Next.JS and RedwoodJS that seem batteries-included-enough to replace Rails as the getting-off-the-ground-quickly framework of choice. We'll see, though- it's still early.
It's "boring" but C# is an extremely developer-friendly language these days, and it's hard to beat the availability of documentation, examples, and libraries.
EDIT: and on the front-end, the MVC templates that Microsoft provides start with Bootstrap. I've found Bootstrap and some native Javascript provides more than enough flexibility for quite a while. Bootstrap is great for an MVP, and has a lot of flexibility to make it look good!
Unless a static site or buy option fits right, otherwise it doesn't get any better than a Liveview based app for continued productivity.
I know it so I can develop relatively quickly with it plus it has so much built in already.
It's also a mature framework so chances of running into bugs for normal tasks is lower than newer/cutting edge and if I do need help there are high chances that someone else has already dealt with it.
Deployment and scaling can also be taken care of by something like Heroku which already supports Django so I can best use my time focusing on the development of valuable business logic rather than reinventing the wheel and maintenance.
It's a poc, the only thing that matters is getting it out the door. In fact code might not even be necessary for a poc.
If this were me, I would dig up my last abandoned monolith with all the boring details like routing, migrations, seeding, auth all figured out, rip out the old code and start from there.
Some Go/Deno microservices deployed via GCP Cloud Run where needed.
On NextJS side, use React Query (https://react-query.tanstack.com) to call GraphQL & cache where needed. For CSS, use Tailwind & some nice primitive components from Radix UI (https://www.radix-ui.com/docs/primitives/overview/introducti...). Deployed on Vercel.
Tech choices are mostly motivated by how good tooling for it is in VSCode.
I'd maybe switch React Query with Relay (https://relay.dev) but Relay seems more complex.
- Backend: Express + Sequelize + Postgres
- Frontend: Svelte + TailwindCSS + Webpack
Do I need to iterate very quickly on the database schema? Use a document DB like MongoDB (JSONB on PG is great but has caveats such as atomicity)
Do I need to handle a high volume of background jobs? throw Redis into the mix.
Do I want HA? Make the app stateless (JWTs help in this case but come with their own caveats), duplicate the server 2 more times and put a cloud load balancer in front of all 3 servers.
Do I need to serve low bandwidth or low power devices? I go vanilla JS and limit how much interactions does the page have, or move to server-side rendering only altogether.
And the list goes on. But with no specific constraint, my personal preference goes to that initial stack (and I’m very productive in it).
Personally, I'd go with Django and React with PostgreSQL and probably Bootstrap, because that's what I know. I would be running on my domain on day 1.
What frameworks would have you and your team up and running on day 1? Pick those.
- Node with no fancy stuff like TypeScript, just JavaScript, jest for tests, React on frontend, require 100% test coverage (or less test coverage but use TypeScript).
- Java with Sptrig Boot and their reactive web framework and React on frontend.
Reasons:
- Either of those provides _fast_ feedback loop. Node.js is even faster.
- Either of those have got _huge_ ecosystem and a library for anything.
- Either of those is supported by major cloud vendors and first-class citizens.
- The amount of googleable information on the web if you need some docs or help is enormous.
- The amount of devs to hire is huge.
- IDE support for both is excellent.
- There are official base docker images for either, there are version management tools for either that are very easy to use (mvnvm, sdkman, nvm).
- If your webapp grows you have _a lot_ of scaling opportunities.
KISS database side and use Postgres. Try to make someone else to manage it for you, something like Aurora from AWS or whatever there’s out there. If you _really_ sure that your database model is solid and won’t change and/or you’ve got lots of money to through at problems you may want to consider something managed NoSQL like DynamoDB or what was that, Cosmos from MS?
Host on something like Heroku but be aware that they lack a lot of Enterprise required compliances, we recently moved away from it because of that (we have to be compliant).
Python + FastAPI + SQLAlchemy + Postgres. With React on the FE. Maybe try a CSS framework that plays nice.
However, I am a Python developer with some JS experience. If I was, say, a Java developer by day I'd probably pick Java and a corresponding framework.
Go to war with the army (of knowledge) you have.
I'm currently working on better integration with reactjs, something like this: https://www.viget.com/articles/phoenix-and-react-a-killer-co...
Then I will use react too.
I used to think about the best stack and how easy it is to maintain in the future, but never managed to finish any side projects.
For my last project Flashdictation.com I used such an unconventional stack for me: Next.js and Supabase. It just solves my problem. Exposing the database would have been such an huge mental blocker, but with the proper safety it just works.
Sidenote: I am just trying out the above stack, just pick one with which you are comfortable and think about what you want to solve.
You already know about React so just go for it.
DB - You won't go wrong with either MySQL or Postgres or you could save some setup time and go with one of the PaaS offerings from Google or AWS.
Frontend: Vue.js + Vuetify, you get a simple frontend framework that gets you started in a couple of minutes, and more than enough UI components that you'd need for a POC
I'd start with Phoenix + Postgres, it'll handle stuff from beginning to very end. When i started with rails, time from project start to first optimization/adding caching milestone was really short. With phoenix it took maybe years because naive code still working fine and there are no need to tune/add caching/optimize things
Keep frontend as boring and plain as possible, then either something like Vue.js or LiveView - highly depends on use case
pick one: htmx, unpoly, Hotwire
pick one: vanillajs, alpine, hyperscript
pick a css framework you like
and then use whatever backend you prefer
Definitely not a bare bones one (express, flask, Sinatra, etc...) And absolutely NOT an SPA.
Deploy on heroku until it gets expensive (like, an ops salary expensive) then move to AppEngine.
A good static-generation/CDN hosting story would be essential for any choice I made.
Also Firebase tools: Firestore, Firebase Functions & Firebase Auth.
Vanilla JS is extremely underrated.
If you ask me to build a web app, I'll role with Flutter Web and Firebase for hosting / auth/ data storage.
But your sorta limited with that. Vue is cool too
* sqlc to connect to PostgreSQL Aurora.
* zerolog for logging.
* chi for router.
* jQuery for JS interactivity.
Those are where my strength lies. I can add or reduce components at a lightning speed using Go.
A bit? It's one giant "it depends" as far as I'm concerned.
backend: python flask, sqlalchemy
frontend: react, bootstrap
- Vite
- PostgreSQL
- AWS CDK