Here's a thought experiment: suppose that you have a fledgling government somewhere that needs to digitize and can start fresh with the modern day technologies, as opposed to having their hands tied with millions of man hours that have been previously spent creating legacy code.

Suppose that they decide that every single governmental system will use the same tech stack:

- front end: Vue and JavaScript, or whatever's popular and easy to use
- back end: Java with Dropwizard, or whatever has decent performance, decent maintainability (static types) and isn't too slow to write code for by the average developer (as opposed to something like Rust or C++)
- database: PostgreSQL, or whatever is suitable for its needs (though open source, so otherwise MariaDB could be considered)
- infrastructure: x86 servers, all running something like Ubuntu LTS or another popular, relatively stable distro
- communication: REST everywhere with OpenAPI, due to their abundance

In addition, perhaps there are some demands for the processes themselves:

- all of the code must be open source
- all of the discussions about the code and requirements must be public (a la GitLab's approach)
- all of the services must follow 12 Factor App principles, have fully automated CI and must run in containers (say, Docker or anything OCI compatible, with a simple orchestrator, like Nomad or K3s)
- all of the non-trivial services (e.g. files, reports etc.) must be separate, so not exactly monoliths, but not necessarily Netflix level of microservices
- all of the services must have at least 75% method code coverage, separation of concerns, all methods longer than X lines must have comments explaining what they're doing and *why*
- all of the services must use dependencies that are not older than X months, checked weekly
- all of the above can be checked by a bunch of shell scripts and the CI pipelines will fail if the goals are not met

So, with all of that present, how could any of that be better than our current approach of outsourcing, developing closed source projects poorly, not knowing who to know accountable and not learning anything from these due to a lack of post mortems? Would a strictly defined and consistent tech stack be a good choice or a bad choice? What about the job market and running a single stack in prod, across numerous systems? What about mandating low level technological decisions, as opposed to trying to sell everyone on some abstract business framework that has nothing to do with the end product?

Short of powers that be wanting to line their pockets, for what other reasons would the above fail? Why wouldn't open source and strict limitations of what can be developed and how it must be developed work?

Context:

In Latvia, we have a system called "E-Health", there have been around 14-15 millions spent on developing it so far, however the project has been widely regarded as a failure: https://www-lsm-lv.translate.goog/raksts/zinas/latvija/par-e...

Now, they're planning on writing a new system instead, however it feels like they'll probably make the same mistakes, due to numerous companies having had their hand in the previous system's development, with no good leadership and bad technical implementation: https://www-lsm-lv.translate.goog/raksts/zinas/zinu-analize/...

Surely there are both social and technical decisions that can be made make projects more successful?