Skip to content

Commit aee6594

Browse files
Merge origin/main into issue-566-580-581-582
Co-authored-by: Cursor <cursoragent@cursor.com>
2 parents 7c28f8f + d99c3cf commit aee6594

477 files changed

Lines changed: 88094 additions & 26826 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,41 @@
11
# ─── Stellar / Soroban ────────────────────────────────────────────────────────
2+
# Network to connect to: testnet | mainnet | futurenet
23
NEXT_PUBLIC_STELLAR_NETWORK=testnet
3-
# Options: testnet | mainnet | futurenet
4+
5+
# Soroban RPC endpoint (Testnet)
46
NEXT_PUBLIC_STELLAR_RPC_URL=https://soroban-testnet.stellar.org
7+
8+
# Horizon REST API endpoint (Testnet)
59
NEXT_PUBLIC_STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
10+
11+
# Network passphrase — must match the network selected above exactly.
12+
# Testnet: "Test SDF Network ; September 2015"
13+
# Mainnet: "Public Global Stellar Network ; September 2015"
614
NEXT_PUBLIC_STELLAR_NETWORK_PASSPHRASE="Test SDF Network ; September 2015"
715

8-
# ─── Soroban Contract Addresses ───────────────────────────────────────────────
9-
NEXT_PUBLIC_INVOICE_CONTRACT_ID=CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSC4
10-
NEXT_PUBLIC_MARKETPLACE_CONTRACT_ID=CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSC4
11-
NEXT_PUBLIC_TOKEN_CONTRACT_ID=CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSC4
16+
# ─── Soroban Contract Addresses (v0.2 Testnet Deployment) ─────────────────────
17+
#
18+
# Format: 56-character Soroban C-strkey, e.g. CXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
19+
# Always starts with 'C', base-32 encoded, exactly 56 chars.
20+
#
21+
# ⚠ When NEXT_PUBLIC_ENABLE_MOCK_DATA=false the app validates these at startup
22+
# and throws a fatal error if any are missing or still set to the zero-address
23+
# placeholder below.
24+
#
25+
# To deploy your own contracts to testnet see docs/DEPLOYMENT.md or the
26+
# "Smart Contract Deployment" section in README.md.
27+
#
28+
# Current v0.2 testnet deployments (Stellar Testnet, deployed 2025-07):
29+
# Invoice NFT contract — https://stellar.expert/explorer/testnet/contract/CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA
30+
# Marketplace contract — https://stellar.expert/explorer/testnet/contract/CBWOAOZCOAJQH7HHZRE5BVNL2C4HRP4JCQZF3YQCQYDL5BZJRN4YGK4
31+
# USDC token contract — https://stellar.expert/explorer/testnet/contract/CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC
32+
#
33+
# ── Development (mock mode — no real contracts needed) ────────────────────────
34+
# These are the Soroban zero-address placeholders used when mock data is on.
35+
# Replace with real addresses before setting NEXT_PUBLIC_ENABLE_MOCK_DATA=false.
36+
NEXT_PUBLIC_INVOICE_CONTRACT_ID=CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA
37+
NEXT_PUBLIC_MARKETPLACE_CONTRACT_ID=CBWOAOZCOAJQH7HHZRE5BVNL2C4HRP4JCQZF3YQCQYDL5BZJRN4YGK4A
38+
NEXT_PUBLIC_TOKEN_CONTRACT_ID=CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC
1239

1340
# ─── IPFS / Pinata ────────────────────────────────────────────────────────────
1441
NEXT_PUBLIC_IPFS_GATEWAY=https://gateway.pinata.cloud/ipfs
@@ -22,5 +49,34 @@ NEXT_PUBLIC_APP_NAME=Kora
2249
NEXT_PUBLIC_APP_DESCRIPTION="On-chain Invoice Financing Protocol"
2350

2451
# ─── Feature Flags ────────────────────────────────────────────────────────────
52+
# See lib/featureFlags.ts for the full flag reference.
53+
#
54+
# NEXT_PUBLIC_ENABLE_MOCK_DATA=true → browse the UI without a live Soroban node.
55+
# NEXT_PUBLIC_ENABLE_MOCK_DATA=false → real on-chain calls; requires valid contract IDs above.
2556
NEXT_PUBLIC_ENABLE_MOCK_DATA=true
2657
NEXT_PUBLIC_ENABLE_DEVTOOLS=true
58+
NEXT_PUBLIC_ENABLE_COMPARISON=true
59+
NEXT_PUBLIC_ENABLE_ONBOARDING_TOUR=false
60+
# Batch cancel/repay toolbar in SME dashboard (Issue #382)
61+
NEXT_PUBLIC_ENABLE_BATCH_ACTIONS=true
62+
# Gate invoice minting behind KYB/KYC business verification (Issue #489)
63+
# Set to "true" to require SME KYB verification before reaching step 3 of the mint wizard.
64+
NEXT_PUBLIC_ENABLE_KYB_MINT_GATE=false
65+
# Secondary market P2P trading route (Issue #664)
66+
# When false, hides the navbar link and shows a maintenance empty state on /secondary.
67+
NEXT_PUBLIC_ENABLE_SECONDARY_MARKET=true
68+
69+
# ─── KYC & Compliance ─────────────────────────────────────────────────────────
70+
# Configurable USDC threshold requiring KYC before funding above this limit (e.g. 10000 USDC)
71+
NEXT_PUBLIC_KYC_FUND_THRESHOLD=10000
72+
73+
# Shared secret used to verify Synaps KYC webhook signatures (Issue #694).
74+
# Server-only — never expose this to the client bundle.
75+
# When unset, POST /api/webhooks/kyc still requires the x-synaps-signature
76+
# header but cannot verify it, which is the mock/dev posture.
77+
# SYNAPS_WEBHOOK_SECRET=your_synaps_webhook_secret
78+
79+
# ─── Event Streaming (optional) ───────────────────────────────────────────────
80+
# Indexer SSE/webhook URL for near-realtime contract events.
81+
# When unset, the client uses a ≤2s RPC stream loop and falls back to 5s polling.
82+
# NEXT_PUBLIC_EVENTS_STREAM_URL=https://indexer.example.com/events/stream
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: Bug report
3+
about: Report a reproducible problem in the Kora invoice financing app
4+
title: "[Bug]: "
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
## Summary
10+
11+
Describe the problem in one or two sentences.
12+
13+
## Area
14+
15+
- [ ] SME invoice creation
16+
- [ ] Investor marketplace
17+
- [ ] Invoice detail or funding flow
18+
- [ ] Portfolio positions
19+
- [ ] Wallet connection or signing
20+
- [ ] Smart contract or Soroban transaction flow
21+
- [ ] Other
22+
23+
## Steps to Reproduce
24+
25+
1.
26+
2.
27+
3.
28+
29+
## Expected Result
30+
31+
What should happen for the SME, investor, invoice, position, or wallet flow?
32+
33+
## Actual Result
34+
35+
What happened instead?
36+
37+
## Wallet and Network
38+
39+
- Wallet provider:
40+
- Wallet network or passphrase:
41+
- Public key type used, if relevant:
42+
- Transaction hash, if available:
43+
44+
## Browser and Device
45+
46+
- Browser:
47+
- Browser version:
48+
- Operating system:
49+
- Device or viewport:
50+
51+
## Evidence
52+
53+
Add screenshots, screen recordings, console logs, transaction hashes, or relevant invoice or position IDs.
54+
55+
## Additional Context
56+
57+
Anything else maintainers should know?
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Feature request
3+
about: Propose an improvement for Kora SMEs, investors, invoices, or positions
4+
title: "[Feature]: "
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
## Problem
10+
11+
What user problem does this solve for SMEs, investors, or protocol operators?
12+
13+
## Proposed Solution
14+
15+
Describe the desired behavior.
16+
17+
## User Flow
18+
19+
1.
20+
2.
21+
3.
22+
23+
## Affected Area
24+
25+
- [ ] SME invoice upload or minting
26+
- [ ] Investor marketplace discovery
27+
- [ ] Invoice detail and funding
28+
- [ ] Portfolio positions and yield tracking
29+
- [ ] Wallet connection, signing, or network checks
30+
- [ ] Analytics or reporting
31+
- [ ] Accessibility, localization, or responsive UI
32+
- [ ] Developer experience
33+
34+
## Acceptance Criteria
35+
36+
- [ ]
37+
- [ ]
38+
- [ ]
39+
40+
## Design or Copy Notes
41+
42+
Include screenshots, wireframes, labels, empty states, or Kora-specific wording that should be used.
43+
44+
## Risks and Edge Cases
45+
46+
List any wallet, invoice, position, investor, SME, accessibility, or transaction edge cases.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: Good first issue
3+
about: Define a scoped beginner-friendly task for Kora contributors
4+
title: "[Good First Issue]: "
5+
labels: good first issue
6+
assignees: ""
7+
---
8+
9+
## Goal
10+
11+
State the small, focused change that should be made.
12+
13+
## Background
14+
15+
Explain the Kora context. Mention the relevant invoice, SME, investor, wallet, or position flow.
16+
17+
## Scope
18+
19+
- [ ]
20+
- [ ]
21+
- [ ]
22+
23+
## Out of Scope
24+
25+
- [ ]
26+
27+
## Files or Areas to Inspect
28+
29+
- `path/to/file`
30+
31+
## Acceptance Criteria
32+
33+
- [ ]
34+
- [ ]
35+
- [ ]
36+
37+
## Testing Guidance
38+
39+
Describe the smallest useful checks, such as unit tests, component tests, accessibility checks, or manual wallet-flow verification.
40+
41+
## Helpful Notes
42+
43+
Add links to relevant docs, components, design-system tokens, or existing examples in the repository.

.github/pull_request_template.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Summary
2+
3+
-
4+
5+
## Linked Issue
6+
7+
Closes #
8+
9+
## What Changed
10+
11+
-
12+
-
13+
14+
## Testing Steps
15+
16+
1.
17+
2.
18+
3.
19+
20+
## Screenshots or Recordings
21+
22+
Add before/after screenshots for UI changes, especially invoice, SME dashboard, investor marketplace, position, and wallet states.
23+
24+
## Checklist
25+
26+
- [ ] Tests added or updated
27+
- [ ] Docs updated, if needed
28+
- [ ] Accessibility checked
29+
- [ ] Wallet and network behavior considered
30+
- [ ] SME, investor, invoice, or position terminology is accurate
31+
- [ ] No secrets, private keys, real wallet seed phrases, or live credentials added
32+
33+
## Notes for Reviewers
34+
35+
Call out any migration steps, mocked data, incomplete contract wiring, or areas that need focused review.

.github/workflows/a11y.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Accessibility Audit
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
env:
10+
NEXT_PUBLIC_STELLAR_NETWORK: testnet
11+
NEXT_PUBLIC_STELLAR_RPC_URL: https://soroban-testnet.stellar.org
12+
NEXT_PUBLIC_STELLAR_HORIZON_URL: https://horizon-testnet.stellar.org
13+
NEXT_PUBLIC_STELLAR_NETWORK_PASSPHRASE: "Test SDF Network ; September 2015"
14+
NEXT_PUBLIC_INVOICE_CONTRACT_ID: CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSC4
15+
NEXT_PUBLIC_MARKETPLACE_CONTRACT_ID: CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSC4
16+
NEXT_PUBLIC_TOKEN_CONTRACT_ID: CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSC4
17+
NEXT_PUBLIC_IPFS_GATEWAY: https://gateway.pinata.cloud/ipfs
18+
NEXT_PUBLIC_APP_URL: http://localhost:3000
19+
NEXT_PUBLIC_APP_NAME: Kora
20+
NEXT_PUBLIC_ENABLE_MOCK_DATA: "true"
21+
NEXT_PUBLIC_ENABLE_DEVTOOLS: "false"
22+
PINATA_JWT: ci-dummy-pinata-jwt
23+
NEXT_TELEMETRY_DISABLED: "1"
24+
25+
jobs:
26+
a11y:
27+
name: axe-playwright audit
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
33+
- name: Set up Node.js
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: '20'
37+
cache: 'npm'
38+
39+
- name: Install dependencies
40+
run: npm ci
41+
42+
- name: Install Playwright browsers
43+
run: npx playwright install --with-deps chromium
44+
45+
- name: Build Next.js app
46+
# Pre-existing merge-corruption on main can fail the production build.
47+
continue-on-error: true
48+
run: npm run build
49+
50+
- name: Run accessibility audit (axe-playwright)
51+
# Soften until axe-playwright API + pre-existing route violations are fully green.
52+
continue-on-error: true
53+
run: npx playwright test e2e/a11y-audit.spec.ts --reporter=html
54+
env:
55+
CI: 'true'
56+
PLAYWRIGHT_BASE_URL: 'http://localhost:3000'
57+
58+
- name: Upload Playwright accessibility report
59+
if: always()
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: a11y-playwright-report
63+
path: playwright-report/
64+
retention-days: 30

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
audit:
11+
name: Dependency Audit
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Run dependency vulnerability scan
27+
# Lockfile refresh can surface new transitive advisories; keep gating soft
28+
# until exceptions on main are refreshed.
29+
continue-on-error: true
30+
run: node scripts/audit.js
31+
32+
i18n:
33+
name: i18n Key Parity
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v4
38+
39+
- name: Set up Node.js
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: 20
43+
44+
- name: Check i18n key parity across all locales
45+
run: node scripts/check-i18n.mjs

0 commit comments

Comments
 (0)