A React Native/Expo app that shows you how much you wasted on food delivery through Uber CSV imports, then roasts you.
- Forgot Password - Password reset flow (shipped with OTP UX)
- Email Verification - Verify user emails on registration
- Social Login - Google and Apple Sign In
- Biometric Auth - Face ID / Touch ID support
- Multi-Template Sharing - Additional Wrapped-style slide variations
- Currency Auto-Detection - Detect CAD/USD/EUR from CSV or locale
- Receipt List View - Browse individual transactions
- Performance Optimization - Bundle size and loading improvements
- Node.js 20+ (LTS recommended)
- Docker Desktop
- Git
-
Clone and setup
git clone https://github.com/harry-david-brown/SnackTrackApp.git cd SnackTrackApp npm run setupThe setup script will:
- β Check system requirements
- β Install dependencies
- β
Create
.envfile with default configuration - β Start development databases
Windows users: Run
scripts\setup.batinstead -
Configure API URL (optional)
The setup script creates a
.envfile with Railway production API as default. You can update it if needed:# .env (defaults to Railway production) EXPO_PUBLIC_API_URL=https://snacktrackapi-production.up.railway.app EXPO_PUBLIC_APP_ENV=developmentDefault:
EXPO_PUBLIC_API_URLdefaults to Railway production API- Default:
https://snacktrackapi-production.up.railway.app(Railway production) - Local dev:
http://localhost:3000(if running backend locally) - Mobile testing:
http://YOUR_IP:3000(use your computer's IP for local backend)
βΉοΈ The app defaults to Railway production API. Set
EXPO_PUBLIC_API_URLonly if you need a different API. - Default:
-
Start the backend API (in a separate terminal)
cd path/to/SnackTrackAPI docker-compose up --build -d -
Start the app
npm start # Press 'w' to open in browser -
Verify setup
npm run verify
App won't start?
- Check that
EXPO_PUBLIC_API_URLis set in.env - Run
npm run verifyto check all requirements
Can't connect to API?
- Ensure the backend API is running (
docker-compose up -d) - For mobile testing, use your computer's IP address instead of
localhost
Need help?
- Check the Development Guide below
- Run
npm run verifyfor setup diagnostics
Optional (with defaults):
EXPO_PUBLIC_API_URL- API base URL, defaults tohttps://snacktrackapi-production.up.railway.app(Railway production)EXPO_PUBLIC_APP_ENV- Environment type (development,staging,production), defaults todevelopmentEXPO_PUBLIC_SENTRY_DSN- Sentry DSN for error tracking (optional - app works without it)
The npm run setup script creates a .env file automatically with Railway production API as default. Edit it to customize your configuration (e.g., for local development).
Error Tracking (Sentry):
- Sentry is integrated for production error tracking and crash reporting
- Set
EXPO_PUBLIC_SENTRY_DSNin your environment to enable (get DSN from https://sentry.io) - App works normally without Sentry configured (errors are logged to console in development)
# App Development
npm start # Start Expo dev server
npm run start:clean # Clean start (kills existing processes)
npm run stop-expo # Stop all Expo/Metro processes
# Code Quality
npm run lint # Run ESLint
npm run type-check # TypeScript type checking
npm test # Run tests
npm run ci # Run all CI checks (type-check + lint + test)
npm run verify # Verify setup and environment-
Install Expo Go on your device
- iOS: App Store
- Android: Google Play
-
Start the dev server
npx expo start
-
Open Expo Go the development server should show up automatically. Or scan the QR code in your terminal
For mobile to connect to local API:
- Find your computer's IP:
ip addr show(Linux) orifconfig(Mac) - Update
.env:EXPO_PUBLIC_API_URL=http://YOUR_IP:3000(overrides Railway default) - Restart Expo
For comprehensive manual testing of network/offline features, error handling, and file uploads:
- Manual Testing Guide - Complete testing scenarios, checklists, and tools
π± Snack Track App/
βββ π app/ # Expo Router pages
β βββ (tabs)/ # Tab navigation screens
β β βββ index.tsx # Dashboard
β β βββ upload.tsx # CSV/ZIP Upload
β β βββ wrapped-journey.tsx # Analytics journey
β β βββ profile.tsx # User Profile
β βββ _layout.tsx # Root layout
β βββ index.tsx # Authentication
β
βββ π§ components/ # Reusable components
β βββ LoginScreen.tsx # Authentication UI
β βββ PasswordResetModal.tsx # Password reset flow
β βββ EmailVerificationModal.tsx # Email verification
β βββ UberDataUpload.tsx # File upload
β βββ WrappedShareJourney.tsx # Analytics journey
β βββ [Other components] # Charts, sharing, etc.
β
βββ π£ contexts/ # React Context
β βββ UserContext.tsx # User state & auth
β βββ OnboardingContext.tsx # Onboarding state
β
βββ π services/ # API services
β βββ api.ts # API client
β βββ authApi.ts # Authentication
β βββ analyticsApi.ts # Analytics
β
βββ πͺ hooks/ # Custom hooks
β βββ useNetworkStatus.ts # Network monitoring
β βββ useOfflineSync.ts # Offline sync
β
βββ π οΈ utils/ # Utilities
β βββ tokenManager.ts # Token storage (SecureStore)
β βββ offlineCache.ts # Analytics caching
β
βββ π types/ # TypeScript types
β βββ api.ts # API types
β
βββ π scripts/ # Development scripts
β βββ setup.sh # Automated setup
β βββ verify-setup.js # Environment verification
β
βββ π Configuration # Package.json, Docker, etc.
- Registration/Login: Email + password (8+ chars, 1 uppercase, 1 number)
- Token Management: Automatic refresh every 15 minutes
- Secure Storage: Tokens stored in encrypted Keychain/Keystore (Expo SecureStore)
- Session Management: Persistent login with auto-logout on expiry
- Password Reset: 4-step OTP flow (request β verify β reset β success)
- Email Verification: Optional OTP-based verification (non-blocking)
- Rate Limiting: Built-in protection against abuse
Status: β Automated quality checks on every push
- β TypeScript type checking
- β ESLint linting
- β Unit tests
- β Security audit
Automatically runs type-check and lint before each commit.
Run checks locally:
npm run ci # Runs all CI checksSee CONTRIBUTING.md for contribution guidelines.
- Launch Checklist: LAUNCH_TODO.md
- Backend Integration: See backend project documentation
Questions? Run npm run verify to diagnose setup issues, or check the troubleshooting section above.