Skip to content
Merged
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
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- **Shared core package** ([#1006](https://github.com/Nanle-code/stellar-dev-dashboard/issues/1006)).
Extracted platform-agnostic Stellar logic into `@stellar-dev-dashboard/core` workspace package, eliminating duplicated code between web (`src/lib/stellar/`) and mobile (`mobile/src/services/stellar.ts`) apps.
- `packages/core/src/networks.ts` — Network configuration, `getServer`, `getSorobanServer`
- `packages/core/src/validation.ts` — Address, amount, memo, contract, URL, network validation
- `packages/core/src/formatters.ts` — XLM, address, stroop, instruction, byte, date formatting
- `packages/core/src/addresses.ts` — Address validation, parsing, SEP-29 memo check, federation resolution
- `packages/core/src/reserves.ts` — Account reserve calculations
- `packages/core/src/operationLabels.ts` — Operation type labels
- `packages/core/src/services.ts` — High-level data fetching with in-memory caching
- `packages/core/__tests__/` — Comprehensive test suite (networks, validation, formatters, addresses, reserves, operation labels, services)
- ESLint rules enforcing no DOM/React Native imports in core
- Both web and mobile now import from `@stellar-dev-dashboard/core`
- Updated `pnpm-workspace.yaml` to include core package
- Documentation: `packages/core/README.md`, updated root `README.md`

### Added

- **Cost attribution by application tag or memo prefix** ([#868](https://github.com/Nanle-code/stellar-dev-dashboard/issues/868)).
Attributes transaction fees and asset transfer volumes to developer-defined project tags for project budgeting and threshold alerts.
- `src/lib/costThresholdManager.ts` — `CostThresholdManager` implementation for tag definition, memo prefix and regex pattern matching, budget limits, volume tracking, threshold alerts (`ok`, `warning`, `exceeded`), JSON/CSV report exports, and SSR/unsupported environment fallbacks.
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,27 @@ Details and how-tos are in docs-site, not in long root markdown files.

Root one-off guides were moved under docs-site/docs so there is one navigable docs home.

## Architecture: Shared Core Package

Since 2026, platform-agnostic Stellar logic is extracted into a shared workspace package:

- **`packages/core/`** — `@stellar-dev-dashboard/core`
- Network configuration (`NETWORKS`, `getServer`, `getSorobanServer`)
- Validation (addresses, amounts, memos, contracts, URLs)
- Formatters (XLM, addresses, stroops, dates, relative time)
- Address utilities (validation, resolution, SEP-29 memo check)
- Reserve calculations
- Operation labels
- High-level services (`fetchAccount`, `fetchTransactions`, `fetchNetworkStats`, `fetchXLMPrice`)
- Comprehensive test suite

- **Web app (`src/`)** — Imports from `@stellar-dev-dashboard/core`, keeps web-specific code (rate limiting, request coalescing, browser storage, network probing)
- **Mobile app (`mobile/`)** — Imports from `@stellar-dev-dashboard/core`, keeps mobile-specific code (AsyncStorage caching, React Native hooks)

This eliminates parity issues (#883) by ensuring both platforms share identical validation, formatting, and data-access logic.

See `packages/core/README.md` for full API reference and migration notes.

## License

### SEP-38 Integration
Expand Down
1 change: 1 addition & 0 deletions mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@react-native-community/netinfo": "^11.4.1",
"@react-native-firebase/app": "^21.6.0",
"@react-native-firebase/messaging": "^21.6.0",
"@stellar-dev-dashboard/core": "workspace:*",
"@stellar/stellar-sdk": "^12.3.0",
"react": "^18.3.0",
"react-native": "^0.76.0",
Expand Down
Loading