Getting Started
Learn how to set up and run your directory website in minutes
This guide will walk you through setting up MkSaaS. We will go through the process of cloning the project, installing dependencies, setting up your database and running the local development server.
Prerequisites
Before you begin, make sure you have the following installed:
Node.js
Node.js is a runtime environment that allows you to run JavaScript code.
If you don't have Node.js installed, download it from the Node.js official website.
# Check if Node.js is installed
node --versionGit
Git is a version control system that is used to track changes in any file.
If Git is not installed, download it from the Git official website.
# Check if Git is installed
git --versionPackage manager
Package manager is a tool that is used to manage dependencies in your project.
We recommend using pnpm, but you can use npm, yarn or bun as well.
# Install pnpm if you haven't already
npm install -g pnpm
# Check pnpm version
pnpm --versionQuick Installation
Set up your project
There are many ways to download the source code of MkSaaS. We'll cover some of the most common ones below. Choose the one that best suits your needs.
We recommend forking the GitHub repository to get started.
When you visit the GitHub repository, you will see a "Fork" button in the top right corner. Clicking on it will create a copy of the MkSaaS repository in your GitHub account, please keep this repository private.
Once you have forked the repository, you can clone your fork to your local machine:
git clone https://github.com/your-username/mksaas-template.git your-project-name
cd your-project-nameYou can also clone the repository directly from GitHub.
git clone https://github.com/MkSaaSHQ/mksaas-template.git your-project-name
cd your-project-name
git remote remove originIf you prefer, you can download the source code as a ZIP file from GitHub. Visit the repository page and click on the "Code" button, then "Download ZIP".
After downloading, extract the ZIP file to your desired location and navigate to the extracted directory in your terminal.
About forking the repository
- Full History: You maintain the full commit history of the project.
- Easy Updates: You can easily pull updates from the original repository using pull requests.
- Contribution Ready: If you want to contribute, your fork is already set up for that.
- Only One Fork: You can only have one fork of the repository, but you can clone the repository multiple times, so you can build multiple websites based on the template.
If you want to be able to pull updates from the MkSaaS template repository, you can add the upstream remote, this will allow for an easier update process from the MkSaaS repository.
git remote add upstream https://github.com/MkSaaSHQ/mksaas-template.gitInstall dependencies
Install the dependencies by running the following command:
pnpm installnpm installyarn installbun installSet up environment variables
MkSaaS uses environment variables to configure the project. You can set them in the .env file, so first copy the env.example file to .env to have a starting point.
cp env.example .envThen, open the .env file and set the variables to your desired values. You can find more information about the environment variables in the Environment Setup guide.
Start the development server
Now that you have the database set up, you can start the development server by running the following command:
pnpm run devnpm run devyarn devbun run devThis will start the development server on http://localhost:3000 and you can access the template website.
Video Tutorial
Next Steps
Now that you have MkSaaS running, here are some next steps:
MkSaaS Docs