Welcome to the Coffee Shop Locator App for the Bay Area. This web application helps users find the nearest coffee shops based on their zip code. It also provides information about how many times a zip code has been queried on a given date. The app uses Google Maps API for location services, HTML/CSS/JavaScript for the frontend, and MongoDB as the backend data store. The server-side is built using Express.js.
This Coffee Shop Locator App was created by the following individuals:
- Gaurang Jotwani (https://www.gaurang-portfolio.com)
- Jishva Shah (https://jishvashah.github.io/Personal-Homepage/)
- You can check the following github link for grading purposes since both authors have performed their respective tasks in this repo: https://github.com/GaurangJotwani/StoreLocator/tree/main
- Due to different folders in the old repo, we couldn't deploy it properly. Hence this new repo is made after refactoring/restructuring the code into different folders a bit by Gaurang and he committed the changes after refactoring so it is now deployed on render properly.
- Task performed by Gaurang: The app will display a list of nearby coffee shops on the map, using collection stores.
- Task performed by Jishva: The app will also keep track of the query with the zip code and the date of the search in the MongoDB database, using collection zipCount.
https://drive.google.com/file/d/1CbeecVrXwPvuNPcgCcBRUdWdWYI8R6u6/view?usp=sharing
https://docs.google.com/presentation/d/12msIifGvIZOlOEdY9bwK7pyhyO8Fb8Cil5fdKV9fphc/edit?usp=sharing
https://coffeelocator.onrender.com/
https://drive.google.com/file/d/1aN6UCNfpBZ_d1x0x_K0o53-pjqwKK73w/view?usp=drive_link
-
Location Search: Users can enter a zip code to find the nearest coffee shops in the Bay Area using the Google Maps API.
-
Query Tracking: The app keeps a record of the number of times a specific zip code has been queried on a given date.
-
MongoDB Data Store: Store and retrieve coffee shop and query data using a MongoDB database.
-
Express.js Backend: The backend server is built with Express.js, handling requests and managing data operations.
These instructions will help you set up the Coffee Shop Locator App on your local machine for development and testing purposes.
Before you begin, make sure you have the following software installed:
- Node.js
- MongoDB
- Git
-
Clone the repository:
git clone https://github.com/GaurangJotwani/coffee-locator.git
-
Navigate to the project directory:
cd coffee-shop-locator
-
Install the required npm packages:
npm install
-
Start database server locally on another terminal:
mongod --dbpath ~/data/db
-
Create a .env file in the project root directory to store your environment variables. Include your Google Maps API key details (Make a google api key from GCP console and enable google maps API, geolocation API and geocoding API on the credential): GOOGLE_MAPS_API_KEY=your_api_key
-
Start the server:
node app.js
Usage Enter a zip code in the search bar and press the search button. Use zip codes in Bay area only. Some zipcodes that can be used are [95014, 95070, 94536, 94501, 94016]
The app will display a list of nearby coffee shops on the map.
The app will also keep track of the query with the zip code and the date of the search in the MongoDB database.
Architecture The Coffee Shop Locator App is built using the following technologies:
Frontend: HTML, CSS, JavaScript Frontend Framework: None (Vanilla JavaScript) Backend: Node.js with Express.js Database: MongoDB Map Services: Google Maps API The frontend communicates with the backend server via RESTful API calls, and the server handles data retrieval and storage in MongoDB.