{"id":25097269,"url":"https://github.com/jowi-dev/heckler","last_synced_at":"2025-07-02T09:32:32.152Z","repository":{"id":270599888,"uuid":"910864373","full_name":"jowi-dev/heckler","owner":"jowi-dev","description":"An open source notification processor in elixir","archived":false,"fork":false,"pushed_at":"2025-02-07T21:34:15.000Z","size":145,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T02:46:34.111Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jowi-dev.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}},"created_at":"2025-01-01T17:04:36.000Z","updated_at":"2025-02-07T21:34:20.000Z","dependencies_parsed_at":"2025-01-01T18:20:53.101Z","dependency_job_id":"2b2319e4-1442-4562-bd5a-fa008fe71397","html_url":"https://github.com/jowi-dev/heckler","commit_stats":null,"previous_names":["jowi-dev/echo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jowi-dev/heckler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jowi-dev%2Fheckler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jowi-dev%2Fheckler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jowi-dev%2Fheckler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jowi-dev%2Fheckler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jowi-dev","download_url":"https://codeload.github.com/jowi-dev/heckler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jowi-dev%2Fheckler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263111469,"owners_count":23415463,"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":"2025-02-07T17:31:07.869Z","updated_at":"2025-07-02T09:32:32.143Z","avatar_url":"https://github.com/jowi-dev.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heckler\n\n[![Hex.pm](https://img.shields.io/hexpm/v/heckler.svg)](https://hex.pm/packages/heckler)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/heckler/)\n[![License](https://img.shields.io/hexpm/l/heckler.svg)](https://github.com/yourusername/heckler/blob/main/LICENSE)\n\nHeckler is a notification library for Elixir applications that makes it easy to send and schedule SMS and push notifications.\n\n## Features\n\n* **SMS Messaging**: Send SMS messages using Twilio\n* **Scheduled Notifications**: Schedule messages for future delivery using Oban\n* **APNS Support**: Send push notifications to Apple devices (coming soon)\n* **Notification Tracking**: All notifications are stored in the database for auditing\n* **Flexible Architecture**: Add custom adapters for different messaging providers\n\n## Installation\n\nAdd Heckler to your `mix.exs` dependencies:\n\n```elixir\ndef deps do\n  [\n    {:heckler, \"~\u003e 0.1.0\"},\n    {:oban, \"~\u003e 2.15\"}, # Required for scheduling functionality\n    {:jason, \"~\u003e 1.0\"}, # Required for JSON encoding/decoding\n    \n    # Only needed if using certain adapters:\n    {:httpoison, \"~\u003e 2.0\"}, # Required for Twilio adapter\n    {:pigeon, \"~\u003e 2.0\"} # Required for APNS adapter (coming soon)\n  ]\nend\n```\n\n## Setup\n\n### 1. Generate Migrations\n\nRun the migration generator to create the required database tables:\n\n```shell\nmix heckler.gen.migrations\nmix ecto.migrate\n```\n\n### 2. Configure Adapters\n\n#### Twilio SMS\n\n```elixir\n# In config/config.exs or config/runtime.exs\nconfig :your_app, Heckler.Adapters.Twilio,\n  account_sid: System.get_env(\"TWILIO_ACCOUNT_SID\"),\n  auth_token: System.get_env(\"TWILIO_AUTH_TOKEN\"),\n  from_number: System.get_env(\"TWILIO_FROM_NUMBER\"),\n  message_service_sid: System.get_env(\"TWILIO_MESSAGE_SERVICE_SID\")\n```\n\n### 3. Configure Heckler\n\n```elixir\nconfig :your_app, Heckler,\n  sms_adapter: Heckler.Adapters.Twilio\n```\n\n### 4. Configure Oban for Scheduling\n\n```elixir\nconfig :your_app, Oban,\n  repo: YourApp.Repo,\n  plugins: [Oban.Plugins.Pruner],\n  queues: [notifications: 10]\n```\n\n### 5. Add to Supervision Tree\n\n```elixir\n# In your application.ex\ndef start(_type, _args) do\n  children = [\n    # ...other children\n    {Heckler, []}\n  ]\n  \n  Supervisor.start_link(children, strategy: :one_for_one, name: YourApp.Supervisor)\nend\n```\n\n## Usage\n\n### Sending an SMS Immediately\n\n```elixir\n# Using the basic interface\nHeckler.SMS.send(\"+15551234567\", \"Hello from Heckler!\")\n\n# Using the scheduler (records notification in database)\nHeckler.Scheduler.send_sms_now(\"+15551234567\", \"Hello with tracking!\")\n```\n\n### Scheduling an SMS for Later\n\n```elixir\n# Schedule an SMS for 30 minutes from now\nscheduled_time = DateTime.utc_now() |\u003e DateTime.add(30, :minute)\nHeckler.Scheduler.schedule_sms(\"+15551234567\", \"This is a scheduled message\", scheduled_time)\n\n# Schedule with metadata\nHeckler.Scheduler.schedule_sms(\n  \"+15551234567\",\n  \"Your order has shipped!\",\n  ~U[2023-12-25 12:00:00Z],\n  metadata: %{order_id: \"123456\"}\n)\n```\n\n### Custom Adapters\n\nYou can easily create custom SMS adapters:\n\n```elixir\ndefmodule MyApp.CustomSMSAdapter do\n  @behaviour Heckler.SMS\n  \n  def send_sms(to, message) do\n    # Your implementation here\n    # Must return {:ok, response} or {:error, reason}\n  end\nend\n\n# Configure Heckler to use your adapter\nconfig :your_app, Heckler,\n  sms_adapter: MyApp.CustomSMSAdapter\n```\n\n## Documentation\n\nComplete documentation is available at [https://hexdocs.pm/heckler](https://hexdocs.pm/heckler).\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n## Acknowledgements\n\n- [Oban](https://github.com/sorentwo/oban) for job scheduling\n- [HTTPoison](https://github.com/edgurgel/httpoison) for HTTP requests\n- [Pigeon](https://github.com/codedge-llc/pigeon) for APNS integration\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjowi-dev%2Fheckler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjowi-dev%2Fheckler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjowi-dev%2Fheckler/lists"}