{"id":23062631,"url":"https://github.com/reynld/carbtographer","last_synced_at":"2026-05-05T15:36:03.693Z","repository":{"id":40580774,"uuid":"161869762","full_name":"reynld/carbtographer","owner":"reynld","description":"Application that recommends macro friendly meals from local restaurants ","archived":false,"fork":false,"pushed_at":"2019-05-21T18:28:23.000Z","size":15402,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-08T21:17:02.182Z","etag":null,"topics":["backend","go","golang","mapbox","postgress","react","redis","redux","restaurant","yelp-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reynld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-15T04:29:16.000Z","updated_at":"2024-05-01T14:44:02.000Z","dependencies_parsed_at":"2022-08-27T02:48:40.461Z","dependency_job_id":null,"html_url":"https://github.com/reynld/carbtographer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reynld%2Fcarbtographer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reynld%2Fcarbtographer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reynld%2Fcarbtographer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reynld%2Fcarbtographer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reynld","download_url":"https://codeload.github.com/reynld/carbtographer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246955300,"owners_count":20860251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","go","golang","mapbox","postgress","react","redis","redux","restaurant","yelp-api"],"created_at":"2024-12-16T03:27:34.349Z","updated_at":"2026-05-05T15:35:58.657Z","avatar_url":"https://github.com/reynld.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Carbtographer\nApplication that recommends macro friendly meals from local restaurants.\n\n[![Netlify Status](https://api.netlify.com/api/v1/badges/a49fb016-d1b4-4fdb-af1e-9f4e371b2252/deploy-status)](https://app.netlify.com/sites/carbtographer/deploys)\n \n[![Build Status](https://travis-ci.com/reynld/carbtographer.svg?branch=master)](https://travis-ci.com/reynld/carbtographer)\n[![CodeFactor](https://www.codefactor.io/repository/github/reynld/carbtographer/badge/master)](https://www.codefactor.io/repository/github/reynld/carbtographer/overview/master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/reynld/carbtographer)](https://goreportcard.com/report/github.com/reynld/carbtographer)\n[![Coverage Status](https://coveralls.io/repos/github/reynld/carbtographer/badge.svg?branch=master)](https://coveralls.io/github/reynld/carbtographer?branch=master)\n\nFrontend Link: https://carbtographer.com\n\nBackend Link: https://api.carbtographer.com\n\n#### NOTICE\nRecently ported Node.js backend to a Golang backend.\n \nNode.js back end on `node-backend` branch [here](https://github.com/reynld/carbtographer/tree/node-backend).\n\n# Frontend\nFrontend built in React.js, Redux and Styled Components\n\n## Enviroment Variables\nYou will require a Mapbox Access Token to make authenticated requests.\n \nYou can generate one following the intructions here: [Mapbox: Access tokens](https://docs.mapbox.com/help/how-mapbox-works/access-tokens/)\n\n- ``REACT_APP_MAP_BOX_KEY`` - your Mapbox Access Token (API Key)\n- ``REACT_APP_BACKEND_URL`` - your backend link\n\n## Usage\n With all enviroment variables in place you can now run it locally\n\n#### CD into client\n`cd client`\n \n#### Install node modules\n `npm i`\n \n#### Run\n `npm run start`\n\n\n# Backend\n\n## Enviroment Variables\nYou will require a Yelp API Key to make authenticated requests.\nLocally ran Postgress and Redis server to test locally\n \nYou can generate one following the intructions here: [Creating an app on Yelp's Developers site](https://www.yelp.com/developers/documentation/v3/authentication)\n- ``PORT``- your server PORT\n- ``YELP_API`` - your Yelp Key (API Key)\n- ``DB_HOST`` - your database Host URL\n- ``DB_PORT``- your database PORT\n- ``DB_USER`` - your database user\n- ``DB_NAME`` - your database name\n- ``DB_PASSWORD`` - your database password\n- ``ENVIROMENT`` - must be PRO or DEV\n- ``JWT_KEY`` - jwt secret key\n- ``CACHE_ADDRS`` - redis server address\n- ``CACHE_PASSWORD`` - redis server password\n- ``CACHE_DB`` - redis databse number\n\n\n## Run locally\n\n#### Enable go modules\n`export GO111MODULE=on`\n\n#### Scrape Info\n`go run main.go -scrape`\n\n#### Run migrations\n`go run main.go -migrate`\n \n#### Run Postgress seeds\n `go run main.go -seed`\n\n#### Run Redis seeds\n `go run main.go -seed-cache`\n \n#### Run server\n `go run main.go -serve`\n\n\u003cbr/\u003e\n\n## ENDPOINTS\n\n#### GET `/`\n \n```\n{\n    status: 200,\n    message: \"server live on port: ####\"\n}\n```\n\u003cbr/\u003e\n\n#### GET `/names`\n\nReturns all restaurant names in database\n \n```\n[\n    {\n        id: 1\n        name: \"Name\"\n    }\n]\n```\n\u003cbr/\u003e\n\n#### GET `/locations/{lat}/{lon}`\n \nReturns restaurant info based on lat and long\n \n`lat`: latitude  \n`lon`: longitude  \n \n```\n[\n  {\n    \"id\": \"id\",\n    \"name\": \"Name\",\n    \"coordinates\": {\n      \"latitude\": 0.0,\n      \"longitude\": 0.0\n    },\n    \"photos\": [\n      \"url\"\n    ],\n    \"distance\": 20.0\n  }\n]\n```\n\u003cbr/\u003e\n\n#### GET `/items/{id}`\n\nReturns all items for any given restaurant ID\n \n`id`: restaurant ID  \n \n```\n[\n    {\n        \"id\": 0,\n        \"name\": \"item name\",\n        \"type\": \"type\",\n        \"protein\": 0,\n        \"carbs\": 0,\n        \"fats\": 0,\n        \"calories\": 0,\n        \"calperpro\": 0.0\n        \"sodium\": 0,\n        \"r_id\": 0\n    }\n]\n```\n\u003cbr/\u003e\n\n#### GET `/*`\n \n404 Endpoint\n \n```\n{\n    status: 404,\n    message: \"route not found\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freynld%2Fcarbtographer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freynld%2Fcarbtographer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freynld%2Fcarbtographer/lists"}