Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/accessibility-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,29 @@ jobs:

strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [20.x, 22.x]

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: '9.0.0'

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache: "pnpm"

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Run accessibility tests
run: npm run test -- __tests__/accessibility.test.tsx
run: pnpm run test -- __tests__/accessibility.test.tsx

- name: Run all tests
run: npm test
run: pnpm test

- name: Upload coverage
if: always()
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/accessibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: '9.0.0'

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Run accessibility tests
run: npx vitest run __tests__/accessibility --reporter=verbose
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/contract-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: '9.0.0'

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Run contract integration tests with coverage
run: npx vitest run __tests__/contract --reporter=verbose --coverage
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,23 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: '9.0.0'

- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Install Playwright browsers
run: npx playwright install --with-deps

- name: Run Playwright tests
run: npm run test:e2e
run: pnpm run test:e2e
env:
NEXT_PUBLIC_API_MOCKING: "enabled"

Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,21 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: '9.0.0'

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Build Next.js app
run: npm run build
run: pnpm run build
env:
CI: true
NEXT_PUBLIC_STELLAR_NETWORK: testnet
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/storybook-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: '9.0.0'

- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache: pnpm

- run: npm ci
- run: pnpm install --frozen-lockfile

- run: npm run build-storybook
- run: pnpm run build-storybook

- uses: actions/upload-pages-artifact@v3
with:
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/visual-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@ jobs:
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4
with:
version: '9.0.0'

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Build Storybook
run: npm run build-storybook
run: pnpm run build-storybook
env:
NODE_OPTIONS: '--max_old_space_size=4096'

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ A central marketplace listing all active open invoices waiting for funding, deta
- **Getting Started Guide**: Refer to the [Quick Start](#-quick-start) section.
- **Component Library (Storybook)**: Browse the full component library with interactive controls, variants, and a11y checks at the [published Storybook](https://invoice-liquidity-network.github.io/ILN-Frontend) (deployed from `main`).
- **Frontend Architecture Overview**: Learn about our architecture design and libraries in [docs/architecture.md](docs/architecture.md).
- **Glossary**: Protocol and DeFi terminology (insurance pool, premiums, claims, and more) in [docs/glossary.md](docs/glossary.md).
- **Contribution Guidelines**: Read [CONTRIBUTING.md](CONTRIBUTING.md) for comprehensive setup instructions, testing standards, code style guidelines, Stellar-specific setup, and development workflow.
- **Visual Regression Testing**: Learn about baseline configurations in [docs/VISUAL_REGRESSION_WORKFLOW.md](docs/VISUAL_REGRESSION_WORKFLOW.md).
- **Design System Blueprint**: Deep dive into "The Fiscal Atelier" aesthetic rules in [DESIGN.md](DESIGN.md).
Expand Down
48 changes: 48 additions & 0 deletions docs/glossary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Glossary

Definitions of protocol and DeFi terminology used across the Invoice Liquidity Network (ILN) documentation and codebase. Terms are listed alphabetically. Cross-references to other glossary entries appear in **bold**; links point to the relevant documentation or source files.

---

## Insurance

### Claim

The process of requesting compensation from the **Insurance Pool** after an invoice defaults. Only the pool admin (the liquidity contract) can file claims on behalf of affected LPs; payouts are limited by the pool's **Coverage Cap**.

*See also:* **Coverage Cap**, **Default Protection**, **Insurance Pool**
*Frontend integration:* `claimInsurance()` in [`src/utils/soroban.ts`](../src/utils/soroban.ts)

### Coverage Cap

The maximum flat amount the **Insurance Pool** will pay out per **Claim**. Configured once at pool initialization and applied uniformly to every claim regardless of the size of the defaulted invoice.

*See also:* **Claim**, **Insurance Pool**

### Default Protection

Insurance coverage that compensates liquidity providers (LPs) for losses caused by invoice defaults. LPs obtain default protection by completing **Enrollment** in the **Insurance Pool** and paying a **Premium**; when an invoice they funded defaults, the pool compensates them via a **Claim**.

*See also:* **Claim**, **Enrollment**, **Insurance Pool**, **Premium**
*Frontend integration:* the LP dashboard's insurance panel ([`src/components/InsurancePoolPanel.tsx`](../src/components/InsurancePoolPanel.tsx)), gated by the `NEXT_PUBLIC_INSURANCE_POOL_ENABLED` flag (see [README — Environment Variables](../README.md))

### Enrollment

The act of registering an LP in the insurance program, making them eligible for **Default Protection**. Enrollment is optional and is completed by depositing a **Premium** into the **Insurance Pool**; an LP's enrollment status can be queried on-chain.

*See also:* **Default Protection**, **Insurance Pool**, **Premium**
*Frontend integration:* `getLPInsuranceStatus()` in [`src/utils/soroban.ts`](../src/utils/soroban.ts) and the [`useInsurance`](../src/hooks/useInsurance.ts) hook

### Insurance Pool

A smart contract that provides **Default Protection** for liquidity providers. LPs opt in voluntarily by paying **Premiums**; when an invoice they funded defaults, the pool compensates them through a **Claim**, up to the **Coverage Cap**. The contract lives in the ILN contracts repository under `contracts/insurance_pool/`.

*See also:* **Claim**, **Coverage Cap**, **Default Protection**, **Enrollment**, **Premium**
*Frontend integration:* `getInsurancePoolInfo()` in [`src/utils/soroban.ts`](../src/utils/soroban.ts); UI in [`src/components/InsurancePoolPanel.tsx`](../src/components/InsurancePoolPanel.tsx). See the [Architecture Overview](./architecture.md) for how frontend hooks reach Soroban contracts.

### Premium

A payment made by an LP to the **Insurance Pool** to obtain **Default Protection** coverage. Premiums are currently tracked as an accounting balance inside the pool contract (actual token transfers are a planned follow-up). The pool's premium rate is expressed in basis points (bps).

*See also:* **Default Protection**, **Enrollment**, **Insurance Pool**
*Frontend integration:* `depositPremium()` in [`src/utils/soroban.ts`](../src/utils/soroban.ts)
Loading