Skip to content

99MXM99/cocohub-main

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐾 Cocohub

Secure pet health records, medication reminders, QR scanning, and emergency SOS β€” powered by blockchain.

License: MIT Version Platform Built with Expo Stellar Bounties on GrantFox Contributors Welcome

Cocohub is a full-stack mobile and web application for pet owners to securely manage their pets' medical records, medication schedules, vet appointments, and emergency contacts. Built with React Native and Expo, backed by a Node.js/PostgreSQL API, and anchored to the Stellar blockchain for tamper-proof record verification.


πŸ’° Contribute & Earn XLM

Cocohub is an open-source project with paid bounties. We pay contributors in XLM (Stellar Lumens) via GrantFox smart escrow for bug fixes, features, tests, translations, and docs.

Bounty Size Reward Examples
🟒 Small 5–15 XLM Bug fixes, docs, UI polish
🟑 Medium 20–50 XLM New features, translations, test suites
πŸ”΄ Large 75–150 XLM Soroban contracts, AI features, wearables

πŸ‘‰ View all open bounties β†’ πŸ‘‰ How to contribute & get paid β†’


🌐 Links

URL
Marketing site https://cocohub.app
Web app https://app.cocohub.app
iOS App Store https://apps.apple.com/app/cocohub/id000000000
Google Play https://play.google.com/store/apps/details?id=app.cocohub.mobile
Support support@cocohub.app

✨ Features

Feature Description
πŸ”’ Blockchain Records Medical history anchored on Stellar β€” tamper-proof and verifiable by any vet
πŸ’Š Medication Reminders Smart daily/weekly schedules with dose logging, refill tracking, and drug interaction detection
πŸ“… Appointment Management Book vet visits, detect conflicts, reschedule, sync to device calendar
🚨 Emergency SOS One-tap alert to emergency contacts with live GPS location
πŸ“Š Health Dashboard Health score, weight trends, vitals chart, AI predictive alerts
πŸ“± QR Scanner Instant pet identification and blockchain-verified record sharing
πŸ—ΊοΈ Vet Finder Nearby vet clinics on a live map with availability slots
πŸ‘₯ Multi-Pet Manage unlimited pets with per-pet settings (Premium)
🌐 Offline-First Full functionality without internet β€” syncs when back online
πŸ” Privacy-First AES-256 encryption, biometric login, GDPR compliant
🌍 Multi-Language English and Spanish, with RTL support
🩺 Telemedicine Video consultations via WebRTC
πŸ‘₯ Community Forum, Lost & Found network, adoption matching
⛓️ Trustlines Stellar trustlines for PETC, VETH, and PawPoints tokens

πŸ›  Tech Stack

Layer Technology
Mobile/Web Framework React Native 0.85 + Expo SDK 56
Language TypeScript 5
Navigation React Navigation v6 (native stack + bottom tabs)
State React Context + SQLite (offline)
Backend Node.js 18, Express 5, PostgreSQL 15, Redis 7
Blockchain Stellar SDK, Soroban smart contracts
Local DB expo-sqlite (AES-256 encrypted)
Auth JWT, refresh tokens, OAuth (Google/Apple/Facebook), biometrics
Push Expo Notifications (APNs & FCM)
Maps react-native-maps + OpenStreetMap tiles
Video react-native-webrtc (WebRTC telemedicine)
Error Tracking Sentry
CI/CD GitHub Actions (lint, test, build, deploy)
Testing Jest, Vitest, React Native Testing Library, Detox, Maestro
Website Next.js 16 + React 19

πŸ—‚ Project Structure

cocohub/
β”œβ”€β”€ src/                      # React Native app
β”‚   β”œβ”€β”€ navigation/           # AppNavigator, CareNavigator, MoreScreen
β”‚   β”œβ”€β”€ screens/              # 75+ screens
β”‚   β”œβ”€β”€ components/           # 60+ shared components
β”‚   β”œβ”€β”€ services/             # 85+ API + business logic services
β”‚   β”œβ”€β”€ context/              # Auth, Pet, Theme, Toast providers
β”‚   β”œβ”€β”€ theme/                # Colors, tokens, dark/light mode
β”‚   β”œβ”€β”€ hooks/                # Custom hooks
β”‚   β”œβ”€β”€ utils/                # Encryption, validators, animations
β”‚   └── __web_stubs__/        # Web-safe stubs for native modules
β”œβ”€β”€ backend/                  # Node.js API
β”‚   β”œβ”€β”€ server/               # Express app + routes
β”‚   β”œβ”€β”€ src/                  # Services, models, middleware
β”‚   β”œβ”€β”€ migrations/           # PostgreSQL migrations
β”‚   └── seeds/                # Development seed data
β”œβ”€β”€ website/                  # Next.js marketing site
β”‚   └── src/app/              # Landing page, Privacy, Terms
β”œβ”€β”€ assets/                   # App icons, splash screen
β”œβ”€β”€ legal/                    # Privacy Policy, Terms of Service
β”œβ”€β”€ storelisting/             # App Store + Google Play metadata
β”œβ”€β”€ App.tsx                   # Native entry point
β”œβ”€β”€ App.web.tsx               # Web entry point
β”œβ”€β”€ metro.config.js           # Metro bundler config
└── docker-compose.yml        # PostgreSQL + Redis + backend

πŸš€ Quick Start

Prerequisites

  • Node.js β‰₯ 18
  • Docker Desktop (for backend)
  • Expo Go on your phone (for mobile testing)

1. Install dependencies

git clone https://github.com/DogStark/Cocohub-MobileApp.git
cd Cocohub-MobileApp
npm install --legacy-peer-deps

2. Run the web app

npx expo start --web

Open http://localhost:8081 in your browser.

3. Run on your phone (Expo Go)

npx expo start

Scan the QR code with Expo Go on iOS or Android. Phone and PC must be on the same Wi-Fi.

4. Run the full stack (backend + database)

# Start PostgreSQL + Redis + API
docker-compose up

# In a new terminal β€” run migrations and seed test data
npm run migrate
npm run seed:dev

Test credentials after seeding:

Email:    owner1@example.com
Password: Password123!

οΏ½ Marketing Website

The website/ folder contains the Next.js marketing site.

cd website
npm install
npm run dev        # http://localhost:3001

Pages:

  • / β€” Landing page (hero, features, download CTAs)
  • /privacy β€” Privacy Policy
  • /terms β€” Terms of Service

Environment:

# website/.env.local
NEXT_PUBLIC_APP_URL=http://localhost:8081   # local
# NEXT_PUBLIC_APP_URL=https://app.cocohub.app  # production

Deploy to Vercel:

cd website
npx vercel --prod

πŸ“± Testing on Device

Expo Go (fastest β€” no build needed)

  1. Install Expo Go from App Store or Play Store
  2. Run npx expo start
  3. Scan the QR code

Build a preview APK (Android)

npm install -g eas-cli
eas login
eas build --platform android --profile preview

EAS builds it in the cloud and gives you a direct APK download link β€” no Play Store needed.

Build for iOS

eas build --platform ios --profile preview

Requires an Apple Developer account.


🌱 Database Seeding

npm run seed:dev     # 5 owners, 10 pets, records, appointments, medications
npm run seed:test    # Minimal β€” 2 owners, 1 vet, 1 pet
npm run seed:large   # 20 owners, 30 pets, large dataset

Seed data flags:

Flag Default Description
--owners 5 Number of pet owner accounts
--vets 3 Number of vet accounts
--pets 2 Pets per owner
--records 3 Medical records per pet
--appointments 2 Appointments per pet
--medications 1 Medications per pet

πŸ§ͺ Testing

npm test                    # Unit tests (Jest)
npm run test:ci             # CI mode with coverage
npm run typecheck           # TypeScript check
npm run lint                # ESLint
npm run e2e:test            # Maestro E2E smoke test (requires device)

⛓️ Blockchain Architecture

Cocohub uses a dual-layer verification approach:

  1. Storage layer β€” Medical records are stored encrypted on the Cocohub backend
  2. Verification layer β€” A SHA-256 hash of each record is anchored on the Stellar blockchain via manageData operations

No personal data is ever written to the blockchain β€” only hashes.

Stellar assets:

Asset Description
PETC Cocohub utility token
VETH Vet Health Credits (redeemable for services)
PAWP PawPoints loyalty rewards

Future: Soroban smart contract for on-chain pet record registry with vet access control.


πŸ“¦ App Store Submission

Assets and metadata are ready in:

  • storelisting/ β€” App Store + Google Play descriptions, keywords, release notes
  • legal/ β€” Privacy Policy and Terms of Service
  • assets/ β€” Icons and splash screen

See storelisting/README.md for the submission checklist.


πŸ”’ Security

  • All local data encrypted with AES-256-GCM via expo-sqlite
  • Auth tokens stored in device Keychain (iOS) / SecureStore (Android)
  • HMAC-SHA256 request signing on all API calls
  • SSL pinning for production API endpoints
  • Biometric re-authentication on foreground
  • Screen capture prevention on sensitive screens
  • Circuit breaker + exponential backoff on all network calls
  • Rate limiting and Helmet security headers on the backend

🀝 Contributing

See CONTRIBUTING.md for the development workflow, branch naming, and PR guidelines.


πŸ“„ Legal

Cocohub is not a substitute for professional veterinary care. Always consult a licensed veterinarian for medical advice.


πŸ“ž Support

Channel Link
Issues https://github.com/DogStark/Cocohub-MobileApp/issues
Email support@cocohub.app
Twitter @cocohubapp
Website https://cocohub.app

πŸ“’ License

MIT β€” see LICENSE for details.


Built with ❀️ for pet lovers everywhere · Powered by Stellar

About

Cocohub is a full-stack mobile and web application for pet owners to securely manage their pets' medical records, medication schedules, vet appointments, and emergency contacts. Built with React Native and Expo, backed by a Node.js/PostgreSQL API, and anchored to the Stellar blockchain for tamper-proof record verification.

Resources

License

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 96.1%
  • JavaScript 1.8%
  • HTML 0.7%
  • Shell 0.4%
  • Swift 0.3%
  • Java 0.3%
  • Other 0.4%