HACKER Q&A
📣 mouzogu

Easiest way to build a CRUD app?


Ideally, there would be no:

>multiple programming/scripting languages to learn

>external dependencies: packages, api's, services, saas

Should be simple and resilient, can last for a long time.

Doesn't require a lot of maintenance, large multiskilled teams, or dependency on services or API's that have a tendency to deprecate or disappear. Something which is not easy to compromise or hack.

Is it a stupid question? The closest I can think of is a static site generator with some kind of self-hosted database but I'm not aware of any.

Thanks


  👤 theptip Accepted Answer ✓
I would answer at the meta-level - pick the framework in the language you know best.

If you are already fluent in Python, use Django. PHP; Laravel? Etc. The benefit of using the “best” CRUD tool (if there even is one) is far less than the cost of learning a new language these days.

When Rails first came out, it was so much better than anything else that it was worth it to learn Ruby just to use that toolchain. Nowadays, the gap has closed for the simple use-case.

You can run Django/Rails & Postgres on Heroku with approximately zero infra burden. I still have a trivial app I last touched ten years ago and it’s still up and serving traffic.


👤 samwillis
I would consider Django and just using its Admin framework for building your UI, you can achieve so much very quickly with almost no code.

I believe it’s a brilliant tool for building internal CRUD type db apps.

Knowing how to use the admin framework well is basically a developer super power.

You won’t need any external libraries, it has brilliant docs and important tools like database migrations are built in.


👤 adrianthedev
I'm reading this as a CRUD GUI app. Definitely Ruby on Rails coupled with Avo (shameless plug).

It literally takes you less than an hour to create a realistic usable CRUD app (that would take you at least a few days in the traditional way) without learning anything new. Generate a DSL (a Resource) and add one line per field.

Avo knows how to read and display in a rich way, handle creating/updating records using your already in place validations, add associations in a giffy and one-liner file uploads. If the provided fileds are not enough you can create your own. The Rails developer can forget about building a front-ned for their admin panel/back-office area.

When you need to break out from the CRUD, Avo makes it easy using regular Rails code and erb templates.

Maintenance you say? There's no real maintenance here. You don't generate any templates for your CRUD interface, but write declarative code with plenty of options to create the best experience for your users. Avo is beautifully packaged away and will not pollute your app with business files (only configuration files). Everything is abstracted away in the background so you get easy-updates by running one simple `gem update avo` command.

Large teams will move in a uniform way building the same UI all throughout the app.

https://github.com/avo-hq/avo

https://avo.cool


👤 gls2ro
I would recommend Rails.

You can just do:

     bin/rails generate scaffold Car title:string amount:integer
and it will generate code to support all CRUD operations (model, views, controller) for Car with the two attributes title and amount.

I can also be deployed without any K8s, Docker ... (but I recommend at least an Ansible set up so you can migrate the hosting easy between providers)

You can directly deploy it simply to a machine with Nginx and PostgreSQL.


👤 dig1
I'll probably be a minority here, but I'd say: java + Vaadin [1] + raw jdbc (no ORM nonsense). On Vaadin site, you can use starter [2] to create an app template. There is no need to write javascript; most Vaadin code looks like good old desktop programming. Due Java stability, that thing will run forever and will be performant.

If you want to be "cloud native" (or whatever cool name now is) in the future, you can later recompile it with graalvm [3] and produce a single, static binary, like cool kids these days does with golang and rust.

[1] https://vaadin.com/

[2] https://start.vaadin.com/app/

[3] https://www.graalvm.org/


👤 dbish
I used to use Django for this kind of thing, but I have found that Flask connected to your fully managed database of choice like AWS with dynamodb (nosql db gets rid of even worrying about schemas) is the simplest way to quickly get up and running and do almost everything in Python with very little learning of various settings and details of specific frameworks since it is so minimal. This is how I tend to prototype then if there's anything promising I'll move to a better stack of tech based on the needs of the user (ex: is the end result going to be better as an iphone app, are there particular scaling needs that I need to worry about, etc.).

👤 elitan
How many people will use it and how will it be used? What is the app exactly going to do?

Whe first thing that comes to mind i Notion, which is a true no-code alternative if you want to build internal CRUD apps.

The next step would be to use a managed backend and a no-code frontend. For backend you can use services like Firebase [1], Nhost [2], or Supabase [3].

For frontend you can use something like Retool [4].

[1] https://firebase.com/

[2] https://nhost.io/ - Discloser: I'm the co-founder of Nhost

[3] https://supabase.com/

[4] https://retool.com/


👤 davidfactorial
I'm a large fan of Django/Python for anything CRUD-like.

It has been my go-to web framework for the better part of a decade and I continue to be impressed with it. "The web framework for perfectionists with deadlines" tagline is quite apt, as it has the highest combo of power and developer efficiency of any framework I've come across even today.

It is Python, which gives you the entirety of the Python ecosystem including all of the data science stuff and a bunch of Django-specific extras if you need them.

With the recent crop of Javascript-less tools like HTMX and AlpineJS you can do most things without any Javascript at all. Bootstrap or Tailwind both work great for CSS.

I still find the database ORM to be one of the most pleasant ways to interface with a datastore, and the migrations system usually makes database changes pretty easy. Can work with Postgres, Sqlite, mySql and a few others.

It has basically zero external dependencies besides one or two tiny ones.

I've been pleased with how easy it has been to keep Django upgraded. It feels like relatively little has changed in a backwards incompatible way compared to some of the frontend churn I've experienced.

It's widely used, and so it is relatively easy to find people who can work on a Django codebase compared to something more obscure. Django embraces convention over configuration, so if you've worked on one Django codebase you can probably work on another.

The documentation is excellent, and since it is widespread there is a huge amount of learning materials, articles, and Stackoverflow questions around.

Django has 16 years worth of work put into it and is extremely well tested. It implements a lot of the security things I have no interest in trying myself, like password hashing, sanitizing, etc.

Unless your requirements call for extreme performance needs or massively big data, Django can probably handle your workload just fine.

You can get pretty far with the base framework, and then if you need something else, consult the massive list of extras: https://awesomedjango.org/

Happy to answer any Django questions. Cheers


👤 BrightOne
I would go for Ruby on Rails, or a more modern Phoenix Framework (Elixir). With Phoenix you can also use Phoenix LiveView to avoid writing JavaScript. Very stable, scalable and low-hassle once you deploy.

👤 edanm
The best thing to do is not to build anything at all, if you can. This depends on what exactly you're trying to accomplish, who the target audience is, etc.

If you need something similar to a website or a store, the easiest option is to go with something like Wix (for websites) or Shopify for a store.

If you need something that's similar to a website but with a tad more complexity or with the potential to add more complexity, a good option might be a hosted WordPress site. You can start with something simple ad add a lot of comlexity via plugins or via writing your own code.

If you're looking for something fully custom, that's really not like anything else, then the easiest might be a low-code no-code tool. Haven't used many myself but that's often a good option.

Finally, if all of that fails, and assuming you need a web app (and not a desktop or mobile app), then you probably should use something like Django with Python or a similar framework for building an app, while keeping the HTML inline (as opposed to a separate React codebase or similar). Use whatever tools you know best to do this. IF you don't know anything, use whatever's the most similar to stuff you already know. (E.g. do you know Python? Use Django. Know Rails? Use Ruby).

This solution is still fairly easy, but also not exactly great for growth. My default these days is usually to start with a backend that's only there to provide an API, and a separate JS-based frontend. That's a lot more work, but most things end up there fairly quickly so usually worth just starting there.


👤 kube-system
I’m surprised nobody had said MS Access. You don’t need to learn any programming languages, it comes with everything you need, and every Access app has lasted way longer than anyone wanted it to. ;)

👤 mickael-kerjean
For non enterprise graded CRUD apps, I usually go the PHP way, it's not sexy but it's cheap to run both in term of server cost and brain space to worry about what could go wrong, doesn't require constant maintenance and is likely to outlive the majority of what is considered sexy today.

👤 smackeyacky
.NET, razor pages, sqlite, entity framework.

Its hard to build anything non-trivial with a gui without involving a few languages these days.

You can package your .NET server as completely self contained and run it on anything, just need a web browser.

Edit: python might get you close with a simple html framework.


👤 DanHulton
I specifically wrote a starter kit/framework to solve this problem -- at least for me, and hopefully for others: https://nodewood.com/

Since you'll be running JavaScript in the browser, it also uses Node.js for the backend. This allows you to use the same code for validation, business logic, etc, and it specifically has multiple patterns to encourage this.

It's all one bundle that you run locally (or on one machine in production, or two if you want to split out the DB, which I'd recommend). By default, it uses Docker to run locally, but I've included instructions to run it on bare-metal, if you choose. For subscriptions, I use Stripe, but I mean you gotta use _someone_ for that, and I found their API to be easiest to work with, and thus modify.

I specifically built it so that I wouldn't have to keep re-creating the wheel when I wanted to try out a new SaaS idea as just one person, so it should work just fine for someone who doesn't want to require a team, but it should also work well for people who do want to scale to teams: one of the core components is that you break up work into "features" which are directories that repeat the common subdirectories (api, lib, ui) and make it easy to keep commonly-used code together.

Full docs are available publicly on the site, and if you have any questions, I'm more than happy to answer!


👤 slotrans
If this isn't a business application, ignore this entire comment.

If it is a business application, you probably shouldn't build a CRUD app, at least not the way that's commonly understood. Stick with me for a minute.

First off, you must never delete business data (except per GDPR, retention policies, or other legal requirements). I'm sure someone will pipe in with a contrived use case where you would want to, but in general you must not. Soft-deletes, sure. Hard deletes with immutable history, also ok. Generally the popular frameworks will not help you here.

Second, realize that an update is logically equivalent to a delete followed by an insert (under the hood, Postgres implements `update` precisely thus). So per the above, you should think twice about updates. As with deletes, an immutable history can make updates safe. Alternatively, you can use append-only versioning with a current version pointer. Again, the frameworks are just not going to help you here.

So out of CRUD that leaves just CR that are fully safe, and those are the easiest parts.

I'm sure most folks will think this is ridiculous but that's because "building business software" is 1) not taught in school, 2) considered hopelessly boring, and therefore 3) not valued by developers. Nevertheless, it's generally, y'know, our job. Good business software must keep records. It must track when things happened, who did them, and so on. The typical approach to CRUD, as exemplified by all the frameworks suggested in other comments, does not keep such records, and therefore produces software that is unfit for its purpose.

One common objection will be that you don't need these things, or don't know that you need these things, at the beginning of a project. Yes you do! Imagine telling the IRS "oh I didn't keep very good records this year, after all my business is just getting started". Record-keeping needs to be treated as a hard, non-negotiable requirement for all business software.


👤 johnnypangs
Not sure if this qualifies but hasura[1] sounds like it would work well. It’s not REST and you could consider it to be a dependency but you wouldn’t have to write any code and you could deploy it using a docker container.

[1] https://hasura.io/


👤 mellosouls
"Easiest way to build a CRUD app".

Using the CRUD-app-building framework in which you are competent.

Beyond toy apps there are no shortcuts without that competence but there are plenty of prospective frameworks to develop it in, as evidenced by the other comments.


👤 josefrichter
Lots of variables in your question.

For simple stuff I am a big believer in building backends with tools like Strapi, it's hard to beat for MVP

For more customized stuff I do believe Rails is still the safest choice in terms of ease of use, docs, learning resources, community, available libraries and integrations, etc. etc. Close 2nd/3rd probably something like Django or Express.js based stuff.

For more complex stuff my weapon of choice is Elixir/Phoenix/LiveView - hard to beat for actual web projects that need to handle some traffic. I am actually close to believing that there's probably nothing better suited for web projects than Erlang BEAM.


👤 markozivanovic
Laravel. You'll get a lot of plug n' play stuff within its ecosystem. The community is at this point massive, so there's no doubt it will stick around for the time to come.

It's not a no-code solution, but the shallow learning curve will allow you to get up to speed in no time.


👤 folli
No one mentioned Spring Boot and Spring Data with Thymeleaf yet? I find it quite simple to build stable web apps in a short time. Plus it removes a metric ton of boilerplate that's inherent in Java applications.

👤 open-source-ux
If you intend to build the CRUD app with a programming language (opposed to a low-code or no-code tool), then PHP would be suitable.

At least half of HN will recoil in horror, but PHP was designed for web programming and nothing else. The standard library will have almost everything you need. Deployment is easier than many other languages. It can be as simple as uploading your PHP files to a folder located on your hosting provider.

"Something which is not easy to compromise or hack."

Well, this is dependent on the skill of the programmer and takes time to learn. The alternative is to pull in external dependencies i.e a framework that tackles security issues like authentication, database access etc. But learning to use a framework will also be a time sink (but less time-consuming that building from scratch).

"The closest I can think of is a static site generator with some kind of self-hosted database but I'm not aware of any."

Static Site Generators (SSG) do not use databases and would not be suitable for a dynamic CRUD app. Even a 'simple' task such as signing-in to your CRUD app (if needed) is not possible with a SSG unless you plug in an external dependency.

Remember, if you go down the low-code or no-code tool approach you'll always be tied to the low-code platform who will host your CRUD app.


👤 mkl95
Write an OpenAPI schema file describing your CRUD, and generate code with OpenAPI Generator. Download the official Postgres docker image, run it as a daemon, and configure your app to use it. Configure Nginx as your app's reverse proxy. That's it.

👤 programmarchy
If all you need is CRUD you could use Postgrest [1] which generates the endpoints for you based on your database schema. I use it to build admin backends.

[1] https://postgrest.org/en/stable/


👤 dineshkumar_cs
If it's for a side project, i would think about resiliency and lasting for long time once there's a need for it. This's also contributed by the stack or how you setup infra. So don't bother initially.

You can pick a framework if you're comfortable with mix of frontend and backend (rails, django etc)

If you are more on backend, pick say react in frontend and your choice of language in backend and write monolith. Have a database if needed. Avoid cache completely (You don't need to scale or make it performant). Infact you can use file based db (eg: bolt) and add Pg/Mongo/Sql later.

My usual setup is,

  1. Go for backend, react frontend
  2. Deployed backend in free-tier GCP VM
  3. Deployed frontend in Netlify/Heroku
  4. Use free pg database in Heroku
Avoid self provisioning as much as possible if you don't need the control.

If it's for Indiehacker project, would suggest to not build it right away, use nocode platform or template to setup landing page, validate and do things.


👤 panphora
I've spent years building an open-source framework for building CRUD apps [0]

I made it because I was tired of spending months designing beautiful interfaces, only to realize I was only 30% done with building a full app -- it was exhausting.

So I thought of a simpler way to create a dynamic app: treat HTML as a data structure.

---

Here's how to use it:

Tag your HTML elements as editable and/or containing data.

The syntax for this is simple:

    
I am an editable page title
This gets converted into:

    { "pageTitle": "I am an editable page title" }
---

Based on just some HTML templates marked up in this way, you'll get a full application with user accounts baked in -- where each user can edit their own copy of the HTML templates you made, filling it with their own data.

It's a super-fast way of building an application with multiple users, when all you have is some HTML and CSS. And it only requires learning ~8 custom attributes to build some pretty powerful apps [1]

---

Here's how it works behind the scenes:

1. The framework scans through the page, converting nested HTML into nested JSON data

2. The framework saves this JSON data to the current user's account

Pretty simple, right? I've spent years improving the syntax and behavior to make it really easy to use. I'd love your feedback.

I even made a client-side-only version, so you can test it out without installing anything [2]

---

[0] https://remaketheweb.com/

[1] https://recipes.remaketheweb.com/

[2] https://codepen.io/panphora/pen/rNMVYZz


👤 fian
Almost all the answers I can see at time of replying are assuming a web application. Web applications will require at a minimum HTML, CSS a server side language and probably Javascript.

To meet your criteria for:

no: >multiple programming/scripting languages to learn

You could look at building a Java FX or Java Swing desktop application with a Java server (SOAP or RPC).

Quite a few exploits (CORS, XSS) are not possible in a desktop app or are less likely to cause problems as your users aren't loading web pages.

The Java ecosystem is large and there are many stable libraries and frameworks out there that can help with CRUD application development.

The difficulty with desktop apps is updating the client on users machines. If you can get a Long Term Support (LTS) version of OpenJDK installed on your users machines, updates could be as simple as getting the users to copy paste a JAR file from a network share. There are probably nifty ways to get the client to ask the server for any updates, download the new JAR then tell the user to restart.


👤 boxed
http://iommi.rocks

Any tool that can do CRUD in a web context has a minimum level of complexity. I strongly believe iommi comes closer to that minimum than standard django by a lot.


👤 vptr
You can't really have crud without "external dependencies" because you need to store state somewhere.

I'd say, figure out your storage layer (sql, mongo, files etc) then pick the right tech. Django and Rails will let you very easily bootstrap simple crud apps with very little code.

If you need CRUD API i'd personally go with Go and some db that i'm familiar with (pg). You can achieve tons with Go without any external deps.


👤 santa_boy
You can use the following for CRUD app:

- bubble.io for commercial solution - appsmith.com or budibase.com for self-host open source solution

Both are fantastic solutions for CRUD apps


👤 crispyambulance
I find it a little disappointing that everyone (including the OP) assumes a CRUD app must be a web-application.

In a web-application you are NECESSARILY breaking, in all but the most exotic cases, the "multiple programming/scripting languages to learn" AND "external dependencies" requirement. Almost always, the "simple and resilient, can last for a long time" requirement goes out the window as well.

If the requirements given by the OP are intended to be strict, then they need to go desktop. A few things come to mind...

* java swing -- OK, it's not simple, but it is "one language" and quite self-contained, ORM is extensive. Many teams still work on 20 year old codebases in this stuff.

* .net desktop UI's -- .net, especially lately, is a great choice if you want to remain in a "large-enough" walled-garden. For UI, there's a lot to choose from, winforms would keep the OP very strictly in the "one language" zone. If they're willing to go XAML based, then options open up a lot with the trade off that there's a lot more complexity/learning-curve to deal with.

Both of these options have the ability to "launch" from a website (java webstart and .net clickonce), and both could talk through native remote procedure calls, use a REST API or even through gRPC to a service written by the OP in the same language. So it's not like they're inflexible.


👤 bascodes
It certainly depends on what's your definition of "easy".

If you're coming with no experience in programming at all, nothing will be easy. There might be tools which focus on one programming language, but they would abstract away too much details of how web based apps work in general to really understand what you're doing.

If you have some experience in a programming language or coming from just another field than web development, I'd suggest you go with a web framework which is commonly used in your programming language's universe. That might be Django for Python, ASP.NET for C#, etc.

Then, there are many lowcode/nocode tools which gives quick results. I have used Anvil in a tutorial to build a Twitter Dashboard: https://bas.codes/posts/python-anvil-twitter-stats

Your idea with the static site generators could also work. Keep in mind that you're going to create mostly frontend code when using this approach. That involves JS and npm – so you might go deep into the rabbit holes of front end web development, which can be huge. However, if that's what you want, I'd suggest using NextJS over Gatsby since I'd consider it easier to setup for beginners. Using a non-JS static site gen would contradict your "no multiple languages" requirement ;)


👤 sarsway
This thread is basically name your favorite language/framework. My vote goes to good ol:

Node.js + Postgres

Most flexible, biggest ecosystem of all, runs everywhere, talks to everything. Bonus: Get Github Copilot, it knows Node very well, and you don't even have to code most of the time, just tab, tab, tab.


👤 65
The answer is use whatever language/framework you know best. Know PHP? Use Laravel. Know Python? Use Django.

For me, I am mainly a Javascript developer so I use AWS + Next.js. It's very easy to create an API with Serverless, hook up a DynamoDB table, maybe add some Cognito in there, etc. All just Javascript. You can deploy the Next.js site to S3.

Obviously, this means a ton of external dependencies, but if you want something easily it I think it works well.


👤 siscia
Can you make it out of a google form and a google sheet?

👤 dewey
What do you want to achieve or build with it? I'd suggest Rails as it's pretty easy to get something up and running but that depends on what tech you are familiar with. It's boring, has a lot of resources online and doesn't change much so maybe a good choice.

👤 buescher
I'd love to see a good non-trivial example of a CRUD app --- something like the old Northwind Traders thing for Microsoft platforms --- in tcl, sqlite, and tk. Not that I would recommend you try this at work or for your career or anything.

👤 AdrianB1
Easy in all ways: - plain HTML + JS + CSS to start with, then add some simple framework like Bootstrap + Datatables for quick results - MS SQL Express Edition or Developer Edition as backend; it has the easiest GUI-driven installation, configuration and operation (via SQL Server Management Studio) while it is still completely free - server side programming ... not sure, for me PHP is the simplest, but this is based on a very limited view over all options. PHP is very simple because you can just use Notepad++ or VS Code to edit files, save, run - no build, no dependencies. You can run it under Windows (IIS) or Linux, configuration is minimal.

👤 _448
I may be an outlier here, but if you are comfortable with C++, then Witty (https://www.webtoolkit.eu) It is developing webapps like you develop desktop apps.

👤 franga2000
+1 for Django. Defining your model is easier than CREATE TABLE and built-in admin is ridiculously powerful - it can do all the CRUD operations, makes it super easy to add bulk actions (literally just a function), comes with filtering and search that you simply need to enable and handles nested forms (like 1-N or N-M relationships) out of the box.

User authentication and permissions are built in and there are many 3rd party modules available to do all sorts of thing. django-import-export for example allows importing and exporting to/from any spreadsheet format, including a preview of the changes before you run it for real.


👤 thunderbong
If you're not planning to code and prefer to instead use a no-code platform, may I suggest, nocodb[0].

It's really the best no-code app out there.

[0]: https://nocodb.com


👤 rowanajmarshall
Use what you know, and if you don't know, use something boring. Ruby on Rails, or Django, or Spring Boot/Hibernate. Something battle-tested, with lots of documentation and Stack Overflow answers.

👤 KronisLV
The absolute simplest setup that i've ever seen would be along the lines of the following:

  - PHP on the server, regular .php files that process the requests
  - Apache2/httpd as your web server
  - SQLite as your database (just a file), through PHP's PDO
  - just regular JS/CSS files for additional functionality that you need (e.g. add jQuery/Bootstrap)
  - no Composer or reliance on external dependencies or package management whatsoever
That said, every application that i've seen that has been written this way has been pretty bad - eventually you develop your own badly tested and badly documented abstractions that will slow you down towards the end of the project development and will cripple most of the developers that will need to take over your mess. Furthermore, security is generally an issue, since you should almost never write your own security code under most circumstances, but you probably will do just that with this approach. Also, managing the installation will eventually be a bit problematic, as your current PHP version will be deprecated.

For those reasons (and some others), i'd generally advise people to go with one of the other popular web frameworks with server side rendering:

  - PHP with Laravel/Lumen/Slim
  - Ruby with Rails
  - Python with Django
Now, some might prefer having a separate front end application (Angular, React, Vue, Svelte) from the back end (probably REST for its simplicity), but that's just introducing more complexity into the mix than necessary in this case, even though it has other benefits in regards to eventually scaling and/or swapping out bits of functionality for other technologies down the road.

Personally, i'd look in the direction of using something like MariaDB for the simpler apps that might need to eventually have a separate DB instance, as well as containers for managing the runtimes of everything as well as networking (Docker, Docker Compose, Docker Swarm, rather than something complicated like Kubernetes), but none of that is also strictly necessary.

As for the actual servers, just get an Ubuntu LTS VPS on whatever provider is affordable to you. It has a long life cycle, is generally pretty well documented and pretty boring. That way you can also migrate elsewhere if need be.


👤 czhu12
For apps I've built in the past, I've found the hardest thing was having to pay monthly hosting costs for years (which is pretty much a necessity if you use a cloud SQL database that things like Rails and Django rely on heavily).

Even $10 a month becomes annoying after 5 years.

I built this: https://forever-free-cloud-app-starter.chriszhu.me/ as a way to build a basic CRUD app that would be free to host forever.


👤 oops
Can you elaborate on what the app does and also prioritize your criteria?

If simplicity is your main requirement you might find inspiration in this:

> My focus has been on how to adapt the lessons I have learned working in teams at Google to a single programmer building small business work. There are many great engineering practices in Silicon Valley's big companies and well-capitalized VC firms, but one person does not have enough bandwidth to use them all and write software. The exercise for me is: what to keep and what must go.

> If I have been doing it right, the technology and techniques described here will sound easy. I have to fit it all in my head while having enough capacity left over to write software people want. Every extra thing has great cost, especially rarely touched software that comes back to bite in the middle of the night six months later.

https://crawshaw.io/blog/one-process-programming-notes https://news.ycombinator.com/item?id=17701882


👤 michaelterryio
This sounds like priming the Hacker News community for a follow-up submission (by a different account of course) introducing the perfect answer.

👤 kyriakos
Laravel does CRUD out of the box doesn't have many dependencies once installed. Documentation is excellent and can you get started quickly.

👤 dataminded
1. The tool you already know 2. Django

👤 oneplane
Your requirements are contradictory and incomplete:

  - No single language can do all of that successfully, unless you ditch GUI and client-server models
  - Without external dependencies you will either be reinventing the wheel or adding lots of layers
  - All software will require maintenance, more layers equal more maintenance
  - All software can be compromised or hacked, more layers equal more attack surface
  - If it has to last a long time, it cannot use anything that moves fast (or without LTS releases), but it depends on what you define by 'last' and 'a long time'

This doesn't mean your question is stupid, it's just not something that is simple and resilient while also being those other things.

If it is a single-user, single-machine "app", you could use a plain UTF-8 text file which can be read and written to by any relevant text editor. No app is the best app in this case. This does depend in what kind of information you intend to CRUD.


👤 nawgz
Hasura is the greatest CRUD tool of all time. It gives you a UI you can build a database schema in or you can put in on top of an existing schema (PostgreSQL and MSSQL support), it has support for migrations, it easily integrates any auth you like, and you just run GraphQL queries against it to CRUD the data. Not a single need to write SQL or REST APIs or anything!

👤 ksec
>Is it a stupid question?

It is not a stupid question at all. A problem I thought would have been solved by now or very closed to solving it. But we are not even half way there. Especially the self hosted API and services part.

Basically you want to bring Native App development model to the web. Although I think WebObject in the old days were quite close?

The current recommendation are Laravel, Rails and Django.


👤 jzellis
I've been working on a tool that generates the basic scaffolding for a CRUD API/GraphQL app in Node/Mongo/Express. Basically you write descriptions of your database models and it produces a very simple standalone app - you just go into the new folder, do npm install and run it, and it works out the gate. It's made to save you all the dull parts of creating a simple CRUD tool to get up and running, which you can then go ahead and add on to as you need.

I'd link to it but it's not really ready for prime time. But there's probably a billion other similar tools like it already. For me, it was built out of the desire to create, not a framework, but a static code generator - it literally generates the .js files for you, you only run it once to generate those files, and the tool itself isn't part of the finished app at all.


👤 gashmol
You can't have it all. You may achieve simplicity but it's not easy. Rails has most of what you need for a web app, and its ecosystem has many complementary subsystems and libraries. So, it's very easy to develop something fast. But, after a certain size it starts to be less and less maintainable.

👤 Mikeb85
Rails. Use the default Rails 7 stack (Importmaps, Hotwire).

You also can't get away from knowing at least a couple programming 'languages', it's hard to get away from writing at least some HTML/CSS unless you go with all pre-built solutions, at which point you may as well use a website builder...


👤 zrkrlc
I guess no one uses Clojure/Script on HN anymore. All of your requirements fit the cluster in designspace that the language was designed to occupy.

(cf. 'situated programs' in https://youtu.be/2V1FtfBDsLU)


👤 hirako2000
jasonette.

https://jasonette.com/

I would still build a crud app with the frameworks and dependency hell you are referring to. Magic solutions tend to save time in the short term but often cost more than it saved in the mid to long term.


👤 fredrik_skne_se
I love using C# and SQLite with EFCore for this kind of applications. Then I put it behind nginx.

👤 farmin
I reckon python bottle.py (or flask), psycopg2, with basic auth. And sqlite or postgres..

I tried django but spent more time trying to understand the magic. I like writing out my SQL in the endpoint function for readability.

Oh if you want GUI component as well. Jinja2 and Htmx.


👤 freddref
As others have mentioned, see if you can rope together something with a Google form and sheets.

Django is great, you can get very far with it's defaults e.g. it uses local SQLite db.


👤 al2o3cr
Two thoughts:

* you didn't specify anything the app *should* do besides "CRUD". You'll get better answers if you can say more about your needs and goals.

* some of the given requirements are mutually contradictory - "no services / SaaS" and "doesn't require a lot of maintenance", for instance. Part of the tradeoff you make using third-party services is "risk of them disappearing" vs "maintenance effort reduction".


👤 TrackerFF
+1 for FastAPI

If you know any Python at all, it's extremely easy to get into, and has a lot of "battery included" for standard problems you encounter in the CRUD-world.


👤 pictur
Depends on what you're aiming for. For an API that will not be very flexible, its https://strapi.io/ may be good. https://feathersjs.com/ is good if you're looking for something flexible. If you are looking for more flexibility, you should write from scratch.

👤 lormayna
Plain HTML + Alpine.js + HTMX for the frontend. Use the language that you prefer for the backend handle the HTTP requests and return HTML to the frontend.

👤 jonjacky
Seen here last week, exactly what you are asking for: Linux, Apache, PHP. No database, no Javascript, no framework, no AWS (or other cloud service). Part-time project by one person:

Standard Ebooks serves millions of requests per month with a 2GB VPS https://news.ycombinator.com/item?id=30302819


👤 divbzero
If you want something that does not require much maintenance or external dependencies, I would lean towards a hosted data store from an established provider. Google Cloud Firestore [1] is just one example and I know there are others in the same vein.

[1]: https://firebase.google.com/products/firestore


👤 asddubs
I would say a classic old school LAMP stack is as close as you're gonna get to no dependencies (assuming you count frameworks as dependencies)

👤 discordance
Check out https://www.anvil.works. Python on the front and backend.

👤 LouisSayers
Maybe this sounds a bit dumb, but you could just use git and store everything in files?

I mean if you think about it, git is technically a CRUD app...


👤 jasfi
Bubble seems like the closest thing: https://bubble.io/

👤 masukomi
the ask for no external dependencies means you need to do one of two things.

1. choose a language with a LOT of "batteries included" (you don't want to have to write HTTP connection protocol handling from scratch). 2. re-create (or copy in) a ton of external code, which is still really "external dependencies" you've just copied them in to your code so you don't have to worry about them disappearing.

Either way you'll be writing a boatload of stuff from scratch that already exists. Regardless of which option you've chosen "easy" is no longer on the table. You want easy, you use the code other people have written to simplify things. That's why Rails, and its clones dominate web-dev. They have already done all the hard bits so that what's left is the "easy" bits and the proprietary bits.

> Should be simple and resilient, can last for a long time.

define "a long time"

Are we talking decades? C+ is probably the way to go. There's a ton of it in just about every industry so it's guaranteed to keep being supported for decades. Alternately, choose a language that's existed for a long time and still seems to be going strong like Smalltalk. As a benefit, Smalltalk's got a LOT of "batteries included".

> The closest I can think of is a static site generator with some kind of self-hosted database but I'm not aware of any.

that's an external dependency and most all of them depend on packages / libraries so it's an external dependency with external dependencies.

also, having a self-hosted database defeats the point of a "static" site generator. If it's static you don't need a db, unless you're storing meta-data that helps you generate the static files. That's why you're not finding any.


👤 pbiggar
This is what https://darklang is intended to be. I think in fairness it's not there yet (and it's also a service, so not what you want), but it's certainly fully integrated and doesn't need DBs, external SaaSes, devops, cloud expertise, etc.

👤 jorgeleo
I am building something of this sort.

Im the app, if you have the right permission, you can use xml to describe tables, forms, and you can use lua to respond on the sever side to control and database events.

It is very staright forward, and you can do it all directly on the web.

It is still alpha, but if you are interested let me jnow and i will open a playground for you.


👤 adroitboss
If it is purely a CRUD app and you know python, I would recommend https://pywebio.readthedocs.io/en/latest/. It allows you to write a website as if you are writing a console application.

👤 yokto
If you like TypeScript/JavaScript, I recently discovered RedwoodJS [1], and while I have never tried it, it looks like a simple and rather complete framework for basic CRUD apps, while leaving room for growth.

[1] https://redwoodjs.com/


👤 jdright
Microsoft Access/OpenOffice Base

👤 pkphilip
Try the Yii PHP framework. It can generate full CRUD directly from the database. Building in support for access controls etc is quite easy. schema. https://www.yiiframework.com/

👤 robertwt7
Django is a solid choice. I used to do laravel a lot but moved to django for some reason. .net core is good as well, has a lot of scaffolding from the cli. Java has jhipster if you want to generate stuff quickly too. Choose any language that you’re strong in

👤 pdenton
I know, use WordPress!

(...I'll show myself out)


👤 mikewarot
Building a CRUD app is easy. You can write it in any number of languages, I wrote them in Turbo Pascal back in the 1980s.

Then you mention "static site generator", which implies the web, and all the layers that come with it. That will never be easy, nor stable.


👤 buescher
Also, whatever happened to zope and plone? [2006] https://archive.org/details/SeanKellyGettingYourFeetWetwithP...

👤 poisonborz
If applicable, instead of a full-blown app, could try a self-hosted forms solution, like https://github.com/ohmyform/ohmyform

👤 innocentoldguy
I have been working with Phoenix/LiveView for several years and really like it. It is extremely performant and scalable, and a joy to program in. In my opinion, it meets your requirements and may be worth a try.

👤 brunovcosta
Super biased here, but you should definitely try Abstra (https://abstra.app/)

It allows you to create CRUD apps visually with little to no JS code


👤 BerislavLopac
I would go for Sandman, without a doubt: https://pythonhosted.org/sandman2/

👤 quickthrower2
I am really liking nextjs but with the caveat of only if you already are on the NPM hamster wheel (braking changes are too regular in that ecosystem) and already love React

👤 JadedBlueEyes
If you're going to be doing anything more complex than form validation and CSS animations on the client, you're going to need JS. If it's a constraint that there must only be one language then you have to use JS on the server too.

Nowadays the best experience with full stack JS is a full-stack framework like Next.js, Next or the one I recommend, sveltekit. You can easily write client pages & server routes Next to each other, with all the standard client side features like components and use tried and tested JS libraries like node-postgres. It's great and is unlikely to break for years, or decades if dependencies are updated.


👤 ravenstine
No, you don't need a humongous framework.

Install Node.js and an SQLite adapter. Learn to use the standard HTTP/S module. Write plain ol' JavaScript for the frontend and don't make it a SPA. Unless the app is getting a ton of traffic or has a lot of pages, there's no reason it can't be about that simple. In that case you only need 1 language and the only dependency is whatever you use to read/write to an SQLite database. No need for Rails, Laravel, Django, or anything that fancy.

On the other hand, one of those frameworks may be what you're looking for. I'm just saying it could be a lot simpler than that.


👤 rubyist5eva
Ruby on Rails because it can generate all the scaffolding you need instantly and then you can focus on adding business logic instead of worrying about boilerplate BS.

👤 em-bee
several years ago i took a feature-rich object-storage platform (written in pike) as a backend, added a RESTful API and then built various SPA sites on top of that. once the API was sufficiently feature complete i didn't need to touch the backend at all anymore.

besides the backend itself, the only other dependency is a database.

as a result, building a site nowadays is drastically simplified. javascript and my favorite frontend framework is all i need.


👤 oladipomd
If you don't mind PHP, there are tools like PDOCrud, ajaxCrud, xCrud et al that provide simple ways to create cruds with a limited number of lines.

👤 Arubis
It sounds like you want to have a thing built, and don’t want to spend time/effort on code. Have you considered hiring someone to build it for you?

👤 999900000999
thetip already covered this. Use what you know

I would say use Firebase or another fully managed solution. Don't waste time on a server if you can avoid it


👤 kissmd
We are still in stealth mode with our out of the box CRUD generator, but you might wanna join our closed alpha. PM me, if interested.

👤 lanecwagner
Only a good idea if you already know Go, but I just write simple HTTP servers in Go. I deploy a SPA separately in Vue using netlify.

👤 bamboozled
Django

👤 muttantt
Vue on the front end, along with Quasar Framework Python+Falcon on the back end Postgres/Redis for data store, caching

👤 tommilukkarinen
Vaadin meets all your requirements. It has some templates so you can basically make an app by just commenting stuff out.


👤 replwoacause
Maybe a RAD tool like https://wappler.io

👤 stakkur
Ruby on Rails, unless you’re more familiar with PHP/Laravel or Python/Django—then use one of them.

👤 modinfo
Check out blitz.

https://blitzjs.com/


👤 Eltintero
Everyone will hate me for saying this, but nothing like glideapps for this.

👤 aristofun
Ruby on Rails

I wonder why people keep asking such questions instead of just learning some of rails


👤 shtopointo
For the lack of dependencies – probably Go.

For simplicity – probably JavaScript w/ Express.


👤 tonymet
if you’re looking for easiest the best bet are OS frameworks like Visual Studio and Xcode. you’ll get comprehensive platform support ,great tooling , great docs

go and build a simple gui app for macos and it’s a dream .


👤 dvdkon
When I need a simple-ish CRUD app, I use Django. I know the parts I need to know, and learning wasn't too hard. The database schema lives in one easy to view/edit file, no need to both create language objects and write SQL. Jinja2 is the nicest templating language that's not HTML-specific. Deploymemt is easy enough.

That said, I have some issues with Django as well: Integrating JavaScript with the Django goodies (e.g. form system, CSRF prevention) is far from ideal. I remember spending hours to add a form field for multiple handwritten entries "properly", I ended up writing the form template manually and just not using the abstraction for that one field. It worked, but felt hacky. I now had rendering, parsing, and validation in two places.

Permissions are handled the way you'd probably expect them to be: Permissions are strings which users have and pages can require or check them. This is fine for most apps, but sometimes you want multiple views of the same data with complex permissions (e.g. the data determines whether the current user can see the item), Django provides little support there.

I also wish the Admin interface was easier to modify. It can be done, but feels to me like monkeypatching an existing app, not using an abstraction I could build an app on. It's probably meant that way, but I wish there was a framework with a less rigid analogue.

I'm slowly working on my own approach to tackle this problem, mostly focusing on declarative permissions (I wrote about an old version: https://dvdkon.gitlab.io/articles/mocasys-dascore/). I'd appreciate any pointers to other solutions to similar problems.

EDIT: As an aside, here are my criteria for a good CRUD app framework:

- The data model is the source of truth: I shouldn't have to repeat what tables and columns I have, or what constraints are placed on them. Server-side validation and client-side inputs should be autogenerated

- Permissions are all in one place: Critical parts of app security shouldn't be all over the place, especially they shouldn't be duplicated between the backend and frontend.

- Permissions should be granular to both columns and rows: I know this isn't always needed and that it's hard to implement, but sometimes you just need granularity, and hacking it in is, IMO, a bad idea for security reasons (see point above)

- The app is in a git repository, separate from the data it operates on: This is where a lot of "low-code" solutions fail for me, I get the goal of user-extensibility, but when I'm making software that will run a business' core functions, I don't want hidden state. Plain text is the best we've got in that regard.

EDIT2: Another criterion: Transparent handling of history. Keeping every change of an item should't need to be programmed once for every datatype, same for the retrieval UI.


👤 arey_abhishek
Appsmith as the front-end with Appwrite as the backend would work well.

👤 sidcool
Rails with server side rendering and Postgres. One stop shop.

👤 stephenboyd
The question is too vague. Why do you even need a CRUD app?

👤 umvi
nginx + language of choice as CGI + sqlite on a DO droplet

👤 Oxodao
Api Platform + React. That's just impossible to beat

👤 forinti
I'd go with Perl Dancer, SQLite and plain HTML.

👤 dvydra2
Retool + Dark Lang

👤 Avalaxy
None of the above. Microsoft Power Apps.

👤 lysecret
i ended up with a fastapi (on lamdas) and retool as a frontend. I really like it.

👤 dorianmariefr
rails

👤 ako
Any low-code will enable you to create multiple CRUD pages in less than 5 minutes.

👤 sheunl
Laravel. Hands down.

👤 e67f70028a46fba
Rails or pho.

👤 hevisko
web2py

👤 pinephoneguy
“Just do it.” Frameworks absolutely suck, don’t use them. Normalize your data and just build things one step at a time.