Building a SaaS Application without User Reference Field in Collections

In this video you will learn how to build a SaaS or a Multi-Tenant SaaS application in DrapCode, when there is no parent-child relationship or no User reference field relation between the collections.

When building a SaaS application, managing user-specific data efficiently is crucial. Typically, developers use a User Reference Field in collections to associate data with individual users. However, in certain cases, you might want to structure your database without explicitly linking records to user accounts. This approach can be useful for applications where multiple users need access to shared datasets, or when authentication is handled externally. Instead of relying on user references, you can implement filtered data views, role-based access controls, or external API authentication to manage user data dynamically within DrapCode.

By removing direct user references from collections, you gain flexibility in data modeling, enabling easier scalability and integration with external platforms. This method also simplifies permissions management, as access controls can be applied at the API level or based on session variables rather than being hardcoded into the database. Once this structure is in place, users can optimize their SaaS workflows further by learning how to Reset Form Fields via Event, which helps streamline user interactions and enhances the overall app experience.

For eg., when you are building a Client Portal on Stripe data and want to show the relevant Transactions to anyone who logs in where to view the transactions which are done by their company only and no other transactions.

Each user has a stripe_company_code associated with them and each transaction also has the same stripe_company_code. You can filter and fetch all the transactions where stripe_company_code matches with the logged in user stripe_company_code, This way each one will only see the data which is meant for them.

Some more videos - 

Unix Time to Human Readable Date Format

Currency Format Derived Field

Sending Dynamic Emails to New Signup Users

External APIs Success Message Configuration

For any questions please feel free to reach out to us on support@drapcode.com

Do you like cookies? 🍪 We use cookies to ensure you get the best experience on our website. Learn More