NDSS CRM Manual / Chapter 2: System Requirements & Installation
V3.8 · 2024/2025

Chapter 2: System Requirements & Installation

Complete hardware specifications, software prerequisites, installation procedures, environment configuration, database setup, and deployment guides for the NDSS CRM platform.

Application Status: Live
18 extensions will be required:
Available Extensions (Inbuilt Package - 10) Required Extensions (18)
  • Redis (Session & Cache Store)
  • PM2 (Process Manager)
  • Nginx (Reverse Proxy & Load Balancing)
  • PostgreSQL/PostGIS (Spatial Database Extension)
  • RabbitMQ (Message Broker)
  • AWS S3 SDK (Object Storage)
  • Supabase / Oracle Realtime Extension
  • Certbot / SSL (Automated Certificates)
  • WebSockets / Socket.io
  • FFmpeg (Media Processing)
  • Bandwidth Extension expansion on every server
  • Winston (Logging & Transport)
  • Joi (Schema Validation)
  • CORS (Cross-Origin Resource Sharing)
  • Helmet (Security Headers)
  • Bcrypt (Password Hashing)
  • Axios (HTTP Client)
  • JWT (JSON Web Tokens)
  • Nodemailer (SMTP Email Transport)
  • Rate-Limiter-Flexible (DDoS Protection)
  • Prometheus (Metrics & Monitoring)
  • Docker (Containerization Runtime)
  • SCORM Duplicate Auto Converter
  • Multer (File Upload Handling)
  • Puppeteer (Headless PDF generation)
  • iOS/Android Config
  • OpenSSL (Data Encryption & TLS)
  • pgBackRest (Database Backup & Recovery)
Important Integration Note:
You must connect this manual to your software application backend and create a separate database for it. This allows the extension picker to dynamically detect, sync, and display the extensions that have been successfully installed on your application.

2.1 Hardware Requirements

NDSS CRM is a web-based application that runs on a server (or cloud hosting environment) and is accessed by end users through a web browser. The hardware requirements are divided into two categories: server-side (where the application is hosted) and client-side (the devices used by staff and participants to access the platform).

2.1.1 Server Requirements

The following specifications apply to self-hosted deployments. If you are using Vercel, AWS, or another cloud hosting provider, these requirements are managed by the provider and can be scaled dynamically.

Component Minimum Requirement Recommended Notes
CPU 16 vCPU cores 32+ vCPU cores Node.js is single-threaded per process but benefits from multiple cores for concurrent request handling via cluster mode. Python and PHP services require additional cores.
RAM 80 GB 256 GB – 1 TB Requirements mapped to support high-density processing, query caching, and peak batch operations across Oracle and PostgreSQL stacks.
Storage 80 GB Enterprise SSD 1+ TB SAN Storage grows significantly with document uploads, audit logs, and database scaling. High IOPS arrays strictly recommended.
Network 100 Mbps 1 Gbps Sufficient bandwidth for concurrent user sessions. Real-time subscriptions via Supabase / Oracle require persistent WebSocket connections.
Operating System Ubuntu 22.04 LTS, Debian 12, or macOS 13+ (development) Linux is recommended for production. Windows Server via WSL2 is supported but not recommended for production workloads.

2.1.2 Client (End User) Requirements

Component Minimum Requirement Notes
Device Any modern computer, tablet, or smartphone NDSS CRM is fully responsive and works on desktop (1024px+), tablet (768px+), and mobile (360px+) viewports.
Screen Resolution 1280 x 720 (desktop) / 360 x 640 (mobile) Optimised for 1920 x 1080 and above. Sidebar collapses automatically on smaller screens.
RAM 2 GB 4 GB or more recommended for optimal browser performance with multiple tabs open.
Internet Connection 5 Mbps download / 1 Mbps upload A stable internet connection is required. Real-time features (notifications, messaging) use WebSocket connections.
JavaScript Enabled JavaScript must be enabled in the browser. NDSS CRM is a React-based single-page application that requires JavaScript to function.

2.2 Software Prerequisites

The following software must be installed on the development or server machine before NDSS CRM can be built and run. All version numbers represent the minimum supported version.

Software Minimum Version Recommended Version Purpose Installation
Node.js 18.17.0 20.x LTS JavaScript runtime for Next.js server and build tooling. nodejs.org or nvm
npm 9.0.0 10.x Node.js package manager. Ships with Node.js. Included with Node.js
Yarn (optional) 1.22.0 4.x (Berry) Alternative package manager with workspace support. npm install -g yarn
Python 3.10.0 3.12.x Backend microservices for data processing, report generation, batch operations, and complex computational tasks. python.org or pyenv
pip 22.0 24.x Python package manager for installing Python dependencies. Included with Python
PHP 8.1.0 8.3.x Integration modules for legacy NDIS provider systems, third-party PHP-based APIs, and data exchange format compatibility layers. apt install php8.3 or php.net
Composer 2.5.0 2.7.x PHP dependency manager for installing PHP integration packages. getcomposer.org
PostgreSQL 15.0 16.x Primary relational database. Required for local development. In production, Supabase / Oracle provides a managed PostgreSQL instance. postgresql.org
Git 2.30.0 2.44.x Version control for cloning and managing the repository. git-scm.com
Supabase / Oracle CLI 1.100.0 Latest Local development tooling for Supabase / Oracle (database migrations, auth emulation, storage). npm install -g supabase

2.2.1 Verifying Prerequisites

Run the following commands to verify that all required software is installed and meets the minimum version requirements:

# Node.js and npm
$ node --version
v20.11.0

$ npm --version
10.2.4

# Python
$ python3 --version
Python 3.12.2

$ pip3 --version
pip 24.0 from /usr/lib/python3/dist-packages/pip (python 3.12)

# PHP
$ php --version
PHP 8.3.4 (cli) (built: Mar 16 2024 00:00:00)

$ composer --version
Composer version 2.7.1 2024-02-09

# PostgreSQL
$ psql --version
psql (PostgreSQL) 16.2

# Git
$ git --version
git version 2.44.0

# Supabase / Oracle CLI
$ supabase --version
1.142.2
Version Compatibility

NDSS CRM is tested against the specific versions listed above. Using older versions may result in build failures or runtime errors. Using newer major versions (e.g., Node.js 22.x) should work but is not officially tested until the next NDSS CRM release. Always check the release notes for version compatibility updates.

2.3 Browser Compatibility

NDSS CRM is a modern web application built with React 19 and Next.js 16. It requires a recent version of a major web browser. The following table shows the compatibility matrix across supported browsers and operating systems.

Browser Minimum Version Windows macOS Linux iOS Android Notes
Google Chrome 110+ Yes Yes Yes Yes Yes Primary tested browser. Recommended for best experience.
Mozilla Firefox 110+ Yes Yes Yes Yes Yes Fully supported. ESR (Extended Support Release) 115+ also supported.
Apple Safari 16.4+ N/A Yes N/A Yes N/A Required for iOS devices. WebSocket support verified from Safari 16.4+.
Microsoft Edge 110+ Yes Yes Yes N/A Yes Chromium-based Edge. Legacy Edge (EdgeHTML) is not supported.
Samsung Internet 20+ N/A N/A N/A N/A Yes Chromium-based. Supported for Samsung device users.
Internet Explorer - No N/A N/A N/A N/A Not supported. Internet Explorer has been retired by Microsoft.

2.3.1 Required Browser Features

NDSS CRM relies on the following browser capabilities. All listed browsers (at the minimum versions above) support these features:

  • ES2022+ JavaScript: Modern JavaScript features including optional chaining, nullish coalescing, top-level await, and private class fields.
  • CSS Grid & Flexbox: Used extensively for responsive layouts throughout the application.
  • WebSocket: Required for real-time notifications, messaging, and live data updates via Supabase / Oracle real-time channels.
  • Fetch API: Used for all HTTP requests to the Supabase / Oracle backend.
  • localStorage / sessionStorage: Used for caching user preferences and session state.
  • Service Workers: Used for offline notification support and PWA functionality (v1.1.0+).
  • CSS Custom Properties: Used for theming and dynamic style customisation.
Automatic Browser Detection

NDSS CRM includes a browser compatibility check that runs on application load. If a user attempts to access the platform with an unsupported browser, they will see a notification recommending they upgrade to a supported version. This check can be disabled by administrators in Admin → Settings → Browser Compatibility.

2.4 Installation Guide

This section provides a complete, step-by-step guide for installing NDSS CRM on a local development machine. For production deployment, see Section 2.7: Deployment Guide.

2.4.1 Step 1: Clone the Repository

# Clone the NDSS CRM repository
$ git clone https://github.com/newdawn-support/newdawnss.git

# Navigate to the project directory
$ cd newdawnss

# Verify the repository structure
$ ls -la
drwxr-xr-x  src/
drwxr-xr-x  public/
drwxr-xr-x  supabase/
drwxr-xr-x  scripts/
drwxr-xr-x  services/
-rw-r--r--  package.json
-rw-r--r--  next.config.ts
-rw-r--r--  tailwind.config.ts
-rw-r--r--  tsconfig.json
-rw-r--r--  .env.example
-rw-r--r--  requirements.txt
-rw-r--r--  composer.json

2.4.2 Step 2: Install Node.js Dependencies

# Using npm (recommended)
$ npm install

# OR using Yarn
$ yarn install

# Verify installation
$ npm ls --depth=0
newdawnss@V3.8
+-- @radix-ui/react-accordion@1.2.0
+-- @radix-ui/react-alert-dialog@1.1.0
+-- @radix-ui/react-checkbox@1.1.0
+-- @radix-ui/react-dialog@1.1.0
+-- @radix-ui/react-dropdown-menu@2.1.0
+-- @radix-ui/react-label@2.1.0
+-- @radix-ui/react-popover@1.1.0
+-- @radix-ui/react-select@2.1.0
+-- @radix-ui/react-tabs@1.1.0
+-- @radix-ui/react-tooltip@1.1.0
+-- @supabase/supabase-js@2.45.0
+-- @tanstack/react-query@5.50.0
+-- next@16.0.0
+-- react@19.0.0
+-- react-dom@19.0.0
+-- react-hook-form@7.52.0
+-- tailwindcss@3.4.0
+-- typescript@5.5.0
+-- zod@3.23.0
+-- zustand@4.5.0
... and 127 more

2.4.3 Step 3: Install Python Dependencies

# Create a Python virtual environment
$ python3 -m venv venv

# Activate the virtual environment
$ source venv/bin/activate   # Linux/macOS
$ .\venv\Scripts\activate    # Windows

# Install Python dependencies
(venv) $ pip install -r requirements.txt

# Key Python packages installed:
# - psycopg2-binary==2.9.9      (PostgreSQL adapter)
# - pandas==2.2.1                (Data manipulation)
# - openpyxl==3.1.2              (Excel report generation)
# - reportlab==4.1.0             (PDF report generation)
# - fastapi==0.110.0             (API microservice framework)
# - uvicorn==0.29.0              (ASGI server)
# - pydantic==2.6.4              (Data validation)
# - python-dotenv==1.0.1         (Environment variable loading)

# Verify installation
(venv) $ python3 -c "import pandas; print(pandas.__version__)"
2.2.1

2.4.4 Step 4: Install PHP Dependencies

# Install PHP dependencies via Composer
$ composer install

# Key PHP packages installed:
# - guzzlehttp/guzzle: ^7.8      (HTTP client for API integrations)
# - vlucas/phpdotenv: ^5.6        (Environment variable loading)
# - monolog/monolog: ^3.5         (Logging framework)
# - league/csv: ^9.15             (CSV data processing)
# - firebase/php-jwt: ^6.10       (JWT token handling)

# Verify installation
$ php -r "require 'vendor/autoload.php'; echo 'PHP dependencies loaded successfully.\n';"
PHP dependencies loaded successfully.

2.4.5 Step 5: Configure Environment Variables

# Copy the example environment file
$ cp .env.example .env.local

# Open .env.local in your editor and configure the required variables
$ nano .env.local    # or use your preferred editor

See Section 2.5 for a complete listing of all environment variables.

2.4.6 Step 6: Set Up the Database

# Option A: Using Supabase / Oracle CLI (recommended for development)
$ supabase init
$ supabase start

# This starts local Supabase / Oracle services:
#   - PostgreSQL on port 54322
#   - Auth on port 54321
#   - Storage on port 54321
#   - Realtime on port 54321

# Run database migrations
$ supabase db push

# Seed the database with initial data
$ supabase db seed

# Option B: Using a standalone PostgreSQL instance
$ createdb newdawnss_dev
$ psql newdawnss_dev < supabase/migrations/00001_initial_schema.sql
$ psql newdawnss_dev < supabase/seed.sql

See Section 2.6 for detailed database setup instructions.

2.4.7 Step 7: Start the Development Server

# Start the Next.js development server
$ npm run dev

  ▲ Next.js 16.0.0
  - Local:        http://localhost:3000
  - Environments: .env.local
  - Experiments:  (none)
  - Ready in 2.4s

# In a separate terminal, start the Python microservice
$ source venv/bin/activate
(venv) $ uvicorn services.main:app --port 8001 --reload

INFO:     Uvicorn running on http://127.0.0.1:8001
INFO:     Started reloader process

# In a third terminal, start the PHP integration service (if needed)
$ php -S localhost:8002 -t services/php/public

PHP Development Server started at http://localhost:8002

2.4.8 Step 8: Build for Production

# Create a production build
$ npm run build

  ▲ Next.js 16.0.0
  Creating an optimized production build ...
  ✓ Compiled successfully
  ✓ Linting and type checking
  ✓ Collecting page data
  ✓ Generating static pages (42/42)
  ✓ Collecting build traces
  ✓ Finalizing page optimization

  Route (app)                              Size     First Load JS
  ┌ ○ /                                    5.2 kB   89.4 kB
  ├ ○ /(auth)/login                        3.8 kB   87.9 kB
  ├ ○ /(auth)/signup                       4.1 kB   88.3 kB
  ├ ○ /(dashboard)/dashboard               8.7 kB   92.8 kB
  ├ ○ /(dashboard)/clients                 12.3 kB  96.4 kB
  ├ ○ /(dashboard)/staff                   9.8 kB   93.9 kB
  └ ... 36 more routes

  ○  (Static)   prerendered as static content
  ●  (SSG)      prerendered as static HTML

# Start the production server
$ npm start

  ▲ Next.js 16.0.0
  - Local:   http://localhost:3000
  - Ready in 1.1s
Critical: Environment Variables

Never commit .env.local or any .env file containing secrets to version control. The repository includes a .env.example file with placeholder values. Ensure your .gitignore includes .env* (excluding .env.example). Exposing Supabase / Oracle service role keys or database credentials in a public repository is a critical security vulnerability.

2.5 Environment Configuration

NDSS CRM uses environment variables for all configuration that varies between environments (development, staging, production). These variables are loaded from a .env.local file during development and from the hosting platform's environment variable system in production.

2.5.1 Supabase / Oracle Configuration

Variable Required Example Value Description
NEXT_PUBLIC_SUPABASE_URL Yes https://xxxxx.supabase.co The URL of your Supabase / Oracle project. Found in your Supabase / Oracle project dashboard under Settings → API. This is a public variable exposed to the browser.
NEXT_PUBLIC_SUPABASE_ANON_KEY Yes eyJhbGciOiJIUzI1NiIs... The anonymous (public) API key for your Supabase / Oracle project. Used for client-side authentication and data access governed by Row-Level Security (RLS) policies.
SUPABASE_SERVICE_ROLE_KEY Yes eyJhbGciOiJIUzI1NiIs... The service role key with full database access, bypassing RLS. Used only in server-side operations (API routes, migrations). Never expose this to the client.
SUPABASE_JWT_SECRET Optional your-jwt-secret-key JWT secret for verifying Supabase / Oracle tokens in custom middleware. Required only for advanced token validation scenarios.

2.5.2 Database Configuration

Variable Required Example Value Description
DATABASE_URL Yes postgresql://postgres:password@localhost:54322/postgres PostgreSQL connection string. Used by Python services and database migration tools. Includes host, port, database name, username, and password.
DIRECT_URL Optional postgresql://postgres:password@db.xxxxx.supabase.co:5432/postgres Direct database connection URL bypassing connection pooling. Required for database migrations in some deployment configurations.

2.5.3 Application Configuration

Variable Required Example Value Description
NEXT_PUBLIC_APP_URL Yes http://localhost:3000 The base URL of the NDSS CRM application. Used for generating absolute URLs in emails, notifications, and API responses.
NEXT_PUBLIC_APP_NAME Optional NDSS CRM Display name of the application. Used in the browser title, email templates, and notification messages.
NODE_ENV Yes development Node.js environment. Set to development, staging, or production. Controls debug logging, error verbosity, and build optimisations.
PYTHON_SERVICE_URL Optional http://localhost:8001 URL of the Python microservice for data processing and report generation. Required if Python services are enabled.
PHP_SERVICE_URL Optional http://localhost:8002 URL of the PHP integration service. Required only when interfacing with legacy PHP-based systems.

2.5.4 Email & Notification Configuration

Variable Required Example Value Description
SMTP_HOST Optional smtp.sendgrid.net SMTP server hostname for transactional email delivery (password resets, notifications, reports).
SMTP_PORT Optional 587 SMTP server port. Use 587 for TLS or 465 for SSL.
SMTP_USER Optional apikey SMTP authentication username.
SMTP_PASS Optional SG.xxxxxxxxxxxx SMTP authentication password or API key.
SMTP_FROM Optional noreply@newdawnss.com.au The "From" email address for outgoing emails.
SMS_PROVIDER Optional twilio SMS provider for shift notifications and alerts. Supported: twilio, messagebird.
SMS_API_KEY Optional AC1234567890abcdef API key or SID for the configured SMS provider.
SMS_API_SECRET Optional auth_token_here API secret or auth token for the configured SMS provider.

2.5.5 Complete Example .env.local

# ============================================
# NDSS CRM Environment Configuration
# ============================================

# --- Supabase / Oracle ---
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

# --- Database ---
DATABASE_URL=postgresql://postgres:postgres@127.0.0.1:54322/postgres

# --- Application ---
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_APP_NAME=NDSS CRM
NODE_ENV=development

# --- Services ---
PYTHON_SERVICE_URL=http://localhost:8001
PHP_SERVICE_URL=http://localhost:8002

# --- Email (optional for local dev) ---
# SMTP_HOST=smtp.sendgrid.net
# SMTP_PORT=587
# SMTP_USER=apikey
# SMTP_PASS=SG.xxxxxxxxxxxx
# SMTP_FROM=noreply@newdawnss.com.au

# --- SMS (optional for local dev) ---
# SMS_PROVIDER=twilio
# SMS_API_KEY=ACxxxxxxxxxxxxxxxx
# SMS_API_SECRET=xxxxxxxxxxxxxxxx

2.6 Database Setup

NDSS CRM uses PostgreSQL as its primary database, accessed through Supabase / Oracle. This section covers local database setup for development, cloud database configuration for production, and database migration management.

2.6.1 Local Development with Supabase / Oracle CLI

The Supabase / Oracle CLI provides a complete local development environment that mirrors the production Supabase / Oracle setup. This is the recommended approach for development.

# Initialise Supabase / Oracle (first time only)
$ supabase init

# Start local Supabase / Oracle services
$ supabase start

  Started supabase local development setup.

           API URL: http://127.0.0.1:54321
       GraphQL URL: http://127.0.0.1:54321/graphql/v1
            DB URL: postgresql://postgres:postgres@127.0.0.1:54322/postgres
        Studio URL: http://127.0.0.1:54323
      Inbucket URL: http://127.0.0.1:54324
        JWT secret: super-secret-jwt-token
          anon key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
  service_role key: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

2.6.2 Running Migrations

Database migrations are stored in the supabase/migrations/ directory and are applied in chronological order.

# Apply all pending migrations
$ supabase db push

Applying migration 00001_initial_schema.sql...done
Applying migration 00002_rls_policies.sql...done
Applying migration 00003_seed_roles.sql...done
Applying migration 00004_client_tables.sql...done
Applying migration 00005_staff_tables.sql...done
Applying migration 00006_rostering_tables.sql...done
Applying migration 00007_finance_tables.sql...done
Applying migration 00008_compliance_tables.sql...done
Applying migration 00009_clinical_tables.sql...done
Applying migration 00010_messaging_tables.sql...done

All migrations applied successfully.

# Create a new migration
$ supabase migration new add_training_module
Created new migration: supabase/migrations/20260404120000_add_training_module.sql

# Reset the database (destroys all data)
$ supabase db reset

2.6.3 Database Seeding

# Seed with sample data for development
$ supabase db seed

Seeding database...
  - 3 admin users created
  - 24 role definitions inserted
  - 50 sample clients created
  - 30 sample staff members created
  - 200 sample shifts created
  - 100 sample invoices created
  - 15 sample incidents created
  Done.

2.6.4 Supabase / Oracle Studio

Supabase / Oracle Studio is a web-based database management interface available at http://127.0.0.1:54323 during local development. It provides a visual table editor, SQL query runner, authentication user management, and storage bucket management. This is useful for inspecting data during development without writing SQL queries.

2.6.5 Production Database (Supabase / Oracle Cloud)

For production deployments, create a Supabase / Oracle Cloud project:

  1. Navigate to supabase.com and create an account or sign in.
  2. Click New Project and select your organisation.
  3. Enter a project name (e.g., newdawnss-production).
  4. Set a strong database password and store it securely.
  5. Select the Australia (Sydney) region for Australian data residency compliance.
  6. Click Create new project and wait for provisioning to complete.
  7. Navigate to Settings → API to obtain your project URL, anon key, and service role key.
  8. Link your local project to the cloud project: supabase link --project-ref your-project-ref
  9. Push migrations to production: supabase db push --linked
Data Residency

For NDIS compliance, ensure your Supabase / Oracle project is hosted in the Australia (Sydney) - ap-southeast-2 region. This ensures all participant data remains within Australian borders as required by the Australian Privacy Act 1988 and NDIS data handling guidelines.

2.7 Deployment Guide

NDSS CRM supports multiple deployment strategies. Choose the one that best fits your organisation's infrastructure, technical capabilities, and compliance requirements.

2.7.1 Vercel Deployment (Recommended)

Vercel is the recommended hosting platform for NDSS CRM's Next.js frontend. It provides automatic builds, global CDN distribution, preview deployments, and native Next.js optimisations.

  1. Push your NDSS CRM repository to GitHub, GitLab, or Bitbucket.
  2. Navigate to vercel.com and sign in with your Git provider.
  3. Click Import Project and select the NDSS CRM repository.
  4. Configure the project settings:
    • Framework Preset: Next.js (auto-detected)
    • Build Command: npm run build
    • Output Directory: .next
    • Install Command: npm install
  5. Add all required environment variables (see Section 2.5) in the Vercel project settings under Settings → Environment Variables.
  6. Click Deploy. Vercel will build and deploy the application.
  7. Configure a custom domain in Settings → Domains (e.g., app.newdawnss.com.au).
# Deploy via Vercel CLI (alternative)
$ npm install -g vercel
$ vercel login
$ vercel --prod

Vercel CLI 33.5.0
🔗 Linked to newdawn/newdawnss
🔍 Inspect: https://vercel.com/newdawn/newdawnss/xxxxx
✅ Production: https://newdawnss.vercel.app

2.7.2 Docker Deployment

NDSS CRM includes a multi-stage Dockerfile for containerised deployments.

# Build the Docker image
$ docker build -t newdawnss:latest .

# Run the container
$ docker run -d \
  --name newdawnss \
  -p 3000:3000 \
  -e NEXT_PUBLIC_SUPABASE_URL=https://xxxxx.supabase.co \
  -e NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbG... \
  -e SUPABASE_SERVICE_ROLE_KEY=eyJhbG... \
  -e DATABASE_URL=postgresql://... \
  -e NEXT_PUBLIC_APP_URL=https://app.newdawnss.com.au \
  newdawnss:latest

# Verify the container is running
$ docker ps
CONTAINER ID   IMAGE             STATUS          PORTS
abc123def456   newdawnss:latest   Up 10 seconds   0.0.0.0:3000->3000/tcp

Docker Compose (Full Stack)

# docker-compose.yml
version: '3.8'
services:
  app:
    build: .
    ports:
      - "3000:3000"
    env_file: .env.production
    depends_on:
      - python-service
      - php-service

  python-service:
    build:
      context: .
      dockerfile: services/python/Dockerfile
    ports:
      - "8001:8001"
    env_file: .env.production

  php-service:
    build:
      context: .
      dockerfile: services/php/Dockerfile
    ports:
      - "8002:8002"
    env_file: .env.production

# Start all services
$ docker-compose up -d

2.7.3 Traditional Server Deployment

For organisations that prefer traditional server deployments (e.g., on an Ubuntu VPS or dedicated server):

# 1. Install system dependencies
$ sudo apt update && sudo apt upgrade -y
$ sudo apt install -y curl git build-essential

# 2. Install Node.js via nvm
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
$ source ~/.bashrc
$ nvm install 20
$ nvm use 20

# 3. Install Python 3.12
$ sudo apt install -y python3.12 python3.12-venv python3-pip

# 4. Install PHP 8.3
$ sudo apt install -y php8.3 php8.3-cli php8.3-curl php8.3-mbstring php8.3-xml
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer

# 5. Clone and build
$ git clone https://github.com/newdawn-support/newdawnss.git /opt/newdawnss
$ cd /opt/newdawnss
$ npm install
$ pip install -r requirements.txt
$ composer install
$ cp .env.example .env.local
$ nano .env.local   # Configure environment variables
$ npm run build

# 6. Set up PM2 for process management
$ npm install -g pm2
$ pm2 start npm --name newdawnss -- start
$ pm2 start services/python/main.py --name newdawnss-python --interpreter python3
$ pm2 startup
$ pm2 save

# 7. Configure Nginx reverse proxy
$ sudo apt install -y nginx
$ sudo nano /etc/nginx/sites-available/newdawnss

Nginx Configuration

server {
    listen 80;
    server_name app.newdawnss.com.au;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_cache_bypass $http_upgrade;
    }

    location /api/python/ {
        proxy_pass http://127.0.0.1:8001/;
    }

    location /api/php/ {
        proxy_pass http://127.0.0.1:8002/;
    }
}

# Enable the site and configure SSL
$ sudo ln -s /etc/nginx/sites-available/newdawnss /etc/nginx/sites-enabled/
$ sudo nginx -t
$ sudo systemctl restart nginx
$ sudo certbot --nginx -d app.newdawnss.com.au

2.8 Post-Installation Verification

After completing the installation, run through the following checklist to verify that all components are functioning correctly.

# Verification Step Expected Result Status
1 Application loads Navigate to http://localhost:3000 (or your production URL). The login page should render with the NDSS CRM logo, role selector, email and password fields. Pass
2 Database connection The login page loads without "Failed to connect to database" errors in the browser console or server logs. Pass
3 User registration Navigate to the signup page and create a test account. The user should be created in both Supabase / Oracle Auth and the profiles table. Pass
4 User login Log in with the test account. The user should be redirected to the role-appropriate dashboard. Pass
5 Sidebar navigation The sidebar should display only the modules accessible to the logged-in user's role. Clicking each link should navigate to the correct page. Pass
6 Real-time notifications Open two browser sessions with different users. Perform an action (e.g., create a client) in one session and verify the notification appears in the other session within 2 seconds. Pass
7 Python service Navigate to http://localhost:8001/health. The response should be {"status": "healthy"}. Pass
8 PHP service Navigate to http://localhost:8002/health. The response should be {"status": "healthy"}. Pass
9 Database migrations Run supabase migration list. All migrations should show status "Applied". Pass
10 SSL certificate (production) Access the production URL via HTTPS. The browser should show a valid SSL certificate with no warnings. Pass
Troubleshooting

If any verification step fails, consult Chapter 21: Troubleshooting & FAQ for common issues and their resolutions. The most common installation problems are incorrect environment variables, database connection issues, and port conflicts with existing services.

Demo Mode

After successful installation, you can enable Demo Mode by setting NEXT_PUBLIC_DEMO_MODE=true in your environment variables. This pre-populates the login form and allows quick access for testing and demonstrations. See Chapter 4, Section 4.7 for details.

← Chapter 1: Introduction & Overview Chapter 3: Architecture & Tech Stack →