HACKER Q&A
📣 Cwizard

What would you use to build a mostly CRUD back end today?


What would you use to build a mostly CRUD backend today?

In my experience a lot of the jobs I get are to build backends that are mostly CRUD operations with a few endpoints that present 'aggregated' or filtered views of that data. Most of these apps will also need some mechanism to do background processing.

What is your preferred stack to build such a backend today? What tools and frameworks do you like and what have you changed your mind on and don't like anymore (after using it)?

Does your choice of tools change depending on if it is a commercial venture or a personal project?

Curious to hear what everyone is using these days.


  👤 keyle Accepted Answer ✓
Backend only? I'd go with Go and use Gorm.

Fullstack including frontend, jobs, emails, I'd still pick the PHP+Laravel, with Livewire. It's incredibly powerful.


👤 viraptor
Either ruby/rails for tried and tested, or crystal/amber if you don't need much from the wider rails ecosystem for some typing goodness.

👤 Jugurtha

  - Stack:

    - Application:
      - Flask[0]
      - Flask-Admin[1] (maybe for the initial prototype)
      - SQLAlchemy --> PostgreSQL
      - Gunicorn --> Nginx
      - Celery[2] (long-running background jobs)


    - Monitoring:
      - Sentry[3]
         
    - Analytics:
      - PostHog[4]

    - Packaging:
      - Docker[5] & docker-compose
 
I may use Flask-Admin initially to offload the "CRUD" operations to have an initial prototype fast but then drop it ASAP because I don't want to write a "flask-admin application" to fight against later on. If the application is mainly "CRUD", then Flask-Admin is suitable.

Now...

Would you do a breakdown/list of all the jobs you've done by sector/vertical and by function/role and by application functionality?

- [0]: https://flask.palletsprojects.com

- [1]: https://flask-admin.readthedocs.io/en/latest

- [2]: https://flask.palletsprojects.com/en/2.3.x/patterns/celery

- [3]: https://sentry.io

- [4]: https://posthog.com

- [5]: https://www.docker.com


👤 ale_jacques
I'm mostly doing that.

Django + Unpoly + Postgres

Development as fast as it can be. :D

https://alexandremjacques.com/django-plus-unpoly/


👤 ailef
Java + Spring Boot. Old school server-side rendered templates with Thymeleaf if the site is static, Vuejs frontend instead if something more dynamic is needed.

Alternatively, Flask/Jinja/Vuejs if I'm working in Python.


👤 calferreira
Interesting, no one using .net ? Why ?

👤 Infernosquad
I use mostly Symfony (PHP). Really powerful form component combined with Doctrine ORM makes it super good for fast CRUD development

Also it has ApiPlatform where you can just add new CRUD api using few annotations/attributes


👤 hamdouni
For every type of projects I'm involved, I choose Go as the backend and put maximum of business rules there to help me manage changes. Go standard library is sufficient and robust for many (all) cases I faced : http handlers, templates, concurrency...

If a web frontend is needed, I'll take svelte (not svelte kit) to code independente components that talk to the backend. I'll code there only interface logic (no control, no calculation, etc...)


👤 chimichurri

  - Stack:
    - Application FE:
      - Next JS (Hosted via Vercel)
      - Hasura GraphQL for real-time messaging.
      - Supabase for Auth and hosted Database.

    - Application BE:
      - PostgreSQL via asyncpg (no ORM)
      - Uvicorn - hosted on AWS Lightsail.
      - Redis - as a message queue.
      - Hasura GraphqlQL for real-time messaging.
    
    - Monitoring:
      - Axiom https://axiom.co/vercel as it integrates with Vercel.

    - Packaging:
      - Docker & docker-compose

👤 joisig
Elixir/Phoenix is a great option. Oban for batch processing. Everything runs either in the Elixir VM (BEAM) or on PostgreSQL, no other servers to set up or manage.

Same for personal projects.

Sentry is great for monitoring. Prometheus/Grafana for operational insights. All are easy to integrate with Elixir.


👤 gregors
Elixir/Phoenix/Postgresql

👤 sourcecodeplz
Vanilla PHP with some DB.

👤 seattle_spring
I'm very much loving the next.js / Vercel experience, but I've been using typescript since near when it was released.

👤 floydnoel
Node and Express. It’s the most common for new projects at work, and i’ve been using it for over a decade at this point. It’s just so simple and easy and fast to get going.

👤 taf2
Rails, with resque is pretty great.

👤 anoy8888
Clojurescript

👤 deterministic
I use C++ and Poco. Works great!

👤 moomoo11
Go for backend. Yes it’s a bit more tedious. But in return you get deadass simple builds and pretty amazing performance.

React or svelte for UI. Don’t use next or any of that bloat. Use vite and lazy loading. If you need SSR don’t use SPA tech, maybe sveltekit would be good. I use sveltekit and react mostly.

For anything else like using sdk I use node if it’s not available for Go.


👤 gls2ro
I would pick Ruby on Rails as main framework. It can go a long away, has sane defaults when talking about security and can move fast with building features.

For CRUD is the perfect fit (for me).

For background processing job I would pick Sidekiq or GoodJob

And would add to it a library like Avo - a good admin that will remove for me the need to create my own backoffice dashboard.

If I would have more time to put aside for learning something new I would try Hanami 2: it is Ruby but it comes with a different code architecture for a web app.


👤 hiAndrewQuinn
Django.

- I know Python very well.

- I know Django quite well.

- Django is extremely mature.

- The Django REST Framework is quite mature.

Other stacks I've used: None, because I only started taking this kind of stuff seriously a year ago.

What else I'd recommend: Whatever you're most familiar with.


👤 ilaksh
That doesn't really narrow it down very much. How many different entities, how complex are the filters, how frequent are the reads and writes?

When I was around 14 or something I started teaching myself relational databases with something called Paradox for DOS. For at least 15 years I went along with the assumption that real programmers use a relational database for just about everything.

When the NoSQL trend appeared and became wildly popular, it made me reconsider.

These days, if I can get away with using JSON files, then I just do that.

As far as the stack I usually use Node.js and JavaScript just because I have been doing it that way for so long. Recently some people specifically ask for Python.

Obviously, whether that will work depends on the project.

You often don't have a choice because the database is already built.

For many projects, there are multiple different approaches that would work fine.

I think for the future you will start to see languages that target web assembly becoming more and more popular for portability. Such as Rust and maybe some Rust competitor that has yet to become popular.

There will probably be some kind of popular web assembly runtime soon bundled with Postgres or something.

Or maybe someone will just build a Postgres extension that serves web pages running web assembly that can query Postgres.


👤 sirrele
I have been in love with Loopback.io since v2 even though it was a bit of a rollercoaster.. Loopback v4 is a beautiful library. Its been around longer than nestjs but that's the easiest thing to compare it too. I recently have been creating lb4 servers that interface nextjs and react native clients. Initially, I identify my entities and use cases that I want to build. I then use the lb4 cli to auto generate models, relations, controllers, datasources, interceptors (add logic on methods/classes). I can start testing them with the OpenAPI explorer. With the openapi-typescript-codegen library I can generate services from my lb4 OpenAPI spec that I can use on the client side. From there, you can really query data easily with the loopback filter (which can be used on the client too). I initially started doing this with angular1/2+ but its been pleasant using many clients. Even though I have been leveraging it for years in production, I am still learning and exploring. There are many other awesome things I can expand on or explain if you are interested!

https://loopback.io/doc/en/lb4/

https://github.com/ferdikoomen/openapi-typescript-codegen/tr...