1
3 Comments

Building an over-engineered low-code CRUD for SaaS apps

Watch the preview here or read the full blog post here.

What is CRUDAPVLMEIGK and why your SaaS needs it sooner or later?

Every software revolves around CRUD, supporting at least 1 of these:

  • Create (POST): Adding a record
  • Read (GET): Viewing a list of records
  • Update (PUT): Editing a record
  • Delete (DELETE): Removing a record

But when building SaaS applications - especially B2B apps, you quickly realize that CRUD is not enough. There should be something like CRUDP if we want to support row-level permissions, CRUDPV if we want to add custom views, CRUDPVL if we want to have account limits... and so on.

But how can we give steroids to standard CRUD views and forms?

---

Introducing CRUD 2.0 - aka CRUDAPVLMEIGK

  • [C][R][U][D]: Standard Create, Read, Update, and Delete rows.
  • [P]ermissions: Should I have permission to [C][R][U] and /or [D] this?
  • [A]PI: REST API to handle CRUD operations
  • Custom [V]iews: Save filters with a specific view name
  • Subscription [L]imits: Does my plan support adding 1 more record?
  • Co[M]ments: Letting your users interact in a specific record
  • [E]xport: A standard way to give your users their data (e.g. from .csv)
  • [I]mport: A standard way to quickly upload data (e.g. to .csv)
  • Ta[G]s: Categorize records with custom tags
  • Tas[K]s: Remind a user to complete a task on a certain record

If your SaaS application is a CRM, imagine building the CRUDAPVLMEIGK for every entity/model: Companies, Contacts and Opportunities.

Sooner or later, B2B users will ask for CRUDAPVLMEIGK features for every entity… or churn, as your software is not compliant (e.g exporting data).

---

The solution - SaasRock v0.7 Entity Builder

I'm about this 🤏 close to release SaasRock v0.7.0, which has more than 400 git changes (don't kill me) but also a ton of new features, especially for the Entity Builder.

Importing/Sharing Entities has never been easier

If you ever need help on debugging your entity properties, workflow, or custom views, just export them and hand the .json file to me:

/admin/entities

Creating Entities with 1 click (ok 2)

Before SaasRock v0.7.0 I seeded my system's entities (CRM Contacts & Deals), but now, I can start creating Entity Templates that contain entities metadata and how they relate to each other (e.g. Opportunities belong to Companies).

/admin/entities/templates/manual

---

No-code Routes & Blocks

Entities now have types:

  • App: Loads only at /app/:tenant/:entity
  • Admin: Loads only at /admin/entities/:entity/no-code
  • All: Both app and admin (e.g. CRM for both admins and customers)

For each Entity that you create, it will generate 9 full-stack routes:

List Route

  • Features: Pagination + Filters + Custom views + Export
  • File: $entity.__autogenerated/__$entity.tsx
  • Autogenerated Route: …/:entity

List Route

New Route

  • Features: Creates a Row + Sets relationships (parents/children)
  • File: $entity.__autogenerated/__$entity.new.tsx
  • Autogenerated Route: …/:entity/new

New Route

Overview Route

  • Features: Row Details + Workflow + Tags + Tasks + Comments + Share
  • File: $entity.__autogenerated/__$entity.$id.tsx
  • Autogenerated Route: …/:entity/:id

Overview Route

Edit Route

  • Features: Updates a Row
  • File: $entity.__autogenerated/__$entity.$id/edit.tsx
  • Autogenerated Route: …/:entity/:id/edit

Edit Route

Share Route

  • Features: Sets permissions (who can view/update/comment/delete this?)
  • File: $entity.__autogenerated/__$entity.$id/share.tsx
  • Autogenerated Route: …/:entity/:id/share

Share Route

Public URL Route

  • Features: Lets unauthenticated users overview the Row
  • File: app/routes/public/$entity.$id.tsx
  • Autogenerated Route: /public/:entity/:id

Public URL Route

All-in-one Route

  • Features: List + Uses Remix useFetcher to call the New and Edit route loaders and actions to keep CRUD in the same URL
  • File: $entity.__autogenerated/__$entity.all-in-one.tsx
  • Autogenerated Route: …/:entity/all-in-one

You can replace the List route with this.

All-in-one Route

All No-code Routes & Misc Blocks menu

  • Features: Overview of your entities and their autogenerated routes
  • File: app/routes/admin/entities/no-code/index.tsx
  • Autogenerated Route: /admin/entities/no-code

All the No-code Routes & Blocks

---

Continue reading...

, Founder of Icon for SaasRock
SaasRock
on October 28, 2022
  1. 2

    I thought this was a joke when I hit 'CRUDAPVLMEIGK'

    Then I figured out you were serious.

    Suggestion, use a different acronym.

    Something like CRUD++?

    Something someone can actually say in a conversation.

    1. 1

      Haha yeah! I'm joking with the term, I was looking after my niece watching this.

  2. 1

    Hey Alex! Cool product dude!

    Have you thought about how to manage permissions? Eventually, all backend as a service tools come upon this challenge of how to allow users to configure access control rules over the db entities.

    Firestore invented their own declarative permissions language based on db paths and ABAC.

    8Base invented their own permissions language too.

    AppWrite is doing the same.

    There's a new open source solution that can be used for fine grained access controls. It's called Cedar, and Amazon Verified Permissions is a managed version of it.

    Would love to chat with you about it.