# Project export: GroupGrub

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: TreeHacks 2024
- Tagline: Have you ever tried deciding where to eat with an indecisive group of people? GroupGrub solves exactly that- with a simple interface to solve the complexity of you (and your friends).
- Devpost: https://devpost.com/software/groupgrub
- GitHub: https://github.com/sarthak815/GroupGrub
- Team: 4 GitHub contributor(s) — Akansha Negi (38 commits), Cody Lin (23 commits), Vaibhav Honakere (9 commits), Sarthak Shastri (4 commits)

## Devpost submission (written by the team)

### Inspiration

One of our team members was sharing biryani with a friend in a small town when he mentioned his love for trying new cultural cuisines. He noted that it was especially difficult to find places that could fulfill all of his friend group’s cuisine dreams. When you live in a small town and have an indecisive group of friends, you learn to cherish all of the unique cuisine you stumble across that you and all of your friends wished you had found sooner. In bigger cities, the quest for trying new foods is an even bigger challenge. There are so many fast food places and local businesses that it’s hard to keep track of the new restaurant on the block you’ve been meaning to try. If only there was a way to explore good food and all the smaller, more obscure restaurants that have delicious home-cooked meals. _ Oh wait, there is… _ What GroupGrub does GroupGrub is a social foodie app that curates top restaurant picks in your area based on you and your friends’ personal food preferences. Simply create a new group session, scan the QR code, and update your cuisine preferences and what you feel like eating that day. GroupGrub is designed to take your group’s preferred food data and find the best reviewed restaurants near you. It is specifically trained on AI modeling to curate the perfect restaurant list so you and your friends can enjoy good cuisine without the indecisiveness. The app is trained to match everyone’s unique dietary restrictions, cuisine desires, budget, and location to ensure recommendations that best suits the group. The Building Process We used React Native and Expo to create the mobile app. We used Firebase Firestore to store the data from the React Native end. Using the data stored on the Firestore, we call our recommendation algorithm which is done using Vespa using text embeddings. This also allows us to get a relevance score for all of our text matching that we perform.

### Challenges we ran into

During our project's evolution, we encountered a series of unforeseen bugs, including some unique ones stemming from disparities between Unix and Windows environments, notably in spacing conventions. These differences often led to checksum mismatches in our certificates, triggering errors that demanded meticulous troubleshooting. Furthermore, integrating new tools and products, such as Vespa, presented a steep learning curve. Our initiation with Vespa posed significant challenges, particularly in its setup and comprehension of its features. Nonetheless, each hurdle served as a valuable learning opportunity, enriching our expertise in software development and integration processes while offering insights into the complexities of the technologies at play.

### Accomplishments we're proud of

We created and implemented a QR code scanning system, which allows users of the app to scan their friend’s group sessions and curate restaurants specifically to multiple friends’ food preferences. We used Vespa’s AI tooling to take restaurant reviews and categories of foods and translate it to curating a perfect restaurant feed for multiple data preferences. We also used location pinpointing to find restaurants that matched the group’s preferences but leveraged Vespa’s AI to prioritize catering to food preferences even if they were a little further away than other restaurants. We’re proud of our uniform logo and color scheme as they apply to the marketing world, since we are marketing our product for social foodies and other sponsors who want to give us an opportunity to continue building features of the app. We hope to brand GroupGrub as an app that can truly change how the world experiences cuisine and shares experiences with food together.

### What we learned

This app development experience has been a learning experience for every one of our team members. Members of our team were exposed to React Native for the first time, and developing a mobile application was a first for a lot of us. The shift from Web Development to Mobile App Development was refreshing in how it taught a lot of us different debugging techniques, since we had to avoid using web development tools. For the designing side of the team, they learned to design an entire brand and uniform mobile app from the ground up. This was encouraging as it taught the team how to start their own brand or company someday and that the team could, in fact, do it as we did during this event. We learned to not only work with one another but work with mentors from all over the industry as well as work with those who created the software itself.

### What's next

We’re hoping to scale GroupGrub to a full-grown app that people can download to change the way people find food together. GroupGrub has the potential to be a widely used platform where people can share and find other foodie lovers, curate their restaurant experiences, and use a variety of other features implemented in the future, such as a receipt scanner built in the app that would scan a receipt and easily split the bill between friends using third party applications like Venmo. With GroupGrub’s implementation of AI agents, machine learning, and many opportunities to support other cool features, GroupGrub has the potential to grow into an app shared by all the people we love to grab food with. GroupGrub takes care of all the little things so you can focus on the bigger things. Stay in the moment. Use GroupGrub :)

## README (from the GitHub repository)

# GroupGrub


## Detected evidence (automated analysis)

Indexed codebase: 40 recognized source files, 77 KB.
- Firebase (technology) — detected in the code
- JavaScript (language) — detected in the code
- Python (language) — detected in the code
- React (technology) — detected in the code

## Codebase structure (from repository index)

### Files (70 of 70)

```
backend/converted_data.json
backend/converted_data.jsonl
backend/flask app/app.py
backend/flask app/data-plane-private-key.pem
backend/flask app/data-plane-public-cert.pem
backend/flask app/requirements.txt
backend/intermediary.py
backend/intermediary/app.py
backend/intermediary/data-plane-private-key.pem
backend/intermediary/data-plane-public-cert.pem
backend/intermediary/requirements.txt
backend/merged_data.csv
backend/merged_final.csv
backend/pre-process.py
backend/requirements.txt
backend/RestaurantData.py
backend/san_francisco_restaurants_chinatown.csv
backend/san_francisco_restaurants_fisherman.csv
backend/san_francisco_restaurants_japan.csv
backend/san_francisco_restaurants_marina.csv
backend/san_francisco_restaurants_mission.csv
backend/san_francisco_restaurants_north.csv
backend/san_francisco_restaurants_pacific.csv
backend/san_francisco_restaurants_richmond.csv
backend/san_francisco_restaurants_richmondo.csv
backend/san_francisco_restaurants_soma.csv
backend/san_francisco_restaurants_sunset.csv
backend/san_francisco_restaurants_union.csv
backend/san_francisco_restaurants.csv
backend/san_francisco_restaurants2.csv
backend/searchAPI.py
backend/test.py
backend/vespaSearch.py
my-app/.gitignore
my-app/App.js
my-app/app.json
my-app/babel.config.js
my-app/Backend_Firebase/config.js
my-app/components/addUserInfo.jsx
my-app/components/anything.py
my-app/components/arrowbutton.component.jsx
my-app/components/BlankPage.jsx
my-app/components/button.component.jsx
my-app/components/GroupIdGenerator.jsx
my-app/components/imageButton.component.jsx
my-app/components/list-item.component.jsx
my-app/components/ListComponents.jsx
my-app/components/LocationComponent.jsx
my-app/components/navbar.component.jsx
my-app/components/post.component.jsx
my-app/components/QR_Code_Funcs.jsx
my-app/components/QRCodeGenerator.jsx
my-app/components/QRScan.jsx
my-app/components/restaurantCard.component.jsx
my-app/package.json
my-app/pages/.NameInput.jsx.swp
my-app/pages/.restrictions.screen.jsx.swp
my-app/pages/All_Group_Members.jsx
my-app/pages/budget.screen.jsx
my-app/pages/cuisineRec.screen.jsx
my-app/pages/details.screen.jsx
my-app/pages/foodRec.screen.jsx
my-app/pages/groupRec.screen.jsx
my-app/pages/home.screen.jsx
my-app/pages/NameInput.jsx
my-app/pages/profile.screen.jsx
my-app/pages/Register.jsx
my-app/pages/restrictions.screen.jsx
my-app/pages/scan.screen.jsx
README.md
```

### Dependencies

- my-app/package.json: @babel/core@^7.20.0, @expo/metro-runtime@~3.1.3, @million/lint@^0.0.32, @react-native-community/masked-view@^0.1.11, @react-navigation/native@^6.1.10, @react-navigation/native-stack@^6.9.18, expo@~50.0.7, expo-barcode-scanner@~12.9.3, expo-location@~16.5.3, expo-status-bar@~1.11.1, firebase@^10.7.1, react@18.2.0, react-native@0.73.4, react-native-gesture-handler@~2.14.0, react-native-qrcode-svg@^6.3.0, react-native-reanimated@~3.6.2, react-native-safe-area-context@4.8.2, react-native-screens@~3.29.0, react-native-web@~0.19.6, react-navigation@^5.0.0

### Recent commits (newest first)

- ah
- more cards
- Merge branch 'main' of https://github.com/sarthak815/GroupGrub
- card
- json load
- Merge branch 'main' of https://github.com/sarthak815/GroupGrub
- fixed bugs
- Merge pull request #22 from sarthak815/pleaseWork
- api code
- Merge pull request #21 from sarthak815/idk
- fix bug?
- Merge branch 'main' of https://github.com/sarthak815/GroupGrub
- back-end files
- Merge pull request #20 from sarthak815/restaurant-card
- restaurant card component
- Merge branch 'main' of https://github.com/sarthak815/GroupGrub
- Please
- yuh
- yes
- Merge pull request #19 from sarthak815/budget-page

## Key source files (fetched from GitHub, selected and truncated for size)

### my-app/package.json

```
{
  "name": "my-app",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@expo/metro-runtime": "~3.1.3",
    "@million/lint": "^0.0.32",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-navigation/native": "^6.1.10",
    "@react-navigation/native-stack": "^6.9.18",
    "expo": "~50.0.7",
    "expo-barcode-scanner": "~12.9.3",
    "expo-status-bar": "~1.11.1",
    "firebase": "^10.7.1",
    "react": "18.2.0",
    "react-native": "0.73.4",
    "react-native-gesture-handler": "~2.14.0",
    "react-native-qrcode-svg": "^6.3.0",
    "react-native-reanimated": "~3.6.2",
    "react-native-safe-area-context": "4.8.2",
    "react-native-screens": "~3.29.0",
    "react-native-web": "~0.19.6",
    "react-navigation": "^5.0.0",
    "expo-location": "~16.5.3"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0"
  },
  "private": true
}

```

### backend/requirements.txt

```
��a i o h t t p = = 3 . 9 . 3  
 a i o s i g n a l = = 1 . 3 . 1  
 a p i s p e c = = 6 . 4 . 0  
 a t t r s = = 2 3 . 2 . 0  
 b e c h 3 2 = = 1 . 2 . 0  
 b l i n k e r = = 1 . 7 . 0  
 c e r t i f i = = 2 0 2 4 . 2 . 2  
 c h a r s e t - n o r m a l i z e r = = 3 . 3 . 2  
 c l i c k = = 8 . 1 . 7  
 c o l o r a m a = = 0 . 4 . 6  
 c o s m p y = = 0 . 9 . 2  
 e c d s a = = 0 . 1 8 . 0  
 F l a s k = = 3 . 0 . 2  
 f r o z e n l i s t = = 1 . 4 . 1  
 g o o g l e a p i s - c o m m o n - p r o t o s = = 1 . 6 2 . 0  
 g r p c i o = = 1 . 6 0 . 1  
 h 1 1 = = 0 . 1 4 . 0  
 i d n a = = 3 . 6  
 i t s d a n g e r o u s = = 2 . 1 . 2  
 J i n j a 2 = = 3 . 1 . 3  
 j s o n s c h e m a = = 4 . 2 1 . 1  
 j s o n s c h e m a - s p e c i f i c a t i o n s = = 2 0 2 3 . 1 2 . 1  
 M a r k u p S a f e = = 2 . 1 . 5  
 m s g p a c k = = 1 . 0 . 7  
 m u l t i d i c t = = 6 . 0 . 5  
 n u m p y = = 1 . 2 6 . 4  
 p a c k a g i n g = = 2 3 . 2  
 p a n d a s = = 2 . 2 . 0  
 p r o t o b u f = = 4 . 2 5 . 3  
 p y a r r o w = = 1 5 . 0 . 0  
 p y c r y p t o d o m e = = 3 . 2 0 . 0  
 p y d a n t i c = = 1 . 1 0 . 1 4  
 p y t h o n - d a t e u t i l = = 2 . 8 . 2  
 p y t z = = 2 0 2 4 . 1  
 r e f e r e n c i n g = = 0 . 3 3 . 0  
 r e q u e s t s = = 2 . 3 1 . 0  
 r p d s - p y = = 0 . 1 8 . 0  
 s i x = = 1 . 1 6 . 0  
 t y p i n g _ e x t e n s i o n s = = 4 . 9 . 0  
 t z d a t a = = 2 0 2 4 . 1  
 u a g e n t s = = 0 . 1 0 . 0  
 u r l l i b 3 = = 2 . 2 . 0  
 u v i c o r n = = 0 . 2 0 . 0  
 w e b s o c k e t s = = 1 0 . 4  
 W e r k z e u g = = 3 . 0 . 1  
 y a r l = = 1 . 9 . 4  
 
```

### backend/flask app/requirements.txt

```
��a i o h t t p = = 3 . 9 . 3  
 a i o s i g n a l = = 1 . 3 . 1  
 a p i s p e c = = 6 . 4 . 0  
 a t t r s = = 2 3 . 2 . 0  
 b e c h 3 2 = = 1 . 2 . 0  
 b l i n k e r = = 1 . 7 . 0  
 c e r t i f i = = 2 0 2 4 . 2 . 2  
 c h a r s e t - n o r m a l i z e r = = 3 . 3 . 2  
 c l i c k = = 8 . 1 . 7  
 c o l o r a m a = = 0 . 4 . 6  
 c o s m p y = = 0 . 9 . 2  
 e c d s a = = 0 . 1 8 . 0  
 F l a s k = = 3 . 0 . 2  
 f r o z e n l i s t = = 1 . 4 . 1  
 g o o g l e a p i s - c o m m o n - p r o t o s = = 1 . 6 2 . 0  
 g r p c i o = = 1 . 6 0 . 1  
 h 1 1 = = 0 . 1 4 . 0  
 i d n a = = 3 . 6  
 i t s d a n g e r o u s = = 2 . 1 . 2  
 J i n j a 2 = = 3 . 1 . 3  
 j s o n s c h e m a = = 4 . 2 1 . 1  
 j s o n s c h e m a - s p e c i f i c a t i o n s = = 2 0 2 3 . 1 2 . 1  
 M a r k u p S a f e = = 2 . 1 . 5  
 m s g p a c k = = 1 . 0 . 7  
 m u l t i d i c t = = 6 . 0 . 5  
 n u m p y = = 1 . 2 6 . 4  
 p a c k a g i n g = = 2 3 . 2  
 p a n d a s = = 2 . 2 . 0  
 p r o t o b u f = = 4 . 2 5 . 3  
 p y a r r o w = = 1 5 . 0 . 0  
 p y c r y p t o d o m e = = 3 . 2 0 . 0  
 p y d a n t i c = = 1 . 1 0 . 1 4  
 p y t h o n - d a t e u t i l = = 2 . 8 . 2  
 p y t z = = 2 0 2 4 . 1  
 r e f e r e n c i n g = = 0 . 3 3 . 0  
 r e q u e s t s = = 2 . 3 1 . 0  
 r p d s - p y = = 0 . 1 8 . 0  
 s i x = = 1 . 1 6 . 0  
 t y p i n g _ e x t e n s i o n s = = 4 . 9 . 0  
 t z d a t a = = 2 0 2 4 . 1  
 u a g e n t s = = 0 . 1 0 . 0  
 u r l l i b 3 = = 2 . 2 . 0  
 u v i c o r n = = 0 . 2 0 . 0  
 w e b s o c k e t s = = 1 0 . 4  
 W e r k z e u g = = 3 . 0 . 1  
 y a r l = = 1 . 9 . 4  
 
```

### backend/intermediary/requirements.txt

```
��a i o h t t p = = 3 . 9 . 3  
 a i o s i g n a l = = 1 . 3 . 1  
 a p i s p e c = = 6 . 4 . 0  
 a t t r s = = 2 3 . 2 . 0  
 b e c h 3 2 = = 1 . 2 . 0  
 b l i n k e r = = 1 . 7 . 0  
 c e r t i f i = = 2 0 2 4 . 2 . 2  
 c h a r s e t - n o r m a l i z e r = = 3 . 3 . 2  
 c l i c k = = 8 . 1 . 7  
 c o l o r a m a = = 0 . 4 . 6  
 c o s m p y = = 0 . 9 . 2  
 e c d s a = = 0 . 1 8 . 0  
 F l a s k = = 3 . 0 . 2  
 f r o z e n l i s t = = 1 . 4 . 1  
 g o o g l e a p i s - c o m m o n - p r o t o s = = 1 . 6 2 . 0  
 g r p c i o = = 1 . 6 0 . 1  
 h 1 1 = = 0 . 1 4 . 0  
 i d n a = = 3 . 6  
 i t s d a n g e r o u s = = 2 . 1 . 2  
 J i n j a 2 = = 3 . 1 . 3  
 j s o n s c h e m a = = 4 . 2 1 . 1  
 j s o n s c h e m a - s p e c i f i c a t i o n s = = 2 0 2 3 . 1 2 . 1  
 M a r k u p S a f e = = 2 . 1 . 5  
 m s g p a c k = = 1 . 0 . 7  
 m u l t i d i c t = = 6 . 0 . 5  
 n u m p y = = 1 . 2 6 . 4  
 p a c k a g i n g = = 2 3 . 2  
 p a n d a s = = 2 . 2 . 0  
 p r o t o b u f = = 4 . 2 5 . 3  
 p y a r r o w = = 1 5 . 0 . 0  
 p y c r y p t o d o m e = = 3 . 2 0 . 0  
 p y d a n t i c = = 1 . 1 0 . 1 4  
 p y t h o n - d a t e u t i l = = 2 . 8 . 2  
 p y t z = = 2 0 2 4 . 1  
 r e f e r e n c i n g = = 0 . 3 3 . 0  
 r e q u e s t s = = 2 . 3 1 . 0  
 r p d s - p y = = 0 . 1 8 . 0  
 s i x = = 1 . 1 6 . 0  
 t y p i n g _ e x t e n s i o n s = = 4 . 9 . 0  
 t z d a t a = = 2 0 2 4 . 1  
 u a g e n t s = = 0 . 1 0 . 0  
 u r l l i b 3 = = 2 . 2 . 0  
 u v i c o r n = = 0 . 2 0 . 0  
 w e b s o c k e t s = = 1 0 . 4  
 W e r k z e u g = = 3 . 0 . 1  
 y a r l = = 1 . 9 . 4  
 
```

### my-app/App.js

```javascript
import { useState } from 'react';
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';

import HomeScreen from './pages/home.screen';
import DetailsScreen from './pages/details.screen';
import NameInput from './pages/NameInput';
import Restrictions from './pages/restrictions.screen';
import CuisineRec from './pages/cuisineRec.screen';
import FoodRec from './pages/foodRec.screen';
import GroupRec from './pages/groupRec.screen';
import Profile from './pages/profile.screen';
import Scan from './pages/scan.screen';
import GroupIdGenerator from './components/GroupIdGenerator';
import QRCodeScanner from './components/QRScan';
import { ListMembers } from './components/ListComponents';
import Register from './pages/Register';
import Login from './pages/NameInput';
import BlankPage from './components/BlankPage';
import Budget from './pages/budget.screen';

const Stack = createNativeStackNavigator();

export default function App() {
  return (
    <NavigationContainer>
      <Stack.Navigator>
        <Stack.Screen
          name='Home'
          component={HomeScreen}
          options={{ title: 'Home' }}
        />
        <Stack.Screen
          name='Details'
          component={DetailsScreen}
          options={{ title: 'Details' }}
        />
        <Stack.Screen
          name='Login'
          component={Login}
          options={{ title: 'Login' }}
        />
        <Stack.Screen
          name='Restrictions'
          component={Restrictions}
          options={{ title: 'Restrictions' }}
        />
        <Stack.Screen
          name='GroupRec'
          component={GroupRec}
          options={{ title: 'Group Recommendation' }}
        />
        <Stack.Screen
          name='Profile'
          component={Profile}
          options={{ title: 'Profile' }}
        />
        <Stack.Screen
          name='QR_Scanner'
          component={QRCodeScanner}
          options={{ title: 'QR_Scanner' }}
        />
        <Stack.Screen
          name='QR_Generate'
          component={GroupIdGenerator}
          options={{ title: 'QR_Generate' }}
        />
        <Stack.Screen
          name='List_Groups'
          component={ListMembers}
          options={{ title: 'List_Groups' }}
        />
        <Stack.Screen
          name='Register'
          component={Register}
          options={{ title: 'Register' }}
        />
        <Stack.Screen
          name='BlankPage'
          component={BlankPage}
          options={{ title: 'BlankPage'}}
        />
        <Stack.Screen name='CuisineRec'
          component={CuisineRec}
          options={{ title: 'Cuisine' }}
        />
        <Stack.Screen
          name='FoodRec'
          component={FoodRec}
          options={{ title: 'FoodRec' }}
        />
        <Stack.Screen
          name='GroupIdGenerator'
          component={GroupIdGenerator}
          options={{ title: 'GroupIdGenerator' }}
        />
        <Stack.Screen
          name='Budget'
          component={Budget}
          options={{ title: 'Budget' }}
        />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#FEFFFD',
    alignItems: 'center',
    justifyContent: 'center',
  },
  button: {
    backgroundColor: '#ccc',
    padding: 10,
    borderRadius: 15,
    margin: 10,
  },
});
```

### backend/flask app/app.py

```python
from flask import Flask, request, jsonify
import requests

app = Flask(__name__)

# Define the URL for the Vespa API endpoint
VESPA_URL = 'https://b072f172.cb76d810.z.vespa-app.cloud/search/'

# Define the path to the key and certificate files
KEY_PATH = 'data-plane-private-key.pem'
CERT_PATH = 'data-plane-public-cert.pem'


@app.route('/search', methods=['POST'])
def search():
    data = request.json

    # Extract data from the request
    categories = data.get('categories')
    price = data.get('price')
    latitude = data.get('latitude')
    longitude = data.get('longitude')

    # Define the query parameters for Vespa
    params = {
        'timeout': '10s',
        'yql': f"select * from restaurant where categories contains '{categories}' and price contains '{price}' and geoLocation(location, {latitude}, {longitude}, '20 km')",
        'ranking': 'my-rank-restaurant'
    }

    try:
        # Send the HTTP request to Vespa
        response = requests.get(VESPA_URL, params=params, cert=(CERT_PATH, KEY_PATH))

        # Check if the request was successful
        if response.status_code == 200:
            # Extract required fields from Vespa response
            vespa_response = response.json()
            restaurants = vespa_response['root']['children']
            simplified_response = []
            for restaurant in restaurants:
                simplified_restaurant = {
                    'Name': restaurant['fields']['name'],
                    'Address': restaurant['fields']['address'],
                    'Rating': restaurant['fields'].get('rating', 'Not Available')
                    # Use 'Not Available' if rating is not present
                }
                simplified_response.append(simplified_restaurant)

            # Return simplified response to the React Native app
            return jsonify(simplified_response)
        else:
            return jsonify({'error': f"Error: {response.status_code}"})
    except Exception as e:
        return jsonify({'error': str(e)})


if __name__ == '__main__':
    app.run(debug=True)  # You may want to set debug=False in production

```

### backend/intermediary/app.py

```python
from flask import Flask, request, jsonify
import requests

app = Flask(__name__)

# Define the URL for the Vespa API endpoint
VESPA_URL = 'https://b072f172.cb76d810.z.vespa-app.cloud/search/'

# Define the path to the key and certificate files
KEY_PATH = 'data-plane-private-key.pem'
CERT_PATH = 'data-plane-public-cert.pem'

@app.route('/')
def hello():
    return 'Hello, World!'

@app.route('/search', methods=['POST'])
def search():
    data = request.json

    # Extract data from the request
    categories = data.get('categories')
    price = data.get('price')
    latitude = data.get('latitude')
    longitude = data.get('longitude')

    # Define the query parameters for Vespa
    params = {
        'timeout': '10s',
        'yql': f"select * from restaurant where categories contains '{categories}' and price contains '{price}' and geoLocation(location, {latitude}, {longitude}, '20 km')",
        'ranking': 'my-rank-restaurant'
    }

    try:
        # Send the HTTP request to Vespa
        response = requests.get(VESPA_URL, params=params, cert=(CERT_PATH, KEY_PATH))

        # Check if the request was successful
        if response.status_code == 200:
            # Extract required fields from Vespa response
            vespa_response = response.json()
            restaurants = vespa_response['root']['children']
            simplified_response = []
            for restaurant in restaurants:
                simplified_restaurant = {
                    'Name': restaurant['fields']['name'],
                    'Address': restaurant['fields']['address'],
                    'Rating': restaurant['fields'].get('rating', 'Not Available')
                    # Use 'Not Available' if rating is not present
                }
                simplified_response.append(simplified_restaurant)

            # Return simplified response to the React Native app
            return jsonify(simplified_response)
        else:
            return jsonify({'error': f"Error: {response.status_code}"})
    except Exception as e:
        return jsonify({'error': str(e)})


if __name__ == '__main__':
    app.run(debug=True)  # You may want to set debug=False in production

```

### my-app/babel.config.js

```javascript
module.exports = function(api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
  };
};

```

### backend/test.py

```python
import requests

# Define the URL of your Flask API endpoint
url = 'http://ec2-18-144-29-168.us-west-1.compute.amazonaws.com/search'  # Update the URL if your Flask app is running on a different address

# Sample input data
data = {
    'categories': 'Italian',
    'keywords': 'great pizza',
    'latitude': 37.7749,
    'longitude': -122.4194,
    'price': '$$'  # Assuming you'll use this later
}

# Make a POST request to the Flask API
response = requests.post(url, json=data)

# Print the response from the Flask API
print(response.json())

```

### backend/vespaSearch.py

```python
import requests

# Define the URL for the Vespa API endpoint
url = 'https://b072f172.cb76d810.z.vespa-app.cloud/search/'

# Define the query parameters
params = {
    'timeout': '10s',
    'yql': "select * from restaurant where categories contains 'pizza' and price contains '$$' and geoLocation(location, 37.6, -122.41, '20 km')",
    'ranking': 'my-rank-restaurant'
}

# Define the path to the key and certificate files
key_path = 'C:\\Users\\Sarthak\\.vespa\\groupgrub.myapp.default\\data-plane-private-key.pem'
cert_path = 'C:\\Users\\Sarthak\\.vespa\\groupgrub.myapp.default\\data-plane-public-cert.pem'

# Send the HTTP request
response = requests.get(url, params=params, cert=(cert_path, key_path))

# Check if the request was successful
if response.status_code == 200:
    # Print the response content
    print(response.text)
else:
    print(f"Error: {response.status_code}")

```

[32 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]