#supportyourlocal is an initative to help support local businesses during the COVID-19 pandemic. By creating an easy way to find all of the shops that are offering gift cards and vouchers, people can support their favorite shops and restaurants by buying digitally when the businesses and workers need it most and consuming later when things open up again.
It is an open-source project as we are open to anyone who wants to contribute to help small businesses and workers during this time of need. You may also fork the project and use it as a starting point for your own map and database of shops in other parts of the world. As of right now, #supportyourlocal only has places in Germany but is planning to expand.
If you would like to get involved, please contact us at [email protected]
Live website - https://www.search.supportyourlocal.online/
Please follow the guidelines below for getting started and making commits.
-
Download the repo to your machine
-
Run
npm install
in both the root directory AND/client/
directory -
Create a
.env
file in the root directory -
In the
.env
file, add the variablePORT=5050
-
You will need to setup a MongoDB account at https://www.mongodb.com/ and create a new cluster for this project
-
Add in the following variables to
.env
, replacingXXX
with your respective values from your MongoDB cluster:MONGO_URI=XXX MONGO_AUTH_SOURCE=XXX MONGO_DATABASE_NAME=XXX
-
In
/client/
create another.env
file. -
You will need to create a Mapbox account at https://www.mapbox.com/
-
Once you have your Mapbox account setup, in
/client/.env
add the following variable, replacingXXX
with your Mapbpx API key:REACT_APP_MAPBOX_ACCESS_TOKEN=XXX
-
Optional: Create an account at https://www.geoplugin.com/ and obtain an API key. If you do not add this key, the initial geolocation of the user will fail and revert to the default set location. Add that API key like so, again replacing
XXX
:
REACT_APP_GEO_PLUGIN_API_KEY=XXX
- With your environment variables setup, naviagate to the root directory and run
npm run dev
. The project should be running at http://localhost:3000/
In order to properly work on this project, you will need some data to work with. Follow these steps to get setup with some test data to get started -
- Once the app is running locally, navigate to http://localhost:3000/firstvoucherdatadownload
- A crude tool has been put together to easily import the data from First Voucher
- Wait until the text that says Submit data to database appears and then click it
- Wait a couple of minutes. A proper success screen has not been implemented for this tool, so let it run without clicking anything on the window.
- The data should eventually show up on the page. If it does not, check the console for errors and/or try refreshing the page. An environment variable may be setup incorrectly.
When contributing please follow the below rules:
- Always work off of feature branches that branch off from the
develop
branch - Before committing your code, run
npm run lint:fix
to make sure your code is formatted to the same standards as the rest of the project - Make pull-requests from your feature branch into the
develop
branch. Once your contribution has been tested in the staging environment (visible at https://supportyourlocal-dev.herokuapp.com/) we will merge it into the master/production.
#supportyourlocal uses the following primary technologies. Their respective documentation has been linked to for reference -