This repository contains the Soter mobile application. The Diagnostics screen provides developers and support personnel with quick access to key runtime information, helping them troubleshoot issues without exposing sensitive data.
- App Version – pulled from
expo-constants. - Environment – e.g.,
dev,staging,prod(displayed as a colored badge). - API Reachability – indicates whether the health endpoint is reachable.
- Network State – connection status, type (wifi/cellular/etc.), and internet reachability via
@react-native-community/netinfo. - Configured Contract ID – pulls the Soroban contract identifier from the app config. No secrets/tokens are displayed.
- Copy‑to‑Clipboard – a button that copies a sanitized diagnostics string to the clipboard for easy sharing with support.
The backend exposes Prometheus metrics at /metrics, queue health at /jobs/health, and request correlation IDs in x-correlation-id / x-request-id headers. For Testnet incident response, use docs/testnet-observability-dashboard.md to track contract call latency, transaction submission failures, callback failures, and correlated job logs.
- Fast troubleshooting – no need to open a debugger or logs; the relevant info is right in the UI.
- No secrets exposed – the clipboard string omits any API keys or private tokens.
- Consistent styling – uses the app’s theme and design system for a premium look.
(Add screenshots here if desired – you can generate them with the generate_image tool.)
# Clone the repo
git clone https://github.com/<YOUR_ORG>/Soter.git
cd Soter/app/mobile
# Install dependencies (pnpm is used in this project)
npm install -g pnpm # if you don't have pnpm globally
pnpm install
# Run the app (Expo)
pnpm start# Run all tests
pnpm test
# Run only the HealthScreen tests (useful during development)
pnpm test -- --testPathPattern=HealthScreenAll 12 tests pass:
PASS src/__tests__/HealthScreen.test.tsx (8.5s)
HealthScreen
✓ shows loading state initially
✓ renders live backend data correctly
✓ shows mock data label when backend fails
... (other tests)
- Update UI – edit
src/screens/HealthScreen.tsx. - Add tests – extend
src/__tests__/HealthScreen.test.tsxwith appropriate queries (getByTestId,getByText). - Run tests – ensure the new UI does not break existing functionality.
- Commit – follow the conventional commit format (
feat(diagnostics): ...).
- Fork the repository.
- Create a branch named
feature/your‑description. - Follow the commit style used in this project (see existing commits).
- Open a Pull Request targeting
main. - Ensure the test suite runs cleanly (
pnpm test).
This project is licensed under the MIT License – see LICENSE for details.
Generated by Antigravity AI assistant