{"id":17651756,"url":"https://github.com/diegovictor/comix-notifier","last_synced_at":"2025-07-30T21:33:35.672Z","repository":{"id":98963924,"uuid":"478782494","full_name":"DiegoVictor/comix-notifier","owner":"DiegoVictor","description":"Reads comix.com.br's mangas pages configured, it use regex to find the last volume from each title and if it is a new volume, notify users.","archived":false,"fork":false,"pushed_at":"2025-05-29T04:03:26.000Z","size":2118,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-29T05:18:19.669Z","etag":null,"topics":["aws","comics","comix","dynamodb","eventbridge","javascript","js","lambda","mangas","notifications","regex","serverless","serverless-framework","sns","ts","typescript","webscraping"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DiegoVictor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2022-04-07T01:21:43.000Z","updated_at":"2025-05-29T04:03:30.000Z","dependencies_parsed_at":"2024-01-12T16:53:57.506Z","dependency_job_id":"b3af7c90-d0db-456e-9bd8-5d46fbeb1bdf","html_url":"https://github.com/DiegoVictor/comix-notifier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DiegoVictor/comix-notifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiegoVictor%2Fcomix-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiegoVictor%2Fcomix-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiegoVictor%2Fcomix-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiegoVictor%2Fcomix-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DiegoVictor","download_url":"https://codeload.github.com/DiegoVictor/comix-notifier/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiegoVictor%2Fcomix-notifier/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267945184,"owners_count":24170215,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","comics","comix","dynamodb","eventbridge","javascript","js","lambda","mangas","notifications","regex","serverless","serverless-framework","sns","ts","typescript","webscraping"],"created_at":"2024-10-23T11:43:29.819Z","updated_at":"2025-07-30T21:33:35.644Z","avatar_url":"https://github.com/DiegoVictor.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Comix Notifier\n[![CircleCI](https://img.shields.io/circleci/build/github/DiegoVictor/comix-notifier?style=flat-square\u0026logo=circleci)](https://app.circleci.com/pipelines/github/DiegoVictor/comix-notifier?branch=main)\n[![dynamodb](https://img.shields.io/badge/dynamodb-3.556.0-4053D6?style=flat-square\u0026logo=amazondynamodb)](https://aws.amazon.com/dynamodb)\n[![serverless](https://img.shields.io/badge/serverless-3.38.0-FD5750?style=flat-square\u0026logo=serverless)](https://www.serverless.com/)\n[![eslint](https://img.shields.io/badge/eslint-8.57.0-4b32c3?style=flat-square\u0026logo=eslint)](https://eslint.org/)\n[![airbnb-style](https://flat.badgen.net/badge/style-guide/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript)\n[![jest](https://img.shields.io/badge/jest-29.7.0-brightgreen?style=flat-square\u0026logo=jest)](https://jestjs.io/)\n[![expo](https://img.shields.io/badge/expo-50.0.17-000000?style=flat-square\u0026logo=expo)](https://expo.io/)\n[![typescript](https://img.shields.io/badge/typescript-5.4.5-3178c6?style=flat-square\u0026logo=typescript)](https://www.typescriptlang.org/)\n[![coverage](https://img.shields.io/codecov/c/gh/DiegoVictor/comix-notifier?logo=codecov\u0026style=flat-square)](https://codecov.io/gh/DiegoVictor/comix-notifier)\n[![MIT License](https://img.shields.io/badge/license-MIT-green?style=flat-square)](https://raw.githubusercontent.com/DiegoVictor/comix-notifier/main/LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\u003cbr\u003e\n[![Run in Insomnia](https://insomnia.rest/images/run.svg)](https://insomnia.rest/run/?label=Comix%20Notifier\u0026uri=https%3A%2F%2Fraw.githubusercontent.com%2FDiegoVictor%2Fcomix-notifier%2Fmain%2FInsomnia_2022-04-19.json)\n\nThis application scrapes the [Comix Book Shop](http://www.comix.com.br) website, it finds the last volume of each mangá configured in the database and it sends push notifications to the mobile application (inside `app` folder) through a topic to users that subscribed to it.\n\n![Infrastructure Diagram](https://raw.githubusercontent.com/DiegoVictor/comix-notifier/main/comix-notifier.drawio.png)\n\n## Table of Contents\n* [Requirements](#requirements)\n* [Installing](#installing)\n  * [Configuring](#configuring)\n    * [.env](#env)\n* [Usage](#usage)\n  * [API Key](#api-key)\n  * [Routes](#routes)\n    * [Requests](#requests)\n* [Running the tests](#running-the-tests)\n  * [Coverage report](#coverage-report)\n\n# Requirements\n  * Node.js ^16.6.1\n  * Serveless Framework\n  * AWS Account\n    * [SNS](https://aws.amazon.com/sns/)\n    * [DynamoDB](https://aws.amazon.com/dynamodb/)\n    * [Lambda](https://aws.amazon.com/lambda)\n    * [API Gateway](https://aws.amazon.com/api-gateway/)\n    * [EventBridge](https://aws.amazon.com/eventbridge/)\n  * Firebase Account\n    * [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging)\n\n# Installing\nEasy peasy lemon squeezy:\n```\n$ yarn\n```\nOr:\n```\n$ npm install\n```\n\u003e Was installed and configured the [`eslint`](https://eslint.org/) and [`prettier`](https://prettier.io/) to keep the code clean and patterned.\n\n## Configuring\nThe application sends and receives notifications (API and mobile application, respectively), to configure it properly you need to do some configurations.\n\n* First, [create a project into Firebase](https://firebase.google.com/docs/android/setup#create-firebase-project), then download `google-services.json` file inside the `app` folder from the project configuration page (*General* Tab) and copy the API Cloud Messaging Token (or create one if not exists) from *Cloud Messaging* Tab.\n\n* Access your AWS account, open the [SNS panel](https://console.aws.amazon.com/sns/v3/home) and [create a platform application](https://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-register.html) with the following name `Comix-Notifier`, select `Firebase Cloud Messaging (FCM)` as the platform and paste the API Cloud Messaging Token that you copied previously.\n\u003e If you would like to use another name just remember to update the platform's ARN key in the `serverless.ts` (`custom.platformApplicationArn`).\n\nInstall the AWS Layers before to deploy:\n```\n$ cd layers/nodejs\n$ npm install\n```\nOr:\n```\n$ cd layers/nodejs\n$ yarn\n```\nNow you are ready to deploy the API, just run:\n```\n$ sls deploy\n```\n\nAfter the deploy concludes, configure the lambda's URL outputed by the deploy process into the [`.env`](#env) file.\n\n### .env\nRename the `.env.example` in the `app` directory to `.env` and configure the URL for the subscription lambda, it should be outputed at the end of the deploy process.\n\n|key|description|default\n|---|---|---\n|SUBSCRIPTION_URL|Subscription lambda URL.| -\n\n# Usage\nIn order to be able to subscribe to the topic and start to receive push notifications you will need to:\n\n* [Create an API Key](https://docs.aws.amazon.com/pt_br/apigateway/latest/developerguide/api-gateway-setup-api-key-with-console.html#api-gateway-usage-plan-create-apikey), then [create and configure a usage plan](https://docs.aws.amazon.com/pt_br/apigateway/latest/developerguide/api-gateway-create-usage-plans-with-console.html#api-gateway-usage-plan-create) to it. Copy the key, this will be necessary in the next steps and don't forget to associate the API's stage to the created plan! .\n\nInstall the mobile app, the first build must be through USB connection, so connect your device (or just open your emulator) and run:\n```\n$ cd app\n$ npx react-native run-android\n```\n\u003e For iOS use `ios` instead of `android`, but this app was tested only with Android through USB connection and [Android Studio Emulator](https://developer.android.com/studio/run/managing-avds), is strongly recommended to use the same system.\n\nIn the next times you can just start the Metro Bundler server:\n```\n$ yarn start\n```\nOr:\n```\n$ npx expo run:android\n```\n\nAfter install the app, follow the instructions on the screen.\n\u003e You'll use the API Key here.\n\n## API Key\nThe `/subscribe` route expect an API Key in the `x-api-key` request header.\n\u003e You can see more about this route in the [routes](#routes) section.\n```\nPOST https://kj1q0nigu8.execute-api.us-east-1.amazonaws.com/dev/subscribe x-api-key: rJvz2XWV611PycVISNd2T43pCB4X1g5n7E8iyT58\n```\n\u003e To get one API Key you need to [generate one in API Gateway](https://docs.aws.amazon.com/pt_br/apigateway/latest/developerguide/api-gateway-setup-api-key-with-console.html#api-gateway-usage-plan-create-apikey).\n\n## Routes\n|route|HTTP Method|params|description|auth method\n|:---|:---:|:---:|:---:|:---:\n|`/subscribe`|POST|Body with device FCM (Firebase Cloud Messaging) `token`|Subscribe the device for push notifications.|[API Key](#api-key)\n\n### Requests\n* `POST /subscribe`\n\nRequest body:\n```json\n{\n  \"token\": \"ff7XgLfwSGaVFS05iayn58:APA91bEJ508hqz8hr2EZttm845wn9plsRdJTArMDukr4xTUwdKq_G9qYZCnRIi7lK0M5OeMrnws-DKNNd__TNvnOLmekSNNcBXg3I08oAxT_wksoONXJVz0S12joypaq0-w7IEY6q7Pc\"\n}\n```\n\n# Running the tests\n[Jest](https://jestjs.io/) was the choice to test the app, to run:\n```\n$ yarn test\n```\nOr:\n```\n$ npm run test\n```\n\u003e Run the command in the root folder\n\n## Coverage report\nYou can see the coverage report inside `tests/coverage`. They are automatically created after the tests run.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegovictor%2Fcomix-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiegovictor%2Fcomix-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegovictor%2Fcomix-notifier/lists"}