Application that recommends macro friendly meals from local restaurants.
Frontend Link: https://carbtographer.com
Backend Link: https://api.carbtographer.com
Recently ported Node.js backend to a Golang backend.
Node.js back end on node-backend branch here.
Frontend built in React.js, Redux and Styled Components
You will require a Mapbox Access Token to make authenticated requests.
You can generate one following the intructions here: Mapbox: Access tokens
REACT_APP_MAP_BOX_KEY- your Mapbox Access Token (API Key)REACT_APP_BACKEND_URL- your backend link
With all enviroment variables in place you can now run it locally
cd client
npm i
npm run start
You will require a Yelp API Key to make authenticated requests. Locally ran Postgress and Redis server to test locally
You can generate one following the intructions here: Creating an app on Yelp's Developers site
PORT- your server PORTYELP_API- your Yelp Key (API Key)DB_HOST- your database Host URLDB_PORT- your database PORTDB_USER- your database userDB_NAME- your database nameDB_PASSWORD- your database passwordENVIROMENT- must be PRO or DEVJWT_KEY- jwt secret keyCACHE_ADDRS- redis server addressCACHE_PASSWORD- redis server passwordCACHE_DB- redis databse number
export GO111MODULE=on
go run main.go -scrape
go run main.go -migrate
go run main.go -seed
go run main.go -seed-cache
go run main.go -serve
{ status: 200, message: "server live on port: ####" } Returns all restaurant names in database
[ { id: 1 name: "Name" } ] Returns restaurant info based on lat and long
lat: latitude
lon: longitude
[ { "id": "id", "name": "Name", "coordinates": { "latitude": 0.0, "longitude": 0.0 }, "photos": [ "url" ], "distance": 20.0 } ] Returns all items for any given restaurant ID
id: restaurant ID
[ { "id": 0, "name": "item name", "type": "type", "protein": 0, "carbs": 0, "fats": 0, "calories": 0, "calperpro": 0.0 "sodium": 0, "r_id": 0 } ] 404 Endpoint
{ status: 404, message: "route not found" }