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:
$entity.__autogenerated/__$entity.tsx
$entity.__autogenerated/__$entity.new.tsx
$entity.__autogenerated/__$entity.$id.tsx
$entity.__autogenerated/__$entity.$id/edit.tsx
$entity.__autogenerated/__$entity.$id/share.tsx
app/routes/public/$entity.$id.tsx
$entity.__autogenerated/__$entity.all-in-one.tsx
You can replace the List route with this.
app/routes/admin/entities/no-code/index.tsx
app/routes/admin/entities/no-code/stats/count.tsx
You could use this at /app/:tenant/dashboard or /admin/dashboard depending on the entity type.
app/routes/admin/entities/no-code/lists/tasks.tsx
app/routes/app.$tenant/$entity.**autogenerated/**$entity.new.tsx
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 row.product?.title
.
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.
End result
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!
We respect your privacy. We respect your privacy.
TLDR: We use cookies for language selection, theme, and analytics. Learn more. TLDR: We use cookies for language selection, theme, and analytics. Learn more