{"id":18783941,"url":"https://github.com/sparkpost/relaymsgdb","last_synced_at":"2025-07-13T12:33:13.605Z","repository":{"id":138516410,"uuid":"49609428","full_name":"SparkPost/relaymsgdb","owner":"SparkPost","description":"Persist, parse, and present subject lines, organized by sender localpart","archived":false,"fork":false,"pushed_at":"2016-11-02T15:50:58.000Z","size":2048,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-21T08:48:49.817Z","etag":null,"topics":[],"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/SparkPost.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-13T23:38:06.000Z","updated_at":"2016-11-02T15:51:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"9e3a90ff-9fbc-444b-a99c-476fd7eafb07","html_url":"https://github.com/SparkPost/relaymsgdb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SparkPost/relaymsgdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Frelaymsgdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Frelaymsgdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Frelaymsgdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Frelaymsgdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SparkPost","download_url":"https://codeload.github.com/SparkPost/relaymsgdb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Frelaymsgdb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265139359,"owners_count":23717308,"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":[],"created_at":"2024-11-07T20:41:13.859Z","updated_at":"2025-07-13T12:33:13.567Z","avatar_url":"https://github.com/SparkPost.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Local development\n\n## Prerequisites\n\n* Ensure you have PostgreSQL installed and running. You can do this through [homebrew](http://brew.sh/) or by installing [Postgres.app](http://postgresapp.com/).\n* Ensure you have autoenv installed. You can do this through homebrew.\n* Ensure you have the [Heroku toolbelt](https://toolbelt.heroku.com/) installed\n* Ensure you have Go installed. You can do this through homebrew.\n* Ensure your `$GOPATH` is set.\n\n## Get the code\n\n```bash\n$ cd $GOPATH/src/github.com/SparkPost\n$ git clone git@github.com:SparkPost/sparkies.git\n$ cd sparkies\n```\n\n## Build the Go project\n\n```bash\n$ go build\n```\n\n## Run the project\n\n```bash\n$ heroku local web\n```\n\nThis will start the app on port 5000.\n\n## Send a simulated relay webhook\n\nCreate a JSON file called test.json to simulate a relay webhook with the following contents:\n\n```json\n[{\n  \"msys\": {\n    \"relay_message\": {\n      \"friendly_from\": \"\\\"SparkPost Developers\\\" \u003cdevlopers@sparkpost.com\u003e\",\n      \"msg_from\": \"developers@sparkpost.com\",\n      \"rcpt_to\": \"hello@messagesystems.com\",\n      \"webhook_id\": \"66177122594674207\",\n      \"content\": {\n        \"html\": \"\u003chtml\u003e\u003chead\u003e\u003ctitle\u003eYay An HTML Title!\u003c/title\u003e\u003c/head\u003e\u003cbody\u003e\u003ch1\u003eAnd the html body.\u003c/h1\u003e\u003c/body\u003e\u003c/html\u003e\",\n        \"text\": \"Yay A Text Title!\\nAnd the text body.\",\n        \"subject\": \"Super Sweet Relay Message\",\n        \"to\": [\n          \"hello@messagesystems.com\"\n        ],\n        \"headers\": [\n          { \"Received\": \"from the internet.\" }\n        ],\n        \"email_rfc822\": \"In case it wasn't obvious, this isn't a valid MIME message.\",\n        \"email_rfc822_is_base64\": false\n      }\n    }\n  }\n}]\n```\n\nCall the `incoming` endpoint with the simulated relay webhook data:\n\n```bash\n$ curl -XPOST -H 'Content-Type: application/json' --data @test.json http://127.0.0.1:5000/incoming\n```\n\n## Viewing data\n\nYou can launch psql and inspect the data. To see the raw incoming data:\n\n```bash\n$ psql\nuser=# select * from request_dump.raw_requests;\n```\n\nTo see the processed data:\n\n```bash\n$ psql\nuser=# select * from request_dump.relay_messages;\n```\n\n# Deploying\n\nTo deploy the code to Heroku, ensure you are authenticated as the correct user. Then run the following commands to deploy:\n\n```bash\n$ git push heroku \u0026\u0026 git push heroku master\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkpost%2Frelaymsgdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparkpost%2Frelaymsgdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkpost%2Frelaymsgdb/lists"}