Skip to content

Pulsefy/Soter

Repository files navigation

Soter Mobile Diagnostics Feature

Overview

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.

What the Diagnostics Screen shows

  • 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.

Testnet Observability

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.

Why this matters

  • 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.

Screenshots

(Add screenshots here if desired – you can generate them with the generate_image tool.)

Installation & Development

# 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

Running the Test Suite

# Run all tests
pnpm test

# Run only the HealthScreen tests (useful during development)
pnpm test -- --testPathPattern=HealthScreen

All 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)

Adding or Modifying Diagnostics

  1. Update UI – edit src/screens/HealthScreen.tsx.
  2. Add tests – extend src/__tests__/HealthScreen.test.tsx with appropriate queries (getByTestId, getByText).
  3. Run tests – ensure the new UI does not break existing functionality.
  4. Commit – follow the conventional commit format (feat(diagnostics): ...).

Contributing

  • 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).

License

This project is licensed under the MIT License – see LICENSE for details.


Generated by Antigravity AI assistant

About

Free, open-source tool for sending aid directly to people in need using the Stellar blockchain. Donors and NGOs create easy claim links; AI checks needs privately; track real impact on-chain. No middlemen, full privacy. Made with Next.js, NestJS, and Soroban. Help build it—star, fork, contribute! 🌍 #AidTech #Stellar #OpenSource

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors