{"id":19044079,"url":"https://github.com/himanshub16/lekhpal","last_synced_at":"2026-05-14T12:32:42.959Z","repository":{"id":112516752,"uuid":"122674727","full_name":"himanshub16/lekhpal","owner":"himanshub16","description":"Monitor and catalog Twitter feed matching your desired keywords","archived":false,"fork":false,"pushed_at":"2018-02-25T04:24:25.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T03:03:42.324Z","etag":null,"topics":["analytics","data","data-catalog","data-filtering","mongodb","twitter","twitter-streaming-api"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/himanshub16.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}},"created_at":"2018-02-23T21:30:24.000Z","updated_at":"2018-02-23T21:33:01.000Z","dependencies_parsed_at":"2023-05-15T13:00:30.668Z","dependency_job_id":null,"html_url":"https://github.com/himanshub16/lekhpal","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":"0.18181818181818177","last_synced_commit":"3fda6f5037f93cdf9e8b86bdb46a7734706a866b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/himanshub16/lekhpal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanshub16%2Flekhpal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanshub16%2Flekhpal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanshub16%2Flekhpal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanshub16%2Flekhpal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/himanshub16","download_url":"https://codeload.github.com/himanshub16/lekhpal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/himanshub16%2Flekhpal/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33024973,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":["analytics","data","data-catalog","data-filtering","mongodb","twitter","twitter-streaming-api"],"created_at":"2024-11-08T22:44:47.247Z","updated_at":"2026-05-14T12:32:42.943Z","avatar_url":"https://github.com/himanshub16.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lekhpal\n\nLekhpal monitors Twitter for certain filters and catalogs the result in a MongoDB database.\nIt provides a ReST API to add/remove trackers, which are custom set of keywords to monitor, and query the result back.\n\n## Features\n* **ReSTful** and **stateless** handling of keywords to monitor Twitter for.\n* API on initialization, starts monitoring for keywords where you last left it.\n* Delete keyword to stop monitoring via ReST.\n* Query tweets stored in database.\n* Paginated API to limit large amount of data.\n* Download as **JSON/CSV** supported.\n\n## Technical aspects\n* Uses Twitter's streaming API\n* MongoDB database as JSON store and for efficient query.\n* NodeJS to have an efficient asynchronous implementation.\n\n## Instructions\n1. Create a database for this in MongoDB.\n    ```mongo\n    create database lekhpal;\n    use lekhpal;\n    db.createCollection('tweets')\n    db.createCollection('trackers')\n    ```\n\n2. Modify environment variables in `.env.sh`.\n\n3. Source env file and run `index.js`.\n    ```sh\n    source .env.sh\n    node index.js\n    ```\n\n## Routes\n* ```\n  POST /find\n  Content-Type: application/json\n   ```\n\n   **Parameters**\n   \n   | Parameter | Type | Description |\n   | -- | -- | -- |\n   | query | Object | The query to make in MongoDB's query format |\n   | projection | Object | The fields to project in MongoDB's projection format |\n   | format | string | One of 'json' or 'csv' |\n   | page_no | number | Default 1, The page number to get result from |\n   | page_size | number | Optional; The page size required |\n\n* ```\n  POST /add_tracker\n  Content-Type: application/json\n  ```\n\n  **Parameters**\n  \n  | Parameter | Type | Description |\n  |-| - |-|\n  | words_to_track | Array | The list of words to track. This creates a new tracker and starts listening to it |\n\n* ```\n  DELETE /remove_tracker\n  Content-Type: application/json\n  ```\n\n  **Parameters**\n  \n  | Parameter | Type | Description |\n  |-| - |-|\n  | tracker_id | string | The id of the tracker to delete |\n\n* ```\n  GET /list_trackers\n  Content-Type: application/json\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimanshub16%2Flekhpal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhimanshub16%2Flekhpal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimanshub16%2Flekhpal/lists"}