Ask HN: Easiest way to build a CRUD app?
If this <i>isn't</i> a business application, ignore this entire comment.<p>If it <i>is</i> 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.<p>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 <i>must not</i>. Soft-deletes, sure. Hard deletes with immutable history, also ok. Generally the popular frameworks will not help you here.<p>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.<p>So out of CRUD that leaves just CR that are fully safe, and those are the easiest parts.<p>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, <i>our job</i>. Good business software <i>must</i> keep records. It must track <i>when</i> things happened, <i>who</i> 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.<p>One common objection will be that you don't need these things, or don't <i>know</i> 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.