• Blog
  • Documentation
  • Courses
  • Changelog
  • AI Starters
  • UI Kit
  • FAQ
  • Supamode
    New
  • Pricing

Launch your next SaaS in record time with Makerkit, a React SaaS Boilerplate for Next.js and Supabase.

Makerkit is a product of Makerkit Pte Ltd (registered in the Republic of Singapore)Company Registration No: 202407149CFor support or inquiries, please contact us

About
  • FAQ
  • Contact
  • Verify your Discord
  • Consultation
  • Open Source
  • Become an Affiliate
Product
  • Documentation
  • Blog
  • Changelog
  • UI Blocks
  • Figma UI Kit
  • AI SaaS Starters
License
  • Activate License
  • Upgrade License
  • Invite Member
Legal
  • Terms of License
    • Building Features
    • Commands
    • Code Style
    • Security Rules
    • Translations and Locales
    • Sending Emails
    • Writing API Routes
    • Validating API payload with Zod
    • Logging
    • Enable CORS
    • Encrypting Secrets
    • User Roles

Setting up your Firebase Security Rules during development

When running the Firebase Emulator, you can update your Firebase Firestore and Storage security rules by simply changing the files firestore.rules and storage.rules.

Firestore Security Rules

By default, Makerkit comes with pre-configured Security Rules that work with the original boilerplate's data structure. However, you will likely be updating your structure to fit your SaaS data model, and therefore you will probably be updating the Firestore Security Rules.

To change your Firestore security rules, simply edit the firestore.rules file in the root directory of your Makerkit repository; the Firebase Emulator will automatically pick the new changes up.

Storage Security Rules

At the moment, Makerkit does not add any security rule for your Storage buckets; this will be added very soon.

Publish your rules

Publishing your security rules is a critical pre-production step you should never forget; otherwise, your users will encounter runtime exceptions, ultimately leading to bugs in your app.

Remember: updating your repository's rules does not automatically publish them!

Remember: updating your repository's rules does not automatically publish them!

To publish your Security rules, open your Firebase Admin Console and copy-paste the content of your security rules. It can take some time before they fully propagate.