Watch the preview here.
What is CRUDAPVLMEIGK and why your SaaS needs it sooner or later?
Every software revolves around CRUD, supporting at least 1 of these:
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?
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).
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.
If you ever need help on debugging your entity properties, workflow, or custom views, just export them and hand the .json file to me:
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).
Entities now have types:
For each Entity that you create, it will generate 9 full-stack routes:
You can replace the List route with this.
You could use this at /app/:tenant/dashboard or /admin/dashboard depending on the entity type.
You may not need the Entity Builder autogenerated UI, but if you want to keep all its features but customize some (or all) the properties and have them all stored in their corresponding database/prisma model, you can!
I built the routes in a way that has and open API for full customization.
For example, say you want a Product model, this is how you can keep your own prisma model for it while keeping all the Entity Builder features.
1/8 Create the Entity
Name: product, Slug: products, Title: Product and Plural: Products.
2/8 Create the Properties
In this case I'll just add a Title field of type TEXT and uncheck the "Is dynamic field" value.
3/8 Create the Model referencing Row
Add the properties matching the same Entity Property names that you created (in this case "title").
4/8 Add a reference to Row
Add a property with the exact Entity name on the Row model (in this case "product") as optional (not all rows will be products)
4/8 Update your database
You can either run
npx prisma db push or create a migration for it.
5/8 Add the product type in RowWithDetails
Add the "product" reference on the "RowWithDetails" type. This way you can access to the product values with
6/8 Include the product in the row queries
This tells prisma to fetch products on every corresponding Row.
7/8 Go to the autogenerated New route
It will show an error indicating that we need to customize the UI field (since is not a dynamic field) for full customization.
8/8 Add the property UI for it at RowCustomProperties.tsx
Here we can catch the entity (product) property (title) and customize the UI as much as we want.
9 steps look like a lot of steps to customize product fields. But it's more than that:
This release should be out in November 1st, join the discord server and let me know your thoughts!