SpoonExplorer is a web application that helps users explore and find restaurants based on their preferred cuisine and location. Users can either enter a location manually or use their live location to find nearby restaurants.
- Search for restaurants by cuisine and location.
- Use live location to find nearby restaurants.
- Display search results with restaurant details.
- Show restaurant locations on a Google Map with markers.
- Node.js
- Express.js
- EJS (Embedded JavaScript) for templating
- Tailwind CSS for styling
- Google Maps JavaScript API
- Yelp API for restaurant data
- Browser Geolocation API
- Node.js and npm installed on your machine.
- A Google Maps API key.
- A Yelp API key.
-
Clone the repository:
git clone https://github.com/yourusername/spoonexplorer.git cd spoonexplorer -
Install the dependencies:
npm install
-
Create a
.envfile in the root directory and add your API keys:GOOGLE_MAPS_API_KEY=your_google_maps_api_key YELP_API_KEY=your_yelp_api_key -
Start the server:
npm run dev
-
Open your browser and navigate to
http://localhost:8888.
- Enter your preferred cuisine in the "Preferred Cuisine" field.
- Either check the "Use My Live Location" checkbox or enter a location manually in the "Location" field.
- Click the "Search" button to see the results.
- The left side of the page shows the list of restaurants based on your search criteria.
- The right side of the page displays a Google Map with markers for each restaurant.
The application uses the Yelp API to fetch restaurant data based on the user's search criteria.
The application uses the Google Maps JavaScript API to display restaurant locations on a map with markers.
The application uses the Browser Geolocation API to get the user's live location if they choose to use it. This allows the app to find nearby restaurants based on the user's current location.