Local Installation — macOS
Install and run SaleX on your Mac. The steps mirror the Windows guide; terminal commands are identical once the tools are installed.
On this page
Before you start
Allow 30–45 minutes. You need the ability to install apps (admin account), and the SaleX package from Codecanyon.
The installation, step by step
-
Open Terminal
Press ⌘+Space, type “Terminal”, press Enter. All commands below run here, one line at a time.
-
Install Homebrew (the macOS package manager)
What/why: Homebrew installs Node.js and PostgreSQL with single commands.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Follow the prompts (it may ask for your Mac password and to run two extra lines it prints at the end — copy those into the terminal as instructed).
✓ Success:
brew -vprints a version. -
Install Node.js and PostgreSQL
brew install node@22 postgresql@16 brew link node@22 brew services start postgresql@16What happened: Node.js runs SaleX; PostgreSQL is the database and now starts automatically at login.
✓ Success:
node -vprints v22.x, andpsql --versionprints 16.x. -
Extract and open the project
Double-click the SaleX ZIP to extract it (or run
unzip ~/Downloads/salex.zip -d ~/salex). Then:cd ~/salex✓ Success: the terminal prompt now shows
salex. -
Install dependencies
npm install✓ Success: “added … packages” in 2–5 minutes. A
node_modulesfolder appears. -
Create the environment file
cp .env.example .env nano .envnano is a simple terminal text editor: move with arrow keys, save with Ctrl+O then Enter, exit with Ctrl+X. Fill in:
DATABASE_URL="postgresql://$(whoami)@localhost:5432/salex" DIRECT_URL="postgresql://$(whoami)@localhost:5432/salex" APP_URL="http://localhost:3000" AUTH_SECRET="paste-a-long-random-string-here"On macOS, Homebrew's PostgreSQL uses your Mac username as the default superuser with no password — the$(whoami)above inserts it automatically. If you created a password during a custom install, usepostgresql://USER:PASSWORD@localhost:5432/salex. -
Create the database
createdb salex✓ Success: no output and no error (silence is success here).
-
Apply the schema and seed
npm run db:deploy npm run db:seed✓ Success: Prisma lists applied migrations; the seed prints the created admin email (from SEED_SUPER_ADMIN_EMAIL in .env) and demo content. Set
SEED_SUPER_ADMIN_EMAIL/SEED_SUPER_ADMIN_PASSWORDin .env before seeding. -
Start SaleX
npm run dev✓ Success: “Ready in …s”, Local:
http://localhost:3000. Open it in your browser and sign in at/loginwith your admin account, then visit/admin.
xcode-select --install to add Apple's compiler tools.