Quick Deploy Guide
In this guide, you'll learn how to quickly deploy your Nextacular project over at Vercel. After successfully going through this guide, you'll feel confident in handling your own deployment.

Prerequisites

A Vercel account is required in order for us to successfully deploy our SaaS project. Head over to Vercel and create your account now.

Email

Check out our supported email providers here and how to set them up:

Authentication

As of v1.0.0, Email is our go-to authentication provider. Additional modification and setup will have to be done for other providers.
Visit NextAuth.js for additional setup of other providers.

Payment

As of v1.0.0, Stripe is our go-to payment provider. Additional modification and setup will have to be done for other payment providers.
You will need to set up an account with stripe and create the products.
Check out our supported payment providers here and how to set them up:

Database

Check out our supported database providers here and how to set them up:

Analytics

Check out our supported analytics providers here and how to set them up:

Steps

1. Deploy a Vercel Project

Create a Vercel Authorization Token

Prepare a Vercel Authorization Token in your account dashboard by clicking the "Create" button in the "Tokens" settings.

Create a Vercel Project

Create a new project in your Vercel dashboard by clicking the "+ New Project" button.

Import Git Repository

If this is your first time deploying a project in Vercel, connect your repository provider and authorize specific projects.
After authorizing repositories for deployment, click the "Import" button for your specific project.

Configure Project

Update your project configurations such as your Project Name.

Add Environment Variables

Set up your Environment Variables by adding the following values:
1
# App Configuration
2
APP_URL
3
NEXTAUTH_URL
4
NEXTAUTH_SECRET
5
6
# Database Configuration
7
DATABASE_URL
8
SHADOW_DATABASE_URL
9
10
# Email Configuration
11
EMAIL_FROM
12
EMAIL_SERVER_USER
13
EMAIL_SERVER_PASSWORD
14
EMAIL_SERVICE
15
16
# Payment Configuration (Stripe)
17
NEXT_PUBLIC_PUBLISHABLE_KEY
18
PAYMENTS_SECRET_KEY
19
PAYMENTS_SIGNING_SECRET
20
21
# Vercel Configuration
22
NEXT_PUBLIC_VERCEL_IP_ADDRESS
23
VERCEL_AUTH_BEARER_TOKEN
24
25
# Analytics Configuration
26
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID
Copied!
If you can't provide all of these environment variables, some expected functionality won't work.
  1. 1.
    App Configuration - authentication and application build will fail
  2. 2.
    Database Configuration - application build will fail and the database connection error will occur
  3. 3.
    Email Configuration - nodemailer will throw an error and sending of emails (ie. authentication) won't work
  4. 4.
    Payment Configuration - the project will still work, but errors in billing and product display pages will occur
  5. 5.
    Vercel Configuration - the project will still work, but errors in the domain configuration pages will occur
  6. 6.
    Analytics Configuration - the project will still work, but warnings and errors are thrown on the client's console
Please refer to this documentation for more details:

Deploy

Click the "Deploy" button and wait for the build to finish.
If you encounter any issues while building the project, please don't hesitate to raise them over at our Discord channel. (https://discord.gg/GnCnzWbzDT)

2. Domain Configuration

DNS Nameservers Migrated to Vercel

Select your project, and go to your settings page. On the left side, you'll be able to set your "Domains". Add the following domains here to allow multi-tenancy for your project:
  1. 1.
    yourdomain.com (Add yourdomain.com and redirect www.yourdomain.com to it – 2nd option)
  2. 2.
    *.yourdomain.com

3. Post Build Configuration

During this time, your application should have been built successfully, but we're not quite there yet. In order for us to have a fully-working application, we need to set up additional environment variables, most especially the ones associated with your Vercel account (which were created after the build happened).
The following Environment Variables should be added:
1
# Vercel Configuration
2
VERCEL_PROJECT_ID
3
VERCEL_TEAM_ID
4
5
# 3rd-Party Services Configuration
6
# If you intend to use third-party applications,
7
# this is the best time you should add them to your list of
8
# environment variables
Copied!