Deploying SaasCart on Vercel

SaasCart Laravel API

Deploying the Laravel API directly on Vercel is not possible due to compatibility issues. We recommend hosting the API on a separate CPanel.

To set up the API on a CPanel, refer to the documentation for detailed instructions on configuring and installing the SaasCart API. Once the API is successfully hosted, proceed with deploying the frontend and admin on Vercel.


SaasCart Frontend & Admin Deployment on Vercel

Deployment steps on Vercel are the same for both the frontend and admin projects. This guide demonstrates the process using the frontend as an example.

1. Open the Frontend Directory

Navigate to the nextjs-saascart-frontend directory that you downloaded from SaasCart.

2. Configure Environment in next.config.js

  1. Open next.config.js in a code editor.
  2. Adjust the URL settings as follows:
    • baseURL: Set to the base URL for your frontend (e.g., https://store.your-domain.com).
    • URL: Set to your Laravel API server URL (e.g., https://api.your-domain.com/api).
    • storageURL: Set to the main domain for the Laravel API.
Replace store.your-domain.com and api.your-domain.com with your actual domain names or subdomains.

3. Install Vercel CLI

Install the Vercel CLI globally on your computer by running:

npm install -g vercel

4. Log in to Vercel

After installing the Vercel CLI, log in to Vercel by running:

vercel login

5. Deploy the Frontend

In the nextjs-saascart-frontend folder, deploy the project by running:

Vercel
🎉 Congratulations! SaasCart is now live on Vercel, and your Laravel API is set up on a CPanel. Verify the setup by accessing the URLs to ensure everything is working correctly.