Skip to content

SageDevelopmentCode/dineapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

760 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dine (Digital Information For Nutrition and Emergencies)

image

A comprehensive food allergy management platform that helps individuals, families, and restaurants safely navigate food allergies through shareable digital cards, detailed allergen profiles, and restaurant safety information.

Overview

Dine is a cross-platform mobile application designed to make living with food allergies safer and easier. Whether you're managing your own allergies, caring for children with food restrictions, or running a restaurant that accommodates allergen-sensitive diners, Dine provides the tools you need.

Key Features

For Individuals

image image image image image image image image image image image image

  • Shareable Allergy Cards: Create comprehensive digital cards with your allergen information, reactions, and safety protocols
  • Emergency Cards: Store critical medical information, emergency contacts, doctors, and preferred hospitals
  • EpiPen Tracking: Manage multiple EpiPens with instructions and usage tracking
  • Travel Cards: Multi-language allergen translations and essential phrases for traveling abroad
  • Public Web Profiles: Generate shareable profile URLs to communicate your allergies with others
  • QR Code Sharing: Quick access to your allergy information

For Families

image image image image image image image

  • Family Account Management: Parents can create and manage allergy profiles for their children
  • Multiple Family Members: Track allergies for all family members in one place
  • School & Events Cards: Create specialized cards for schools, camps, and events
  • Guardian Controls: Manage your children's allergen information and emergency contacts
  • Centralized Management: One account to manage the whole family's allergy needs

For Restaurants

image image image image image image image image image image image image

  • Restaurant Profiles: Create detailed profiles showcasing your allergen accommodation capabilities
  • Menu Management: Document allergens in menu items with detailed ingredient information
  • Kitchen Protocols: Share safety procedures and cross-contamination prevention measures
  • Dietary Options: Highlight gluten-free, vegan, vegetarian, and other dietary accommodations
  • Public Web Profiles: Shareable restaurant profiles for allergen-conscious diners to review
  • Staff Management: Coordinate allergen information across your team
  • Community Engagement: Discussion threads for customer feedback and questions

Dine's Web Profile Feature

Profile Sections Collapsed v2 Restaurant Profile

Tech Stack

Frontend

  • React Native: 0.81.5 - Cross-platform mobile framework
  • Expo: ~54.0.22 - Development platform and build tools
  • TypeScript: ~5.9.2 - Type-safe development
  • Expo Router: ~6.0.14 - File-based routing and navigation
  • React: 19.1.0 - UI library

Backend & Database

  • Supabase: ^2.80.0 - Backend-as-a-Service
    • PostgreSQL database with multi-schema architecture
    • Real-time subscriptions
    • Built-in authentication
    • Storage buckets for images and media
    • Server-side RPC functions

State Management

  • React Context API: Primary application state (18 context providers)
  • TanStack React Query: ^5.90.12 - Server state management and caching

Utilities & Libraries

  • Luxon: ^3.7.2 - Date and time handling
  • React Native Gesture Handler: ~2.28.0 - Touch interactions
  • React Native Reanimated: ~4.1.1 - Animations
  • Expo Image Picker: ^17.0.8 - Photo selection and upload
  • AsyncStorage: ^2.2.0 - Local data persistence

Development Tools

  • ESLint: ^9.25.0 - Code linting
  • Supabase CLI: ^2.65.8 - Database migrations and management

Project Structure

/dineapp
├── /app                      # Expo Router pages (file-based routing)
│   ├── /(auth)              # Authentication and onboarding flows
│   ├── /(tabs)              # Main tabbed interface
│   ├── /emergency           # Emergency card screens
│   ├── /epipen              # EpiPen management screens
│   ├── /travel              # Travel card screens
│   └── /profile             # Profile management
├── /components              # Reusable React components
│   └── /ui                  # 79+ custom UI components
├── /contexts                # React Context providers (18 providers)
├── /lib                     # Library code and utilities
│   ├── /supabase            # Database models and queries (79 models)
│   │   ├── /core            # User profiles and cards
│   │   ├── /restaurant      # Restaurant and menu data
│   │   ├── /allergies       # Allergen and reaction data
│   │   ├── /emergency       # Emergency contact info
│   │   ├── /family          # Family management
│   │   ├── /travel          # Travel cards and phrases
│   │   ├── /web_profiles    # Public shareable profiles
│   │   └── /threads         # Community discussions
│   └── /storage             # File upload handlers
├── /hooks                   # Custom React hooks
├── /constants               # App configuration and data
├── /utils                   # Utility functions
├── /types                   # TypeScript type definitions
└── /supabase                # Backend configuration
    ├── /migrations          # Database migrations
    ├── /functions           # Server functions
    └── /sql                 # RPC definitions

Database Architecture

Dine uses a multi-schema PostgreSQL database through Supabase with 10 organized schemas:

  • core: User profiles and card management
  • restaurant: Restaurant profiles, menus, and allergen data
  • allergies: Allergen types, reactions, symptoms, and safety rules
  • emergency: Emergency cards, contacts, doctors, and hospitals
  • epipen: EpiPen tracking and instructions
  • family: Family groups and member relationships
  • travel: Travel cards, multi-language phrases, and translations
  • web_profiles: Public shareable user and restaurant profiles
  • threads: Community discussion posts, comments, and reactions
  • swe: School/Work/Events card management

Allergen Coverage

Dine tracks comprehensive allergen information including:

Major Allergens: Dairy, Eggs, Fish, Shellfish, Tree Nuts, Peanuts, Wheat, Soy, Sesame

Common Allergens: Corn, Coconut, Mustard, Gluten, Caffeine, Sulfites, and 15+ more

Each allergen can be tracked with:

  • Severity levels (severe, moderate, mild)
  • Reaction symptoms
  • Safety protocols
  • Cross-contamination handling

Getting Started

Prerequisites

  • Node.js 18+ installed
  • npm or yarn package manager
  • Expo CLI (installed automatically)
  • iOS Simulator (for macOS) or Android Emulator

Installation

  1. Clone the repository

    git clone <repository-url>
    cd dineapp
  2. Install dependencies

    npm install
  3. Set up environment variables

    Create a .env file in the root directory:

    EXPO_PUBLIC_SUPABASE_URL=your_supabase_project_url
    EXPO_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
  4. Start the development server

    npx expo start
  5. Run the app

    • Press i for iOS simulator
    • Press a for Android emulator
    • Scan QR code with Expo Go app for physical device testing

Development

File-based Routing

This project uses Expo Router for navigation. Routes are automatically generated from the file structure in the /app directory.

Running the App

# Start development server
npx expo start

# Start with cache cleared
npx expo start -c

# Run on specific platform
npx expo run:ios
npx expo run:android

Database Migrations

# Link to Supabase project
npx supabase link --project-ref your-project-ref

# Run migrations
npx supabase db push

# Generate TypeScript types
npx supabase gen types typescript --local > types/supabase.ts

Type Generation

TypeScript types for the database are auto-generated from the Supabase schema. Run type generation after any database changes.

Account Types

Dine supports four account types:

  1. Just Me: Individual users managing their own allergies
  2. Parent: Family accounts for managing children's allergy profiles
  3. Restaurant: Restaurant staff creating allergen-safe menus
  4. Store: Vendor accounts for product management (future feature)

Platform Support

  • iOS (iPhone and iPad)
  • Android
  • Web (Progressive Web App)

Testing

Dine uses Jest and React Native Testing Library for comprehensive unit and integration testing.

Running Tests

# Run all tests
npm test

# Run tests in watch mode (for development)
npm run test:watch

# Generate coverage report
npm run test:coverage

Test Structure

Tests are located in __tests__ directories next to the components they test:

  • app/(auth)/__tests__/welcome.test.tsx - Welcome screen tests
  • More test files can be added following this pattern

Continuous Integration

Tests run automatically via GitHub Actions:

  • ✅ On every pull request to main
  • ✅ On every push to main
  • 📊 Coverage reports are generated and stored as artifacts

All tests must pass before pull requests can be merged.

Documentation

About

Dine is a cross-platform mobile application designed to make living with food allergies safer and easier. Whether you're managing your own allergies, caring for children with food restrictions, or running a restaurant that accommodates allergen-sensitive diners, Dine provides the tools you need.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors