Skip to main content

Code as Doc: Automate by Vercel AI SDK and ZenStack for Free

· 10 min read
Jiasheng
Co-founder of ZenStack

Cover Image

Few developers like writing document

If you have ever worked as a developer in a large company, you know that coding is just one small part of the daily responsibilities. One of Google's full-stack software engineers, Ray Farias, once estimated that developers write about 100-150 lines of code per day at Google. While this estimate may vary across different teams, the order of magnitude matches my observations as a developer at Microsoft.

When Embedded AuthN Meets Embedded AuthZ - Building Multi-Tenant Apps With Better-Auth and ZenStack

· 12 min read
Yiming
Co-founder of ZenStack

Cover Image

Building a full-fledged multi-tenant application can be very challenging. Besides having a flexible sign-up and sign-in system, you also need to implement several other essential pieces:

  • Creating and managing tenants
  • User invitation flow
  • Managing roles and permissions
  • Enforcing data segregation and access control throughout the entire application

It sounds like lots of work, and it indeed is. You may have done this multiple times if you're a veteran SaaS developer.

Building Multi-Tenant Apps Using StackAuth's "Teams" and Next.js

· 8 min read
Yiming
Co-founder of ZenStack

Cover Image

Building a full-fledged multi-tenant application can be very challenging. Besides having a flexible sign-up and sign-in system, you also need to implement several other essential pieces:

  • Creating and managing tenants
  • User invitation flow
  • Managing roles and permissions
  • Enforcing data segregation and access control throughout the entire application

It sounds like lots of work, and it indeed is. You may have done this multiple times if you're a veteran SaaS developer.

Building Multi-Tenant Apps Using Clerk's "Organization" and Next.js

· 8 min read
Yiming
Co-founder of ZenStack

Cover Image

Building a full-fledged multi-tenant application can be very challenging. Besides having a flexible sign-up and sign-in system, you also need to implement several other essential pieces:

  • Creating and managing tenants
  • User invitation flow
  • Managing roles and permissions
  • Enforcing data segregation and access control throughout the entire application

It sounds like lots of work, and it indeed is. You may have done this multiple times if you're a veteran SaaS developer.

Typing Those JSON Fields? Yes, You Can!

· 5 min read
Yiming
Co-founder of ZenStack

Cover Image

SQL databases provide us with many benefits, the most important of which is strong schema enforcement. Yes, you pay the cost of migration when the schema changes, but the gain is far more significant - your code is clean because it can assume all data are in correct shapes.

However, once in a while, we want to break free from such strong guarantees for valid reasons. You may have some tiny objects that you want to attach to the main entities (e.g., metadata of an image) without formalizing them into a separate table. Or you need to store records with many possible sparse fields but want to avoid creating wide tables.

Programmers, Will AI Work For You, With You, or Without You?

· 8 min read
Yiming
Co-founder of ZenStack

Cover Image

"Programming is dead."

A friend said so when he heard I was working on dev tools. It was right after LLM’s coding abilities shocked the world. He felt it pointless to continue building tools for human programmers anymore when AI is taking over this profession. You'll never be wrong by predicting without attaching a time frame. Dead when? At least for the time being, the emergence of generative AI has introduced more work for programmers, some more difficult than before.

Whether AI will replace human developers is too big a topic to tackle. However, we can keep an open mind and explore different roles that AI can play in software development. Let's conduct thought experiments to imagine what each means to us.

Supabase RLS Alternative

· 14 min read
Jiasheng
Co-founder of ZenStack

Cover Image

A Short History of BaaS

In the early days of web and mobile app development, building a backend from scratch was laborious and error-prone. Developers had to manage servers, databases, and infrastructure and ensure scalability while writing the core business logic of their applications. Then came BaaS(Backend-as-a-Service), promising to liberate developers from this burden.

How the "check" Function Helps Keep Your Policies DRY

· 6 min read
Yiming
Co-founder of ZenStack

Cover Image

Among ZenStack's features, the most beloved one is the ability to define access control policies inside the data schema. This ensures that your rules are colocated with the source code, always in sync with the data model, and easy to understand. It arguably provides a superior DX to other solutions like hand-coded authorization logic, or Postgres row-level security.

However, as your application grows more complex, you may find yourself repeating the same policy patterns across multiple models. This post explores one typical pattern of such duplication and demonstrates how the new check() attribute function can help you keep your policies DRY.