Skip to content

smashpro-digital/togetherfunds

Repository files navigation

TogetherFunds

TogetherFunds is a warm, mobile-first Expo app for couples who want to plan shared expenses, monthly bills, savings goals, and virtual cash-envelope piggy banks.

Local Setup

npm install
npx expo start --tunnel

Open Expo Go on your phone and scan the QR code shown by Expo.

Included Areas

  • Dashboard summary
  • Monthly expenses
  • Virtual piggy banks
  • Add and edit expense forms
  • Add and edit piggy bank forms
  • Partner contribution tracking
  • Partner summary
  • Plaid Sandbox-ready bank sync mock
  • Recent transaction assignment mock
  • AsyncStorage persistence
  • Demo data reset

Plaid Sandbox Bank Sync

The Bank Sync screen is a sandbox-ready architecture for Plaid integration. The current MVP uses mock data only so Expo Go remains runnable with:

npm install
npx expo start --tunnel

Security rules for production:

  • Plaid Link must be used on the client. Do not ask users for bank usernames or passwords directly.
  • The Plaid public_token must be exchanged for an access_token on a secure backend.
  • The Plaid access_token must never be stored in AsyncStorage or on the device.
  • Backend services should handle all Plaid API calls and return only safe account metadata and app-ready transaction data.
  • Add a Firebase, Supabase, or Node backend before connecting real financial institutions.

The local mock stores only sandbox account metadata and mock transactions:

  • Institution name
  • Account name and type
  • Last 4 digits
  • Current/available balances when provided
  • Last synced time

SmashPro Tenant API

TogetherFunds is scaffolded to fit the SmashPro shared app architecture. The backend API uses:

  • spd_apps for reusable app registration with app_key = togetherfunds
  • spd_app_tenants for tenant/workspace scope with tenant_key = demo-couple
  • spd_app_features using SmashPro's app_slug + code convention
  • spd_app_feature_flags for tenant-level feature overrides
  • spd_app_component_registry and spd_app_component_configs for reusable app components
  • spd_tf_* tables for TogetherFunds-specific couples, expenses, envelopes, contributions, bank metadata, and transaction assignments
  • spd_users plus shared membership, session, preference, and app-setting tables for reusable SmashPro login
  • spd_api_keys and spd_api_error_logs for shared auth and API logging

The Expo client sends these headers on server requests:

X-SmashPro-Api-Key
X-SmashPro-App-Key: togetherfunds
X-SmashPro-Tenant-Key: demo-couple
Authorization: Bearer <session_token>

Server Sync Mode in Settings shows the app key, tenant key, API health, and feature flags returned by the server.

The temporary Auth Debug button in Settings calls:

  • health.get.php
  • auth.debug.get.php
  • app.context.get.php

It shows HTTP status, server messages, endpoint URL, and missing auth tables/columns when returned.

Shared SmashPro Login

TogetherFunds uses one SmashPro account across apps. A user can register once, receive a TogetherFunds app membership, and keep app-specific preferences such as display name, currency, theme mode, dashboard layout, envelope style, and default budget period.

  • Passwords are hashed server-side with password_hash() and verified with password_verify().
  • Raw session tokens are returned once and stored in the mobile app with expo-secure-store.
  • The database stores only hashed session and refresh tokens.
  • Logout revokes the server session and clears SecureStore.
  • Future OAuth/social login can attach to the same shared spd_users identity.

See docs/architecture/togetherfunds-platform-integration.md for the platform integration notes based on the SmashPro schema export.

Sample Data

  • Car Service: $600 target, $250 saved
  • Rent: $1,800 due on the 1st
  • Utilities: $260 due on the 15th
  • Groceries: $700 monthly
  • Partner A contributes $400
  • Partner B contributes $350

Project Structure

App.tsx
app.json
src/
  components/
  data/
  navigation/
  screens/
  state/
  types/
  utils/
assets/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors