Before going to production, it's essential to follow certain precautions to avoid failures.
1) Environment Variables
First, we must safely inject the correct environment variables into their relative environment. MakerKit has predefined templates that allow you to understand where each variable should be added.
Before publishing your SaaS, or if you are making a production release after a change and this included an environment variable; ensure your Vercel Console is up to date with the correct variable in the right environments.
2) Firebase Security Rules (Firestore and Storage)
Whenever your Security rules need updating, you have to make sure to propagate these changes and publish them from your Firebase Console.
3) Firestore Indexes
As you may know, the Firestore emulator does not fail when a new index is needed, like its production version. This can be dangerous!
If you are setting up Makerkit for the first time, remember to set up the an index for querying an invitation without knowing its organization.
Create Index Exemption by clicking on the link below
You can do so using the following link (replace "[[YOUR_PROJECT_ID]]" with your real project ID):
If you have added other complex queries that need a Firestore index exemption, ensure you are testing thoroughly with an actual Firestore database to avoid similar issues.
4) Enable Authentication providers
If you have added authentication providers other than Google, make sure you have enabled them from the Console and added the needed configuration so that they work correctly.
For many of them, you will have to provide an app ID or a key, so configure and test them in a production environment.
5) Enable your Stripe account Billing Status
Remember to complete your Stripe account's information and enable billing and to not forget it in
Additionally, you will need to add your Stripe API keys to the environment variables to process payments. Ensure you have added the correct keys to the correct environment and that have selected all the required events to your webhook.
Please follow the payments configuration guide to learn more about how to configure your Stripe account.
6) Add your SMPT service credentials
You will need to add your SMTP service credentials to the environment variables to send emails. This is required for sending emails to users when they are invited to an organization.
To set the credentials, use the global configuration file
7) Enable Google Analytics (Optional)
Understand how visitors find your website early on.
8) Enable Sentry (Optional)
With 4000 events for free per month, we recommend that you use Sentry.io for ensuring you can catch, analyze and fix any runtime errors in your application that your users will encounter.
9) Deploy to Production
Once you have completed all the steps above, you can deploy your application to production. Since a Makerkit application is a simple Next.js application, the Next.js official deployment guide is the best place to start.