Next.js Frontend Installation
Ensure that Node.js is installed. If not, refer to the Node.js Installation.
Getting Started with SaasCart Frontend
1. Open the Next.js Frontend Directory
Navigate to thenextjs-saascart-frontend
directory that you downloaded from SaasCart.
2. Configure next.config.js
- Open
next.config.js
in your code editor. - Adjust the URL settings as follows:
- Set
baseURL
to the main URL for your frontend, e.g., http://localhost:3000 or https://your-domain.com. - Set
URL
to your Laravel API server URL, e.g., http://127.0.0.1:8000/api or https://api.your-domain.com/api. - Set
storageURL
to the primary domain for Laravel, e.g., http://127.0.0.1:8000 or https://api.your-domain.com. - Add
api.your-domain.com
to the hostname for image access.
- Set
3. Install Node Modules
In thenextjs-saascart-frontend
folder, run the following command in the terminal to install dependencies:
4. Run the Project
After installing the necessary dependencies, start the project with the following command:Once you’ve completed the Next.js SaasCart frontend installation, the next step is to set up the Next.js SaasCart Admin. Follow the instructions in the Next.js Admin Installation.