Skip to content

Getting Started

NickFlach edited this page Jul 24, 2026 · 2 revisions

Getting Started

Prerequisites

  • Node.js ≥ 18
  • PostgreSQL 15+
  • Docker & Docker Compose
  • Go 1.21+ (for the blockchain node)

Quick start

# Clone
git clone https://github.com/flaukowski/0xSCADA.git
cd 0xSCADA

# Install dependencies
npm install

# Database setup
npm run db:migrate

# Start development (server + client)
npm run dev

# …or bring up the full stack with Docker
docker compose up -d

Once running, the React dashboard streams live tags, alarms, and pipeline health over WebSocket, and the API gateway exposes REST + /metrics.

Development commands

# Server / client
npm run dev:server        # server with hot reload
npm run dev:client        # React dev server

# Database
npm run db:migrate        # run migrations
npm run db:seed           # seed development data

# Smart contracts
forge build               # Foundry build
forge test                # Foundry tests
npx hardhat compile       # Hardhat compile
npx hardhat test          # Hardhat tests

# Docker
docker compose up -d      # full stack
docker compose logs -f    # stream logs

# Kubernetes
helm install 0xscada helm/0xscada   # deploy via Helm

Toolchain note: contract tests run under Foundry (forge); the Hardhat path may lag. Prefer forge test for contracts.

Testing

npm test                  # unit tests
npm run test:integration  # integration tests
npm run test:chaos        # chaos-engineering suite

Before proposing changes, the project's convention is: npx tsc --noEmit clean and the relevant test project green. Every agent ready issue states the exact commands that prove it done — see For AI Agents.

The CLI

The 0xscada CLI covers day-to-day operations:

npx 0xscada agents      # manage AI agents
npx 0xscada alarms      # alarm management
npx 0xscada containers  # container orchestration
npx 0xscada db          # database operations
npx 0xscada gateway     # gateway management
npx 0xscada shell       # interactive shell
npx 0xscada tags        # tag-point management

Project layout

0xSCADA/
├── client/      # React dashboard UI (components, hooks, pages)
├── server/      # TypeScript API gateway
├── cli/         # CLI commands
├── contracts/   # Solidity smart contracts
├── blockchain/  # Custom chain (0x5CADA), go-ethereum fork
├── kernel/      # Linux 6.19-rc5 PREEMPT_RT fork
├── k8s/  helm/  # Kubernetes manifests + Helm charts
├── docker/      # Docker Compose + Dockerfiles
├── migrations/  # PostgreSQL migrations
├── shared/      # Shared types & utilities
├── docs/        # 90+ documentation files
└── test/        # Test suites

For production deployment (networking, storage, scheduling, security, GitOps), see the Kubernetes guides under docs/k8s/ and the Documentation Map.

Clone this wiki locally