Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
a2db567
Merge pull request #28 from ViVaLaDaniel/feat/chat-error-boundary
leojay-net Mar 20, 2026
a1c8bc4
added resusable skeleton
SudiptaPaul-31 Mar 23, 2026
9c64e52
add per-user deposit tracking to FiatBridge contract
bakarezainab Mar 23, 2026
c6d0788
Playwright end-to-end suite for core journey
Nemenwq Mar 23, 2026
e7988f1
OpenTelemetry traces for payout lifecycle
Lynndabel Mar 23, 2026
d4e3d6d
feat(payout): add provider interface and registry
millicentogalanya Mar 23, 2026
340eb5e
refactor(api): use payout provider registry
millicentogalanya Mar 23, 2026
0cd6f89
chore: add next-env types
millicentogalanya Mar 23, 2026
9aa9846
chore: update lockfile
millicentogalanya Mar 23, 2026
ad1e3fd
Merge pull request #85 from SudiptaPaul-31/fix-reusable-skeleton
leojay-net Mar 23, 2026
bf2596b
Merge pull request #86 from Nemenwq/play
leojay-net Mar 23, 2026
1871a1a
Merge pull request #87 from Lynndabel/open
leojay-net Mar 23, 2026
d918e43
Merge branch 'main' into nnennaokoye/Stellar-Dex-Chat
nnennaokoye Mar 23, 2026
551b61b
Merge pull request #88 from nnennaokoye/nnennaokoye/Stellar-Dex-Chat
leojay-net Mar 23, 2026
d71f9b2
feat(chat): mobile bottom-sheet pattern for chat history
DeborahOlaboye Mar 23, 2026
92a2186
Merge pull request #89 from DeborahOlaboye/feat/mobile-bottom-sheet-c…
leojay-net Mar 23, 2026
03997f0
feat: added preset amount
7maylord Mar 23, 2026
c4c24d5
Merge pull request #120 from 7maylord/feat/amount-preset
leojay-net Mar 23, 2026
a36229e
feat: add CI workflow for contract tests
7maylord Mar 23, 2026
d12bd32
ci: add GitHub Actions workflows for frontend and smart contract builds
leojay-net Mar 23, 2026
bdaa350
Merge pull request #121 from 7maylord/feat/CI-workflow
leojay-net Mar 23, 2026
8898d6b
feat: standard linting
7maylord Mar 23, 2026
29c7ac8
Merge pull request #122 from 7maylord/feat/lint
leojay-net Mar 23, 2026
5326335
feat: implement time-locked withdrawals for FiatBridge (closes #99)
Mar 24, 2026
f68910d
feat: add rate limiting to route
7maylord Mar 24, 2026
874dec1
Merge pull request #124 from 7maylord/feat/rate-limiting
leojay-net Mar 24, 2026
f6aad53
Merge pull request #123 from amehsamuel200225-sketch/feature/99-time-…
leojay-net Mar 24, 2026
acc3746
fix: add missing Ledger import and fix sequence_number field name in …
leojay-net Mar 24, 2026
f41793b
Add test snapshots for withdrawal scenarios and update existing tests
leojay-net Mar 24, 2026
19db822
emit Soroban events on deposit and withdraw in FiatBridge contract
nnennaokoye Mar 24, 2026
1e8a30a
feat: build bank details and fiat payout UI (#24)
Mar 24, 2026
0896725
Fix transaction-ready callback registration
millicentogalanya Mar 24, 2026
73ac95e
Add on-chain bridge limit display and deposit guard
Samaro1 Mar 24, 2026
aa2bc49
Merge pull request #126 from MarvyNwaokobia/main
leojay-net Mar 24, 2026
09fabd0
Merge pull request #125 from nnennaokoye/nnennaokoye/Stellar-Dex-Chat
leojay-net Mar 24, 2026
1e71b9b
Merge pull request #128 from Samaro1/feature/modal-limit-guard
leojay-net Mar 24, 2026
f89a58c
feat(settings): fiat currency preference and defaults
DeborahOlaboye Mar 24, 2026
58024ef
feat(contract): add per-address deposit cooldown (#104)
Jayy4rl Mar 24, 2026
6e5568c
Merge branch 'main' into feat/104-deposit-cooldown
Jayy4rl Mar 24, 2026
f459184
feat: add depositor allowlist with admin-controlled access
Jayy4rl Mar 24, 2026
42e5d40
Merge branch 'main' into feat/106-depositor-allowlist
Jayy4rl Mar 24, 2026
4489171
feat: add on-chain deposit receipt system to FiatBridge contract
Jayy4rl Mar 24, 2026
624d910
Merge pull request #127 from DeborahOlaboye/feat/fiat-currency-prefer…
leojay-net Mar 24, 2026
7d20900
Merge pull request #132 from Jayy4rl/feat/103-deposit-receipt-system
leojay-net Mar 24, 2026
deaa272
feat: add multi-token support to FiatBridge contract
Jayy4rl Mar 24, 2026
0b9799e
Merge branch 'main' into feat/98-multi-token-support
Jayy4rl Mar 24, 2026
9a0afd8
Merge branch 'main' into feat/106-depositor-allowlist
Jayy4rl Mar 24, 2026
4df6d6e
feat: add configurable protocol fee collection to FiatBridge contract…
Mar 24, 2026
cc03aa1
fix: properly integrate multi-token + receipt system features
Jayy4rl Mar 24, 2026
0b5d7f0
fix: integrate receipt system with allowlist branch
Jayy4rl Mar 24, 2026
2e9c48b
Merge branch 'main' into millicentogalanya/Stellar-Dex-Chat
millicentogalanya Mar 24, 2026
470f909
Feature: add pause and unpause functionality
nnennaokoye Mar 24, 2026
fedd135
bug fix
millicentogalanya Mar 24, 2026
e8c3e2f
merge fix
millicentogalanya Mar 24, 2026
bd191fa
feat: add rolling 24-hour withdrawal limit to FiatBridge contract #105
Mar 24, 2026
7876b33
Merge branch 'main' into add-per-user-deposit-tracking-to-FiatBridge-…
bakarezainab Mar 24, 2026
24a7141
feat: add rolling 24-hour withdrawal limit to FiatBridge contract (#105)
Mar 24, 2026
f9004d1
feat: add batch withdrawal processing to FiatBridge contract (#102)
Mar 24, 2026
23a9451
CI Fix
millicentogalanya Mar 24, 2026
c32c7e6
Merge pull request #131 from Jayy4rl/feat/106-depositor-allowlist
leojay-net Mar 24, 2026
a2b4f76
Merge pull request #134 from millicentogalanya/millicentogalanya/Stel…
leojay-net Mar 24, 2026
d207d07
Merge branch 'main' into nnennaokoye/Stellar-Dex-Chat
nnennaokoye Mar 24, 2026
463ff26
Merge branch 'main' into feat/104-deposit-cooldown
leojay-net Mar 24, 2026
e3251dd
Merge pull request #130 from Jayy4rl/feat/104-deposit-cooldown
leojay-net Mar 24, 2026
7ebd352
Merge branch 'main' into add-per-user-deposit-tracking-to-FiatBridge-…
bakarezainab Mar 24, 2026
5f8b9f0
feat: contextual help cards for first time users
Uche44 Mar 24, 2026
15e7b15
Merge branch 'main' into feature/102-batch-withdrawal
leojay-net Mar 24, 2026
751cad9
Merge pull request #139 from MarvyNwaokobia/feature/102-batch-withdrawal
leojay-net Mar 24, 2026
b8abeff
Merge branch 'main' into feat/98-multi-token-support
leojay-net Mar 24, 2026
00b4f15
Merge pull request #133 from Jayy4rl/feat/98-multi-token-support
leojay-net Mar 24, 2026
f6bf1d6
Merge branch 'main' of https://github.com/nnennaokoye/Stellar-Dex-Cha…
nnennaokoye Mar 24, 2026
ea80d4f
Merge pull request #140 from Uche44/feat/help-cards
leojay-net Mar 24, 2026
0c51bfc
merge fix
nnennaokoye Mar 24, 2026
7bd60b2
Merge branch 'main' of https://github.com/nnennaokoye/Stellar-Dex-Cha…
nnennaokoye Mar 24, 2026
f9aafdc
Merge branch 'main' into add-per-user-deposit-tracking-to-FiatBridge-…
bakarezainab Mar 24, 2026
addb6d6
merge fix
nnennaokoye Mar 24, 2026
d68e4c6
ci: add permissions block to allow workflows to run without manual ap…
leojay-net Mar 24, 2026
5affbcf
merge fix
nnennaokoye Mar 24, 2026
de048a0
Merge pull request #136 from nnennaokoye/nnennaokoye/Stellar-Dex-Chat
leojay-net Mar 24, 2026
81dafdb
Merge branch 'main' into add-per-user-deposit-tracking-to-FiatBridge-…
leojay-net Mar 24, 2026
e8a4236
Merge pull request #138 from bakarezainab/add-per-user-deposit-tracki…
leojay-net Mar 24, 2026
1e9f1b8
fix(contract): resolve massive merge conflict corruption in lib.rs & …
leojay-net Mar 24, 2026
859198b
feat: add multi-account wallet selector with dropdown in header
xqcxx Mar 24, 2026
52f56b7
Merge pull request #141 from xqcxx/feature/30-multi-account-wallet-se…
leojay-net Mar 24, 2026
fc7e620
feat: add wallet session TTL with 24-hour expiry and secure reconnect
xqcxx Mar 24, 2026
57a111f
Merge pull request #142 from xqcxx/feature/31-wallet-session-ttl
leojay-net Mar 24, 2026
a6d717a
feat: add transaction fee estimate before submit
xqcxx Mar 24, 2026
cc7480b
feat: add saved beneficiary templates with select, rename, delete con…
xqcxx Mar 24, 2026
b43c514
Merge pull request #143 from xqcxx/feature/33-transaction-fee-estimate
leojay-net Mar 24, 2026
a0415dc
Merge pull request #144 from xqcxx/feature/37-saved-beneficiary-templ…
leojay-net Mar 24, 2026
3bc7150
docs: added CONTRIBUTING.md file
Opeyemi0001 Mar 24, 2026
e2d44cc
Merge pull request #145 from Opeyemi0001/docs/CONTRIBUTING.md-file
leojay-net Mar 24, 2026
0f91266
feat: implement Wave features #56, #76, #71, #78
ogazboiz Mar 24, 2026
9bf1434
fix: resolve TypeScript lint errors for CI compliance
ogazboiz Mar 24, 2026
f2a09ea
fix(UserSettings): escape apostrophe to resolve lint error
ogazboiz Mar 24, 2026
82efa17
fix(useChat): include isAdmin in clearChat and loadChatSession state …
ogazboiz Mar 24, 2026
6c29b75
Merge pull request #146 from playground-ogazboiz/wave-features-all
leojay-net Mar 24, 2026
900cdd1
feat: Implement Notifications Center for Tx and Payout Events
gregemax Mar 24, 2026
00d903a
update
gregemax Mar 24, 2026
6d6eea9
fix: extend instance storage TTL for state-mutating functions (#108)
Mrwicks00 Mar 25, 2026
1fff5c4
fix: require admin authorization before reading state in withdraw (#112)
Mrwicks00 Mar 25, 2026
f5431b7
chore: update dex_with_fiat_frontend package-lock
gloskull Mar 25, 2026
b65211c
feat: offline-banner + retry queue; chore: lockfile; docs: PR template
gloskull Mar 25, 2026
ff6dac3
chore: run cargo fmt and update test snapshots
Skinny001 Mar 25, 2026
5a41a5e
Wave Feature: pending transaction recovery after refresh
Oluwatos94 Mar 25, 2026
e5cbf07
feat: add schema version key, migration logic, and tests (issue #107)
Skinny001 Mar 25, 2026
9878dfa
fix: remove rlib from crate-type to resolve wasm duplicate lang item …
Skinny001 Mar 25, 2026
b9a117b
Merge pull request #147 from gregemax/feature/notifications-center
leojay-net Mar 25, 2026
0d9b9a1
Merge pull request #148 from Mrwicks00/fix/issue-108-ttl-new
leojay-net Mar 25, 2026
1d8f913
Merge branch 'main' into fix/issue-112-auth-order
leojay-net Mar 25, 2026
52a2d77
Merge pull request #149 from Mrwicks00/fix/issue-112-auth-order
leojay-net Mar 25, 2026
27addcd
Merge pull request #151 from Skinny001/feature/two-step-admin-transfer
leojay-net Mar 25, 2026
9e88e41
Merge pull request #150 from gloskull/offline-banner
leojay-net Mar 25, 2026
5985ccd
Merge branch 'main' into pending-transaction-recovery
leojay-net Mar 25, 2026
3ade530
feat(bridge): implement TTL caching for contract read operations
MJ-RWA Mar 25, 2026
b4918f3
Merge pull request #152 from Oluwatos94/pending-transaction-recovery
leojay-net Mar 25, 2026
1004441
Merge branch 'main' into feat/bridge-stats-caching
MJ-RWA Mar 25, 2026
842f099
Fix tests, ensure proper test isolation, and format codebase
Skinny001 Mar 25, 2026
3c833df
Enable testutils by default for cargo test compatibility
Skinny001 Mar 25, 2026
dba2d32
resolve build errors
MJ-RWA Mar 25, 2026
916fabd
Merge branch 'feat/bridge-stats-caching' of https://github.com/MJ-RWA…
MJ-RWA Mar 25, 2026
dc264e0
Merge branch 'leojay-net:main' into feature/schema-version-key
Skinny001 Mar 25, 2026
44df4dc
Resolved Build Errors
MJ-RWA Mar 25, 2026
9957310
Update
MJ-RWA Mar 25, 2026
8f0dfa8
Add AI guardrails for unsupported requests
OlaGreat Mar 25, 2026
4516d81
Merge pull request #154 from MJ-RWA/feat/bridge-stats-caching
leojay-net Mar 25, 2026
b10efdf
Merge pull request #164 from OlaGreat/wave-feature-ai-guardrails-unsu…
leojay-net Mar 25, 2026
e34968a
feat(frontend): improve transaction safety and theming
sshdopey Mar 25, 2026
0c9b2f1
Merge pull request #165 from sshdopey/codex/wave-44-50-68-72
leojay-net Mar 25, 2026
3681020
Wave Feature: property-based tests for contract amount invariants (#81)
Favour4712 Mar 25, 2026
9151a55
Fix: move all test code into gated module, format codebase
Skinny001 Mar 25, 2026
b8de25d
chore: ensure test module is gated and all tests pass
Skinny001 Mar 25, 2026
e30f2cf
chore: format codebase after recent changes
Skinny001 Mar 25, 2026
13ae641
Merge pull request #166 from Favour4712/issue-81
leojay-net Mar 26, 2026
c4e53b7
feat: implement issues #10 #11 #15 #38
emdevelopa Mar 26, 2026
7b78564
Merge pull request #167 from EmdevelopaOpenSource/feat/tx-panel-copy-…
leojay-net Mar 26, 2026
568af82
Merge branch 'main' into feature/schema-version-key
Skinny001 Mar 26, 2026
fc9d920
feat: implement admin security enhancements
pope-h Mar 26, 2026
852fdb1
fix: resolve merge conflicts, build, test, and format codebase
Skinny001 Mar 26, 2026
dcc11f6
Merge remote-tracking branch 'origin/main' into feature/admin-securit…
pope-h Mar 26, 2026
15acb6c
fix: resolve failing unit tests and partial withdrawal logic
pope-h Mar 26, 2026
2f0886a
Chore: add .gitignore entries for generated build artifacts
njohnchi Mar 26, 2026
aed8229
Merge pull request #168 from pope-h/feature/admin-security-enhancements
leojay-net Mar 26, 2026
e4be809
Refactor tests: wrap all test code in gated module, ensure clean buil…
Skinny001 Mar 26, 2026
18f70ef
Merge branch 'main' into feature/schema-version-key
Skinny001 Mar 26, 2026
49e33c4
feat: admin reconciliation dashboard
DeborahOlaboye Mar 26, 2026
2e8efd1
feat: expand landing page hero section with bridge explanation
DeborahOlaboye Mar 26, 2026
96f378d
fix: remove duplicate admin files from root src
DeborahOlaboye Mar 26, 2026
48ae2bb
feat: wave feature: downloadable reciept for successful operations
Agbeleshe Mar 26, 2026
1392adb
Fix tests, ensure proper test isolation, and format codebase
Skinny001 Mar 25, 2026
67b38de
Fix: move all test code into gated module, format codebase
Skinny001 Mar 25, 2026
1338744
fix: schema version key, contract client macro, and test suite now cl…
Skinny001 Mar 26, 2026
65be3da
Restore DataKey variants, fix test module, and ensure all tests pass
Skinny001 Mar 26, 2026
0c04869
Merge pull request #153 from Skinny001/feature/schema-version-key
leojay-net Mar 26, 2026
260a3db
Merge pull request #169 from njohnchi/add-gitignore-entries
leojay-net Mar 26, 2026
5935a25
Merge pull request #170 from DeborahOlaboye/feat/admin-reconciliation…
leojay-net Mar 26, 2026
a75a519
Merge pull request #173 from Agbeleshe/Receipt
leojay-net Mar 26, 2026
347e5b9
Docs: add .env.example file for the frontend
DIFoundation Mar 26, 2026
7e76539
Merge branch 'main' of https://github.com/DIFoundation/Stellar-Dex-Chat
DIFoundation Mar 26, 2026
4db52a8
feat: add emergency_drain admin function for atomic contract balance …
Skinny001 Mar 26, 2026
6eff9bb
Merge pull request #175 from Skinny001/feature/emergency-drain-admin-…
leojay-net Mar 26, 2026
7ac13e8
fixed Duplicate Submit Protection and Safe Retry
Agbeleshe Mar 26, 2026
0c6d083
Merge branch 'main' into feature/duplicate-submit-protection-35
Agbeleshe Mar 26, 2026
5bebd0f
fixed build
Agbeleshe Mar 26, 2026
062fe28
Merge branch 'feature/duplicate-submit-protection-35' of https://gith…
Agbeleshe Mar 26, 2026
b8ec44f
feat(chat): implement slash commands and local FAQ retrieval
Gbangbolaoluwagbemiga Mar 26, 2026
165e531
feat: implement deposit_for for third-party payer, tests passing per …
Skinny001 Mar 26, 2026
4d5447b
chore: comment out minimal event emission test, all tests passing, co…
Skinny001 Mar 26, 2026
9948b21
chore: extract XLM stroop conversion utilities into shared helper module
Sobilo34 Mar 26, 2026
0c23908
Merge pull request #177 from Skinny001/party-payer
leojay-net Mar 26, 2026
b086fba
Merge pull request #174 from DIFoundation/main
leojay-net Mar 26, 2026
273b9d9
Merge pull request #176 from Agbeleshe/feature/duplicate-submit-prote…
leojay-net Mar 26, 2026
2d03741
fix(frontend): add missing framer-motion dependency and verify build
Gbangbolaoluwagbemiga Mar 26, 2026
eb45970
feat: show wallet network mismatch warning and disable write actions
Sobilo34 Mar 26, 2026
d4055c6
Merge pull request #178 from Gbangbolaoluwagbemiga/main
leojay-net Mar 26, 2026
d6e867c
Merge pull request #179 from Sobilo34/chore/issue-21-extract-stroop-u…
leojay-net Mar 26, 2026
d0aa437
Merge pull request #180 from Sobilo34/feat/issue-29-wallet-network-mi…
leojay-net Mar 26, 2026
7c5cbb2
Add total withdrawn counter and expose reconciliation view
Properprogress1 Mar 26, 2026
5c0fc3d
index modified
Properprogress1 Jun 25, 2026
50e1cb9
test
Properprogress1 Jun 25, 2026
645f590
reconciliation test
Properprogress1 Jun 25, 2026
02232b4
test total withdrawal
Properprogress1 Jun 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
28 changes: 28 additions & 0 deletions .github/workflows/contract-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Contract Tests

on:
pull_request:
branches:
- main

jobs:
test:
name: Run cargo test
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Rust stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown

- name: Cache Cargo dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: stellar-contracts -> target

- name: Run contract tests
run: cd stellar-contracts && cargo test
51 changes: 51 additions & 0 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Smart Contract CI

on:
pull_request:
branches: [main]
paths:
- "stellar-contracts/**"
- ".github/workflows/contracts.yml"
push:
branches: [main]
paths:
- "stellar-contracts/**"

permissions:
contents: read

jobs:
test:
name: Test & Build
runs-on: ubuntu-latest

defaults:
run:
working-directory: stellar-contracts

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: wasm32-unknown-unknown

- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
stellar-contracts/target
key: ${{ runner.os }}-cargo-${{ hashFiles('stellar-contracts/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Run tests
run: cargo test

- name: Build WASM release
run: cargo build --target wasm32-unknown-unknown --release
49 changes: 49 additions & 0 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Frontend CI

on:
pull_request:
branches: [main]
paths:
- "dex_with_fiat_frontend/**"
- ".github/workflows/frontend.yml"
push:
branches: [main]
paths:
- "dex_with_fiat_frontend/**"

permissions:
contents: read

jobs:
build:
name: Build & Type Check
runs-on: ubuntu-latest

defaults:
run:
working-directory: dex_with_fiat_frontend

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: dex_with_fiat_frontend/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build
env:
NEXT_PUBLIC_STELLAR_CONTRACT_ID: ${{ secrets.NEXT_PUBLIC_STELLAR_CONTRACT_ID || 'PLACEHOLDER' }}
NEXT_PUBLIC_XLM_SAC_ID: ${{ secrets.NEXT_PUBLIC_XLM_SAC_ID || 'PLACEHOLDER' }}
NEXT_PUBLIC_STELLAR_RPC_URL: ${{ secrets.NEXT_PUBLIC_STELLAR_RPC_URL || 'https://soroban-testnet.stellar.org' }}
NEXT_PUBLIC_STELLAR_NETWORK: ${{ secrets.NEXT_PUBLIC_STELLAR_NETWORK || 'TESTNET' }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY || 'PLACEHOLDER' }}
PAYSTACK_SECRET_KEY: ${{ secrets.PAYSTACK_SECRET_KEY || 'PLACEHOLDER' }}
PAYOUT_PROVIDER: ${{ secrets.PAYOUT_PROVIDER || 'paystack' }}
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Root-level generated artifacts
node_modules/
dex_with_fiat_frontend/.next/
dex_with_fiat_frontend/node_modules/
stellar-contracts/target/

# Local environment files
.env.local

# Contract build artifacts
*.wasm

250 changes: 250 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
# Contributing

Thank you for taking the time to contribute. This document covers everything you need to open your first pull request.

---

## Table of Contents

1. [Prerequisites](#prerequisites)
2. [Local Setup](#local-setup)
3. [Branch Naming](#branch-naming)
4. [Commit Message Format](#commit-message-format)
5. [Running Tests](#running-tests)
6. [Submitting a PR](#submitting-a-pr)
7. [Code Style](#code-style)

---

## Prerequisites

Install the following tools before you begin.

| Tool | Minimum version | Notes |
|---|---|---|
| Node.js | 20.x | Use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm) to manage versions |
| Rust toolchain | stable | Install via [rustup](https://rustup.rs/) |
| wasm32 target | — | `rustup target add wasm32-unknown-unknown` |
| Stellar CLI | latest | Install via `cargo install --locked stellar-cli` |
| Freighter extension | latest | Browser wallet available at the [Freighter website](https://www.freighter.app/) |

Verify your setup:

```bash
node --version # v20.x.x
rustup show # active toolchain: stable
stellar --version
```

---

## Local Setup

### 1. Clone the repository

```bash
git clone https://github.com/xqcxx/Stellar-Dex-Chat.git
cd Stellar-Dex-Chat
```

### 2. Configure environment variables

The frontend requires a `.env.local` file. Copy the example and fill in the values:

```bash
cp dex_with_fiat_frontend/.env.example dex_with_fiat_frontend/.env.local
```

The required variables are:

```
NEXT_PUBLIC_STELLAR_CONTRACT_ID= # deployed Soroban contract ID
NEXT_PUBLIC_XLM_SAC_ID= # XLM Stellar Asset Contract ID
NEXT_PUBLIC_STELLAR_RPC_URL= # e.g. https://soroban-testnet.stellar.org
NEXT_PUBLIC_STELLAR_NETWORK= # TESTNET or PUBLIC
GEMINI_API_KEY= # Google Gemini API key for the AI assistant
PAYSTACK_SECRET_KEY= # Paystack secret key for fiat payouts
PAYOUT_PROVIDER= # e.g. paystack
```

> For local development against testnet you can leave `NEXT_PUBLIC_STELLAR_RPC_URL` pointing at `https://soroban-testnet.stellar.org` and set `NEXT_PUBLIC_STELLAR_NETWORK=TESTNET`.

### 3. Install frontend dependencies

```bash
cd dex_with_fiat_frontend
npm ci
```

### 4. Run the development server

```bash
npm run dev
```

The app is available at `http://localhost:3000`.

### 5. Build and test the Soroban contract

From the repository root:

```bash
cd stellar-contracts
cargo build --target wasm32-unknown-unknown --release
cargo test
```

---

## Branch Naming

Use one of the following prefixes followed by a short, hyphen-separated description:

| Prefix | When to use |
|---|---|
| `feature/` | New functionality |
| `fix/` | Bug fixes |
| `docs/` | Documentation-only changes |

Examples:

```
feature/add-swap-confirmation-modal
fix/wallet-disconnect-on-reload
docs/update-local-setup-steps
```

---

## Commit Message Format

This project follows [Conventional Commits](https://www.conventionalcommits.org/).

```
<type>(<optional scope>): <short description>

[optional body]

[optional footer — e.g. Closes #42]
```

Allowed types:

| Type | When to use |
|---|---|
| `feat` | A new feature |
| `fix` | A bug fix |
| `docs` | Documentation changes only |
| `test` | Adding or updating tests |
| `chore` | Tooling, dependency updates, CI changes |

Examples:

```
feat(swap): add slippage tolerance input
fix(wallet): clear session on Freighter disconnect
docs: add Stellar CLI to prerequisites
test(contract): add coverage for daily limit reset
chore: upgrade soroban-sdk to 25.3.0
```

---

## Running Tests

### Contract tests

Run from the `stellar-contracts` directory:

```bash
cd stellar-contracts
cargo test
```

All snapshot files under `test_snapshots/` are committed to the repository. If your changes alter contract behaviour, update the snapshots by running:

```bash
cargo test -- --update-snapshots
```

and commit the updated files alongside your code changes.

### Frontend build check

Run from the `dex_with_fiat_frontend` directory:

```bash
npm run build
```

A successful build confirms there are no TypeScript compilation errors.

### Frontend lint

```bash
npm run lint
```

### End-to-end tests

Playwright e2e tests require a running dev server:

```bash
# Install browsers once
npm run test:e2e:install

# Run all e2e tests
npm run test:e2e
```

---

## Submitting a PR

Before opening a pull request, confirm the following checklist:

- [ ] The PR description references the related issue: `Closes #ISSUE_NUMBER`
- [ ] `cargo test` passes with no failures
- [ ] `npm run build` completes without errors
- [ ] `npm run lint` reports no new lint errors
- [ ] Screenshots or screen recordings are included for any UI changes
- [ ] Snapshot files are updated if contract behaviour changed
- [ ] No secrets or `.env.local` values are committed

Open the PR against the `main` branch.

---

## Code Style

### Rust

Format all Rust code with `rustfmt` before committing:

```bash
cd stellar-contracts
cargo fmt
```

CI will not enforce formatting automatically, but reviewers will request changes if the diff includes unformatted code.

### TypeScript

The frontend uses the ESLint configuration defined in `dex_with_fiat_frontend/eslint.config.mjs`, which extends `next/core-web-vitals` and `next/typescript`. Run the linter before pushing:

```bash
cd dex_with_fiat_frontend
npm run lint
```

Code formatting is handled by Prettier. To auto-fix formatting in the `src/` directory:

```bash
npm run format
```

To check without modifying files:

```bash
npm run check
```
Loading