{"id":37136421,"url":"https://github.com/rellyson/ifood-challenge","last_synced_at":"2026-01-14T15:53:55.416Z","repository":{"id":131909810,"uuid":"477226732","full_name":"rellyson/ifood-challenge","owner":"rellyson","description":"iFood Assessment Challenge","archived":false,"fork":false,"pushed_at":"2022-04-05T13:22:25.000Z","size":198,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-21T16:57:21.267Z","etag":null,"topics":["aws","docker","golang","localstack","python"],"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/rellyson.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":"2022-04-03T03:18:58.000Z","updated_at":"2023-10-25T02:28:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"1c67cbfe-7faf-44c4-986e-428f283bcd93","html_url":"https://github.com/rellyson/ifood-challenge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rellyson/ifood-challenge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rellyson%2Fifood-challenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rellyson%2Fifood-challenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rellyson%2Fifood-challenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rellyson%2Fifood-challenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rellyson","download_url":"https://codeload.github.com/rellyson/ifood-challenge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rellyson%2Fifood-challenge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28425558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T15:24:48.085Z","status":"ssl_error","status_checked_at":"2026-01-14T15:23:41.940Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aws","docker","golang","localstack","python"],"created_at":"2026-01-14T15:53:54.888Z","updated_at":"2026-01-14T15:53:55.399Z","avatar_url":"https://github.com/rellyson.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"./assets/Ifood-logo.png\" width=\"200\"\u003e\n\u003c/p\u003e\n\n# iFood Assessment Challenge\n\n## Description\n\nAs we receive security alerts from different systems and, and it's not viable checking incidents manually, **we need an automated way to receive them** in *Slack* and **ensure that no alert will be lost due to the unavailability of some component.**\nTherefore, your objective in this challenge will be to **develop a system that receives alerts and notifies them in different channels in *Slack***, guaranteeing the delivery of messages through an *AWS SQS* queue.\n\nYour system **must have the following components**:\n- A server that receives JSON events through its API and sends them to an AWS SQS queue. These events must at least contain the message and the *Slack* channel where that message will be posted.\n- An AWS SQS queue.\n- A worker that consumes these messages from the queue and post them to the *Slack* channel.\n\n### Project requirements\n\n- The server must be implemented in Go and the worker in Python.\n- The server, worker and AWS environment must be dockerized.\n- Documentation and testing.\n\n## How alert notification works\n  \nThis diagram ilustrates the notify alert sequence flow.\n  \n\u003cimg src=\"./assets/notify-alert-sequence.png\"/\u003e\n\n## Usage\n\n### Create and configure a *Slack App* to send messages\n\nYou need a *Slack App* to be able to send messages to a channel. You can create an app following [this tutorial](https://slack.com/help/articles/115005265703-Create-a-bot-for-your-workspace).\nAfter creating an app, you need to set some configurations to be able to interact with a channel:\n\n- Click the app and select `OAuth \u0026 Permissions` tab in the left sidebar.\n- Scroll down to `Scopes`. To send messages to a channel you need to add the `chat:write` Oauth Scope.\n- Grab your Oauth Token in `OAuth Tokens for Your Workspace`.\n- Invite your app to a channel using `/invite @AppName`.\n\n### Set yout OAuth Token\n\nNow that you have your `App Oauth Token`, go to `workers/slack-notifier/conf/default.env` file and paste it in the `SLACK_OUATH_TOKEN` variable.\n\n```\nSLACK_OUATH_TOKEN=xox-testestestestsetetstes123\n```\n\n### Starting the system\n\nYou have these alternatives to start the system:\n\n``` bash\n# Runs using base image\n$ docker-compose up\n\n# Runs in a development environment, enabling auto reload\n$ docker-compose -f .docker/dev-compose.yaml up\n\n```\n\n### Sending an alert notification\n\nTo send an alert notification to a Slack channel through this system, send a **POST** request to `http://localhost:3000/v1/events/notify_alert` endpoint, following the payload specified below. \n\nThe attachments field is optional. More info about build attachments can be found [here](https://api.slack.com/messaging/composing/layouts#building-attachments).\n\n``` JSON\n{\n    \"channel\": \"my-notification-channel\",\n    \"messsage\": \"Hi from notification server\",\n    \"attachments\": [\n      {\n          \"text\": \"Attachment text\",\n          \"fallback\": \"Fallback text\"\n      }\n    ]\n}\n```\n\nExample\n``` bash\n# Using curl\ncurl --header \"Content-Type: application/json\" \\\n  --request POST \\\n  --data '{\"channel\":\"my-notification-channel\",\"message\":\"This is a message\"}' \\\n  http://localhost:3000/v1/events/notify_alert\n```\n\n## Useful links\n\n- [PlantUML](https://plantuml.com/)\n- [AWS SDK for Go](https://aws.github.io/aws-sdk-go-v2/docs/getting-started/)\n- [AWS SDK for Python](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html)\n- [Boto3 Guide](https://boto3.amazonaws.com/v1/documentation/api/1.21.30/guide/sqs-examples.html)\n- [Slack Apps Portal](https://api.slack.com/apps)\n- [Slack SDK for Python](https://pypi.org/project/slack-sdk/#sending-a-message-to-slack)\n- [Slack Docs](https://api.slack.com/#read_the_docs)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frellyson%2Fifood-challenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frellyson%2Fifood-challenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frellyson%2Fifood-challenge/lists"}