Secure pet health records, medication reminders, QR scanning, and emergency SOS — powered by blockchain.
PetChain is a comprehensive mobile application for pet owners to securely manage their pets' medical records, medication schedules, vet appointments, and emergency contacts. Built with React Native and Expo, it integrates with the Stellar blockchain to provide immutable, verifiable health records.
This repository contains everything needed for app store submission under the storelisting/ directory and legal/ folder.
Preparation Status: Ready for submission pending screenshot and icon generation.
Submission assets checklist: See storelisting/README.md
Generated assets should be placed in:
assets/— App icons (1024×1024) and splash screen (1284×2778)storelisting/screenshots/ios/— iOS App Store screenshotsstorelisting/screenshots/android/— Google Play screenshots
Legal documents:
legal/PrivacyPolicy.md— Upload to https://petchain.app/privacylegal/TermsOfService.md— Upload to https://petchain.app/terms
Metadata for store listings:
storelisting/ios-subtitle.txtstorelisting/ios-description.txtstorelisting/ios-keywords.txtstorelisting/android-short-description.txtstorelisting/android-full-description.txtstorelisting/android-keywords.txtstorelisting/release-notes-v1.0.0.txt
Screenshot capture guide:
storelisting/screenshots/CAPTURE-GUIDE.md
- 🔒 Blockchain-Verified Records: Immutable medical history on Stellar
- 📱 QR Code Scanner: Instant pet identification and record sharing
- 💊 Medication Reminders: Smart notifications for doses and refills
- 📅 Appointment Management: Vet visit scheduling with reminders
- 🚨 Emergency SOS: One-tap alert to emergency contacts with location
- 📊 Health Dashboard: Visual health scoring and trend tracking
- 👥 Multi-Pet Support: Manage unlimited pets (Premium) or 1 (Free)
- 🌐 Offline-First: Full functionality without internet
- 🔐 Privacy-First: AES-256 encryption, biometric login, GDPR compliant
- 🌍 Multi-Language: English and Spanish, more coming soon
| Layer | Technology |
|---|---|
| Framework | React Native (Expo SDK) |
| Language | TypeScript |
| Navigation | React Navigation v6 |
| Backend | Node.js, Express, PostgreSQL |
| Blockchain | Stellar SDK (medical record hashes) |
| Database | SQLite (local), PostgreSQL (cloud) |
| Storage | Encrypted AsyncStorage + Cloud Sync |
| Auth | JWT, OAuth (Google/Apple/Facebook) |
| Push | Expo Notifications (APNs & FCM) |
| Error Tracking | Sentry |
| Testing | Jest, Vitest, React Native Testing Library |
See ARCHITECTURE.md for detailed system diagrams.
- Node.js ≥ 18
- npm or yarn
- Expo CLI (
npm install -g expo-cli) - iOS Simulator or Android Emulator (optional, for local testing)
# Clone repository
git clone https://github.com/DogStark/PetChain-MobileApp.git
cd PetChain-MobileApp
# Install dependencies
npm install
# Copy environment variables
cp .env.example .env.development
# Edit .env.development with your API endpoint
# Start development server
npm start# Start Expo and press i (iOS) or a (Android) in the terminal
npm start
# Or scan the QR code with Expo Go on your phoneSee CONTRIBUTING.md for development workflow.
# 1. Ensure database is running
# 2. Run migrations
npm run migrate
# 3. Seed data
npm run seed:dev
# 4. Verify
npm test -- backend/seeds/__tests__/seedData.test.ts# Default seed
npm run seed
# Development preset
npm run seed:dev
# Testing preset (minimal data)
npm run seed:test
# Large dataset
npm run seed:large
# Custom configuration
ts-node backend/seeds/index.ts --owners 10 --vets 5 --pets 3 --records 4 --appointments 3 --medications 2| Flag | Default | Example |
|---|---|---|
--owners |
5 | --owners 10 |
--vets |
3 | --vets 5 |
--pets |
2 | --pets 3 |
--records |
3 | --records 5 |
--appointments |
2 | --appointments 4 |
--medications |
1 | --medications 2 |
Users: 5 owners + 3 vets = 8 total
Pets: 5 owners × 2 pets = 10 total
Records: 10 pets × 3 records = 30 total
Appointments: 10 pets × 2 appointments = 20 total
Medications: 10 pets × 1 medication = 10 total
PetChain enforces code quality automatically on every commit using Husky and lint-staged.
When you run git commit, Husky fires .husky/pre-commit, which in turn runs lint-staged against the staged files only — so you never wait for the entire codebase to be linted.
git commit
└─▶ .husky/pre-commit
└─▶ npx lint-staged
├─▶ ESLint --fix (on staged .ts / .tsx / .js / .jsx)
└─▶ Prettier --write (on staged .ts / .tsx / .js / .jsx / .json / .md / .yml)
If ESLint finds errors it cannot auto-fix, the commit is aborted and the issues are printed to your terminal. Fix them, git add the changes, and try again.
lint-staged is configured directly in package.json:
"lint-staged": {
"{src,backend}/**/*.{ts,tsx,js,jsx}": [
"eslint --fix --max-warnings=-1",
"prettier --write"
],
"{src,backend}/**/*.{json,md,yml,yaml}": [
"prettier --write"
],
"*.{ts,tsx,js,jsx}": [
"eslint --fix --max-warnings=-1",
"prettier --write"
]
}Husky is installed via the prepare lifecycle script, so hooks are set up automatically after npm install.
npm install # runs `husky` via the "prepare" scriptIf hooks are not triggering (e.g. after cloning into an environment where prepare was skipped):
npx husky # re-installs the hooksgit commit --no-verify -m "chore: emergency hotfix"
⚠️ Only use--no-verifywhen absolutely necessary. All CI checks still run on the pull request.
# Lint and auto-fix all TypeScript/JavaScript files
npm run lint:fix
# Check formatting without writing changes
npm run format:check
# Format all files
npm run format# Unit tests
npm test
# Lint & typecheck
npm run lint
npm run typecheck
# CI pipeline (runs on every PR)
# GitHub Actions workflows are in .github/workflows/All tests use MSW v2 to intercept HTTP requests and return realistic fixture data, eliminating real network calls in the test suite.
Setup files:
src/__mocks__/handlers.ts— REST handlers for/auth,/pets, and/appointmentsendpoints with fixture datasrc/__mocks__/server.ts— MSWsetupServerinstance wired to the above handlers
jest.setup.js automatically starts and tears down the server around every test suite:
beforeAll(() => server.listen({ onUnhandledRequest: 'warn' }));
afterEach(() => server.resetHandlers());
afterAll(() => server.close());Override handlers in a single test:
import { server } from '../../__mocks__/server';
import { http, HttpResponse } from 'msw';
it('handles 401', async () => {
server.use(
http.post('http://localhost:3000/api/auth/login', () =>
HttpResponse.json({ error: { message: 'Unauthorized' } }, { status: 401 }),
),
);
// ... rest of test
});- Privacy Policy — How we handle your data
- Terms of Service — Usage agreement
PetChain is not a substitute for professional veterinary care. Always consult a licensed veterinarian for medical advice.
- Issues: https://github.com/DogStark/PetChain-MobileApp/issues
- Email: support@petchain.app
- Twitter: @petchainapp
- Website: https://petchain.app
This project is licensed under the MIT License — see the LICENSE file for details.
- Built with ❤️ for pet lovers everywhere
- Powered by Stellar blockchain
- UI/UX inspired by modern health & fitness apps
- Thanks to all contributors and beta testers
Status: Version 1.0.0 — Ready for App Store & Google Play submission.