Before going to production, it's essential to follow certain precautions to avoid failures.
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.
Whenever your Security rules need updating, you have to make sure to propagate these changes and publish them from your Firebase Console.
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.
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.
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.
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.
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.
Please follow the email configuration guide to learn more about how to configure your SMTP service.
Understand how visitors find your website early on.
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.
We recommend that you use a logging service to log any events that occur in your application. This will allow you to debug any issues that may occur in your application.
While this is optional, we highly recommend that you use a logging service. Logging is how you can debug issues in your application, and it is essential to have a logging service in place.
Some logging services that we recommend are:
The above can be installed with a one-click install in the Vercel dashboard (if you are using Vercel).
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.