Documentation

Local Installation — Windows

Install and run SaleX on your Windows PC. Follow the steps in order — each one explains what you are doing, why, and what success looks like.

On this page

Before you start

You need about 30–45 minutes. Admin rights on the PC (for installing Node.js and PostgreSQL), and the SaleX package you downloaded from Codecanyon.

Prefer a hosted database? You can skip installing PostgreSQL locally by using a free hosted Postgres (for example Supabase or Neon). In that case skip step 2 and use the connection string your provider shows you in step 6. See Database & Storage.

The installation, step by step

  1. Install Node.js

    What/why: Node.js runs the application. SaleX needs version 20 or newer.

    Go to https://nodejs.org, download the LTS installer (.msi), and run it. Keep clicking “Next” — the defaults are fine. When asked, leave “Automatically install the necessary tools” unchecked (not required).

    Verify: open PowerShell (press Win, type “PowerShell”, press Enter) and run:

    node -v
    npm -v

    ✓ Success: version numbers like v22.11.0 and 10.9.0. If PowerShell says “not recognized”, close and reopen PowerShell, or restart the PC.

  2. Install PostgreSQL (skip if using a hosted database)

    What/why: PostgreSQL stores all SaleX data.

    Download the installer from https://www.postgresql.org/download/windows/, run it, and when asked for a password for the postgres user, write it down — you need it in step 6. Keep the default port 5432. The bundled pgAdmin tool is optional.

  3. Extract the SaleX package

    What/why: The downloaded file is a ZIP archive containing the source code.

    Right-click the ZIP → “Extract All…” → choose a simple path without spaces, e.g. C:\salex.

    Paths with spaces or non-English characters can break build tools. Use something like C:\salex, not C:\Users\Me\My Documents\SaleX Copy (1).
  4. Open the folder in a terminal

    What/why: All commands run inside the project folder.

    In File Explorer, open C:\salex, click the address bar, type powershell and press Enter. A PowerShell window opens already in that folder.

    ✓ Success: the prompt ends with C:\salex>.

  5. Install dependencies

    What/why: Downloads all libraries SaleX needs into a node_modules folder. One-time step (repeat after updates).

    npm install

    This takes 2–5 minutes and prints progress. Some “deprecation” warnings are normal.

    ✓ Success: ends with “added … packages” and no error lines. A node_modules folder now exists.

    If it fails: see the troubleshooting entry “npm install fails” in Troubleshooting — usually fixed by deleting node_modules and package-lock.json and re-running, or by upgrading Node.js to v20+.

  6. Create the environment file

    What/why: .env holds your private settings (database password, security keys).

    In PowerShell, still inside C:\salex:

    copy .env.example .env
    notepad .env

    Fill in at least these values (full reference: Environment Configuration):

    DATABASE_URL="postgresql://postgres:YOUR_PG_PASSWORD@localhost:5432/salex"
    DIRECT_URL="postgresql://postgres:YOUR_PG_PASSWORD@localhost:5432/salex"
    APP_URL="http://localhost:3000"
    AUTH_SECRET="paste-a-long-random-string-here"

    Generate a random string for AUTH_SECRET in PowerShell:

    -join ((48..57) + (65..90) + (97..122) | Get-Random -Count 48 | % {[char]$_})

    Save and close Notepad. Replace YOUR_PG_PASSWORD with the PostgreSQL password from step 2.

  7. Create the database and load the schema

    What/why: Creates an empty salex database, then creates all tables.

    Create the database (enter the postgres password when prompted):

    psql -U postgres -c "CREATE DATABASE salex;"

    If psql is “not recognized”, open “SQL Shell (psql)” from the Start menu instead and type the CREATE DATABASE line there, then close it. Then apply the schema:

    npm run db:deploy

    ✓ Success: Prisma prints the list of applied migrations and “migrations applied”-style output. Errors here almost always mean the DATABASE_URL is wrong — recheck the password.

  8. Load starter data (seed)

    what/why: Creates your first administrator account, settings, and demo content so the site is not empty.

    npm run db:seed

    The admin account comes from .env: set SEED_SUPER_ADMIN_EMAIL and SEED_SUPER_ADMIN_PASSWORD before running the seed (any plaintext dev password is hashed automatically). Details: First-Time Setup.

  9. Start the development server

    npm run dev

    ✓ Success: the terminal shows “Ready in …s” with a Local: http://localhost:3000 line. Leave this window open — the server stops when you close it.

  10. Open SaleX in the browser

    Visit http://localhost:3000 — the storefront loads. Sign in at http://localhost:3000/login with your seed admin email/password, then open http://localhost:3000/admin.

    Now complete the First-Time Setup checklist: store name, currency, shipping, payments.

After it runs

Never share your .env The .env file contains passwords and keys. When asking for support, share only the variable names you are unsure about — never its contents, and never your database password.