Vendure (NestJS/TypeScript) Installation and Setup

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1 servicesAll 2065 services
Vendure (NestJS/TypeScript) Installation and Setup
Medium
from 1 business day to 3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Installing and Configuring Vendure (NestJS/TypeScript)

Vendure installs via @vendure/create or manually. Manual installation is preferable for non-standard projects: need specific version, monorepo, or integration into existing NestJS project.

System Requirements

  • Node.js 18+ (20 LTS recommended)
  • PostgreSQL 12+ or MySQL 8+ (SQLite for development only)
  • Redis 6+ (for workers and sessions in production)

Installation via CLI

npx @vendure/create my-shop

Interactive wizard offers:

  • Database choice (PostgreSQL / MySQL / SQLite)
  • Populate with sample data
  • TypeScript or JavaScript

Result — working project with dev scripts.

Manual Installation (production-ready)

mkdir vendure-shop && cd vendure-shop
npm init -y
npm install @vendure/core @vendure/email-plugin @vendure/asset-server-plugin \
  @vendure/admin-ui-plugin @nestjs/core @nestjs/common \
  typeorm pg reflect-metadata ts-node typescript
npm install -D @types/node ts-node-dev
// tsconfig.json
{
  "compilerOptions": {
    "module": "commonjs",
    "target": "ES2020",
    "lib": ["ES2020"],
    "strict": true,
    "esModuleInterop": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "outDir": "dist",
    "sourceMap": true
  },
  "include": ["src"],
  "exclude": ["node_modules", "dist"]
}

Environment Variables

# .env
APP_ENV=development
SUPERADMIN_USERNAME=admin
SUPERADMIN_PASSWORD=changeme_in_production

DB_HOST=localhost
DB_PORT=5432
DB_NAME=vendure
DB_USER=vendure
DB_PASSWORD=vendure_secret

COOKIE_SECRET=your-32-char-secret-here

SMTP_HOST=smtp.mailgun.org
[email protected]
SMTP_PASS=smtp-password

ASSET_UPLOAD_DIR=/var/www/vendure/assets
SHOP_URL=https://shop.yourdomain.com
ADMIN_UI_URL=https://admin.yourdomain.com

Database Initialization and Migrations

# Generate first migration
npm run build
npx ts-node src/migration.ts generate src/migrations/InitialSchema

# Apply migrations
npx ts-node src/migration.ts run

Seed Initial Data

npx ts-node src/populate.ts

Running in Development

// package.json scripts
{
  "scripts": {
    "dev:server": "ts-node-dev --respawn --transpile-only src/index.ts",
    "dev:worker": "ts-node-dev --respawn --transpile-only src/worker.ts",
    "dev": "concurrently \"npm run dev:server\" \"npm run dev:worker\"",
    "build": "tsc",
    "start": "node dist/index.js",
    "start:worker": "node dist/worker.js",
    "migration:generate": "ts-node src/migration.ts generate",
    "migration:run": "ts-node src/migration.ts run"
  }
}

Production Deployment (Docker Compose)

# docker-compose.yml
version: "3.9"
services:
  postgres:
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: vendure
      POSTGRES_USER: vendure
      POSTGRES_PASSWORD: ${DB_PASSWORD}
    volumes:
      - pgdata:/var/lib/postgresql/data

  redis:
    image: redis:7-alpine
    volumes:
      - redisdata:/data

  vendure-server:
    build: .
    command: node dist/index.js
    env_file: .env.production
    ports:
      - "3000:3000"
    depends_on:
      - postgres
      - redis
    volumes:
      - assets:/app/static/assets

  vendure-worker:
    build: .
    command: node dist/worker.js
    env_file: .env.production
    depends_on:
      - postgres
      - redis
    volumes:
      - assets:/app/static/assets

volumes:
  pgdata:
  redisdata:
  assets:
# Dockerfile
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY --from=builder /app/dist ./dist
EXPOSE 3000

Nginx Reverse Proxy

server {
    listen 443 ssl;
    server_name shop.yourdomain.com;

    location /shop-api/ {
        proxy_pass http://vendure-server:3000/shop-api/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }

    location /assets/ {
        proxy_pass http://vendure-server:3000/assets/;
        expires 30d;
        add_header Cache-Control "public, immutable";
    }

    location /admin/ {
        proxy_pass http://vendure-server:3000/admin/;
    }
}

Post-Installation Checklist

  • Database created, migrations applied
  • Superadmin created (SUPERADMIN_USERNAME/PASSWORD in env)
  • Admin UI accessible at /admin
  • Shop API responds at /shop-api?
  • Assets directory has write permissions
  • SMTP configured (test: create order, check email)
  • Worker running as separate process
  • Redis connected (check worker logs)

Installation takes 4–8 hours with ready infrastructure (DB, Redis, CI/CD).