// Local AI South Africa — indicative pricing and recommendation data.
// Keep volatile prices here so the public guide can be refreshed without
// rewriting page components.

const LOCAL_AI_LAST_VERIFIED = '17 July 2026';

const LOCAL_AI_TIERS = [
  {
    id: 'private-office',
    num: '01',
    label: 'Private office',
    name: 'Private Office Node',
    infrastructureCost: 'R60k–R85k',
    hardwareCost: 'R46k–R53k base hardware',
    hardware: 'Mac mini M4 Pro · 64GB unified memory',
    capacity: '64GB',
    power: 'Low draw',
    users: '1–5 users',
    modelClass: '35B-class Q4 text models',
    summary: 'A quiet, low-power node for private document search, drafting and internal knowledge work in a small office or branch.',
    bestFor: ['Legal and accounting', 'Consulting teams', 'Private document assistants'],
  },
  {
    id: 'team-appliance',
    num: '02',
    label: 'Team appliance',
    name: 'Team AI Appliance',
    infrastructureCost: 'R130k–R175k',
    hardwareCost: 'R104,999 base hardware',
    hardware: 'NVIDIA DGX Spark · 128GB unified memory · 4TB',
    capacity: '128GB',
    power: 'Efficient',
    users: '3–15 users',
    modelClass: 'Large local models and NVIDIA AI tooling',
    summary: 'A compact Linux and NVIDIA appliance for shared private AI, larger models, prototyping, data science and edge-development work.',
    bestFor: ['Clinics and universities', 'Operations knowledge', 'AI and edge development'],
  },
  {
    id: 'throughput',
    num: '03',
    label: 'Throughput',
    name: 'Throughput Workstation',
    infrastructureCost: 'R150k–R220k',
    hardwareCost: 'R64k–R75k GPU budget',
    hardware: 'NVIDIA GeForce RTX 5090 · 32GB VRAM',
    capacity: '32GB VRAM',
    power: 'High draw',
    users: '5–30 users',
    modelClass: 'Fast small-to-medium models, voice and image',
    summary: 'The speed-first option for classification, customer support, transcription, image generation and other high-volume workloads.',
    bestFor: ['Contact centres', 'Retail and ecommerce', 'Media and engineering'],
  },
  {
    id: 'enterprise',
    num: '04',
    label: 'Enterprise',
    name: 'Enterprise AI Node',
    infrastructureCost: 'R360k–R550k',
    hardwareCost: 'R243,999 GPU budget',
    hardware: 'NVIDIA RTX PRO 6000 Blackwell · 96GB ECC',
    capacity: '96GB ECC',
    power: 'High draw',
    users: 'Shared service',
    modelClass: 'Large models, controlled concurrency and ECC',
    summary: 'A governed workstation or server node when larger VRAM, ECC memory, warranty coverage and controlled multi-user inference justify the premium.',
    bestFor: ['Banks and insurers', 'Government and SOEs', 'Regulated enterprise'],
  },
];

const LOCAL_AI_INDUSTRIES = [
  {
    id: 'legal',
    label: 'Legal + finance',
    icon: 'shield',
    tierId: 'private-office',
    infrastructureBudget: 'R60k–R85k',
    workload: 'Contracts, policies, private document search, drafting and cited internal answers.',
    reason: 'Unified memory accommodates capable quantised text models without the noise, power and administration of a GPU tower.',
    safeguard: 'Human approval, matter-level permissions, source citations and auditable document versions.',
  },
  {
    id: 'health',
    label: 'Healthcare',
    icon: 'signal',
    tierId: 'team-appliance',
    infrastructureBudget: 'R140k–R180k',
    workload: 'Local transcription, administrative assistance and retrieval across approved clinical documentation.',
    reason: 'A shared appliance keeps sensitive workloads close to the practice while supporting larger local models and voice tooling.',
    safeguard: 'No autonomous diagnosis; encrypt records, restrict roles and keep a qualified person responsible for every clinical decision.',
  },
  {
    id: 'retail',
    label: 'Retail + support',
    icon: 'users',
    tierId: 'throughput',
    infrastructureBudget: 'R170k–R250k',
    workload: 'Customer-service retrieval, product matching, call transcription and repeat classification at volume.',
    reason: 'The workload benefits more from fast small-to-medium models and accelerated voice processing than from maximum model size.',
    safeguard: 'Confidence thresholds, escalation paths, transcript retention rules and continuous answer-quality evaluation.',
  },
  {
    id: 'industry',
    label: 'Industry + field',
    icon: 'cube',
    tierId: 'team-appliance',
    infrastructureBudget: 'R150k–R300k',
    workload: 'Maintenance knowledge, field guidance, computer-vision development and offline operational assistance.',
    reason: 'NVIDIA tooling and 128GB memory make the appliance a useful development hub before workloads move to dedicated edge devices.',
    safeguard: 'Keep safety-critical control outside the language model and validate every edge workflow under real field conditions.',
  },
  {
    id: 'creative',
    label: 'Media + engineering',
    icon: 'spatial',
    tierId: 'throughput',
    infrastructureBudget: 'R150k–R220k',
    workload: 'Creative agents, transcription, image generation, media processing and engineering knowledge assistance.',
    reason: 'A CUDA workstation offers the broadest compatibility for image, video, voice and accelerated production tooling.',
    safeguard: 'Track source rights, generated-asset provenance, client confidentiality and model licensing.',
  },
  {
    id: 'education',
    label: 'Education + research',
    icon: 'grow',
    tierId: 'team-appliance',
    infrastructureBudget: 'R140k–R450k',
    workload: 'Shared AI teaching, coding assistance, research experiments and private institutional knowledge.',
    reason: 'One shared appliance can serve a pilot lab; additional private-office nodes can expand hands-on access later.',
    safeguard: 'Test student-facing accuracy, disclose AI use and preserve academic assessment integrity.',
  },
  {
    id: 'regulated',
    label: 'Regulated enterprise',
    icon: 'terminal',
    tierId: 'enterprise',
    infrastructureBudget: 'R360k–R550k',
    workload: 'Controlled multi-user inference, larger private models and audited knowledge workflows.',
    reason: 'ECC VRAM, enterprise-class capacity and a governed host are appropriate when the service becomes operational infrastructure.',
    safeguard: 'POPIA-aligned purpose controls, SSO, audit logging, network isolation, tested backups and a formal operating owner.',
  },
];

const localAiTierById = (id) => LOCAL_AI_TIERS.find((tier) => tier.id === id);

Object.assign(window, {
  LOCAL_AI_LAST_VERIFIED,
  LOCAL_AI_TIERS,
  LOCAL_AI_INDUSTRIES,
  localAiTierById,
});
