# System context

NGO ERP is a **single codebase, multi-tenant** product: each **organisation** is an isolated workspace. The **grant** is the operational hub for funded activity; other modules (budgets, finance, procurement, HR, hiring, etc.) attach to that model where applicable.

## Context diagram (actors and systems)

```mermaid
flowchart TB
  staff[Staff user]
  supplier[Supplier contact]
  kiosk[Kiosk operator]
  platform[Platform admin]

  subgraph Product["NGO ERP product"]
    web[Next.js frontend]
    api[Laravel API]
    db[(Database)]
    files[Private file storage]
  end

  staff -->|HTTPS| web
  web -->|JSON Bearer| api
  supplier -->|vendor-hub| web
  supplier -->|JSON| api
  kiosk -->|public JSON| api
  platform -->|Bearer| api
  api --> db
  api --> files
```

## Simplified boundary (layers)

```mermaid
flowchart TB
  subgraph Clients["Clients"]
    FE[Next.js]
    MOB[Future mobile / integrations]
  end

  subgraph Backend["Backend"]
    API[Laravel API]
    ART[Artisan / scheduler]
  end

  subgraph Data["Data plane"]
    DB[(Database)]
    FS[File storage]
  end

  FE -->|HTTPS JSON| API
  MOB -.->|same API contract| API
  API --> DB
  API --> FS
  ART --> DB
```

## Primary user journeys

```mermaid
journey
  title Staff — typical day
  section Workspace
    Sign in: 5: Staff
    Open dashboard: 4: Staff
  section Grants
    Review grant budget: 4: Staff
  section Procurement
    Create or approve PR: 3: Staff
  section HR
    Submit leave or time: 4: Staff
```

```mermaid
journey
  title Supplier — vendor portal
  section Discovery
    Open org link: 5: Supplier
  section Account
    Register with password: 4: Supplier
    Sign in: 5: Supplier
  section Opportunities
    View RFQ: 5: Supplier
    Submit bid: 4: Supplier
```
