Installation
Everything needed to get the code, install all dependencies and run the project locally.
0. Prerequisites
Node.js (https://nodejs.org/en)
Node Version Manager (NVM)
With NVM (Node Version Manager), you can switch between different versions of Node.js and npm for different projects, ensuring that each project has the specific Node.js and npm environment it needs to run correctly. To install NVM on a Mac, you can use the curl command in your terminal:
After this close your terminal and open a new one. Verify the installation with:
This should display the version of NVM if the installation was successful.
Please note that the version (v0.38.0) in the URL may change as new versions of NVM are released. Be sure to check the NVM repository for the latest version.
Stripe account (https://dashboard.stripe.com/register)
Docker Desktop for local development (https://docs.docker.com/desktop/install/mac-install/)
Account data of an email service (not required for local development)
Gitlab account to clone the repository (https://gitlab.com/)
1. Clone the repository
After purchase, you will be added to a private git repository on gitlab and will have permissions to clone the zauberstack repo. You will need to have a GitLab account for this.
Via SSH
(If your SSH key isn't set - use HTTPS.)
Via HTTPS
Then, remove the original origin:
This command removes the origin
remote, which is the default name Git gives to the server from which you've cloned. The origin
remote typically points to the repository on the server that you cloned from.
Add upstream pointing to this repository so you can pull updates
This command adds a new remote called upstream
that points to the original repository. This is useful if you want to pull updates from the original repository, which is common when you're working on a fork of the repository.
To pull updates
This command pulls updates from the main
branch of the upstream
repository. If there have been any changes to the main
branch of the upstream
repository since you last pulled, this command will update your local repository with those changes.
2. Enable Corepack
Corepack is a Node.js tool that allows you to use the local yarn from the repository without the need to install yarn globally. Enable it with the following command:
Ensure you have Node.js v16.9.0 or later installed:
Then run:
You can verify that Corepack has been enabled by running:
3. Set node version
Run the following command to use the Node.js version specified in the .nvmrc of the repository:
3. Install dependencies
Use Yarn to install the project dependencies:
4. Create .env files
Run the following commands from the project root to create the .env files for the api (zauberapi) and the client (zauberweb):
In the .env of the api, insert these stripe keys:
Stripe Secret Key (https://dashboard.stripe.com/test/apikeys)
Stripe Webhook Secret
Create one here: https://dashboard.stripe.com/test/webhooks).After creation, go to the detail page of this hook and search "Signing secret" at the top.
5. Start docker services
Start the docker services required for local development with the following command in the project root:
The services consist of a postgres database and "mailhog" that can be used to test emails.
6. Initialize and seed database
Migrate and seed the database with the following command from the project root:
7. Start everything
Run the following command from the project root to start the entire zauberstack in development mode:
Webapp:
Marketing website:
Backend server:
Mailhog dashboard for email testing
Last updated