Documentation

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

  1. Open Terminal

    Press ⌘+Space, type “Terminal”, press Enter. All commands below run here, one line at a time.

  2. 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 -v prints a version.

  3. Install Node.js and PostgreSQL

    brew install node@22 postgresql@16
    brew link node@22
    brew services start postgresql@16

    What happened: Node.js runs SaleX; PostgreSQL is the database and now starts automatically at login.

    ✓ Success: node -v prints v22.x, and psql --version prints 16.x.

  4. 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.

  5. Install dependencies

    npm install

    ✓ Success: “added … packages” in 2–5 minutes. A node_modules folder appears.

  6. Create the environment file

    cp .env.example .env
    nano .env

    nano 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, use postgresql://USER:PASSWORD@localhost:5432/salex.
  7. Create the database

    createdb salex

    ✓ Success: no output and no error (silence is success here).

  8. 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_PASSWORD in .env before seeding.

  9. Start SaleX

    npm run dev

    ✓ Success: “Ready in …s”, Local: http://localhost:3000. Open it in your browser and sign in at /login with your admin account, then visit /admin.

Apple Silicon note All dependencies ship prebuilt binaries for M1/M2/M3/M4 Macs — no Rosetta or extra steps needed. If a native module ever fails to build, run xcode-select --install to add Apple's compiler tools.