Setting up the Next.js Firebase SaaS template
This section describes how to set up your development environment to use the Next.js Firebase SaaS template, from forking the repository to installing the Node modules
Initializing the Project
You have two ways to initialize the project:
- Forking it from GitHub, or
- Cloning it using Git
1. Forking the Repository
Fork this repository by clicking on the "Fork" button on the top right corner in GitHub for the repository you want to use.
Once you have forked the repository, clone it locally. Then, set the upstream repository to the original repository, so you can pull updates when needed:
git remote add upstream git@github.com:makerkit/next-firebase-saas-kit.git
2. Cloning the Repository
Alternatively, assuming you have accepted the invites and have access to the repository, open your terminal and run this command (replace tasks-app
with your name of choice):
git clone git@github.com:makerkit/next-firebase-saas-kit.git tasks-app
Once completed, we'll change into the tasks-app
directory, and then we will install the Node modules:
cd tasks-appnpm i
Reinitialize Git
As the Git repository's remote points to Makerkit's original repository, you can re-initialize (optionally!) it and set the Makerkit repository as upstream
:
git remote rm origin
Then, we set the Makerkit repository as upstream
:
git remote add upstream git@github.com:makerkit/next-firebase-saas-kit.gitgit add .git commit -a -m "Initial Commit"
By adding the Makerkit's repository as upstream
remote, you can fetch updates (after committing your files) by running the following command:
git pull upstream main --allow-unrelated-histories
Perfect! Now you can fire up your IDE and open the tasks-app
project we just created.