Skip to content

The Send Messages API allows you to send SMS messages using two different providers. It employs a weighted approach to determine which provider to use for sending each message, offering redundancy in case one provider is down. Additionally, the API provides endpoints to check the status of a sent message and retrieve message details.

License

Notifications You must be signed in to change notification settings

Haywayaheadshot/ror-texting-take-home

Repository files navigation

📗 Table of Contents

📖 [Send Messages API]

The Send Messages API allows you to send SMS messages using two different providers. It employs a weighted approach to determine which provider to use for sending each message, offering redundancy in case one provider is down. Additionally, the API provides endpoints to check the status of a sent message and retrieve message details.

🛠 Built With

Tech Stack

Client
Server
Database

Links

Live Demo - Under Construction

Project Video

Key Features

The main goal of this app is to allow users / businesses send text messages to friends or customers.

  • [Distributes load via two SMS providers]
  • [Check for message status to know if it is delivered or not]
  • [Has data of invalid numbers to use as validation on UI so requests are not made to such numbers]

💻 Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

In order to run this project you need:

  • to install Ngrok. Please follow this link to have it installed.
  • to have the latest version of ruby on rails installed.
  • to have a code editor on your computer.

Setup

Clone this repository to your desired folder:

1- Navigate to the button on the top right green "code" button.

2- In the drop down menu choose "Download Zip" or clone it using git using the following command.

3- After extracting the files, you'll have my project on your local machine.

Install

Install this project with:

  • [$ bundle install]

Usage

To run the project, execute the following command:

  • [$ ./bin/dev] in one terminal.

  • [$ ngrok http 3000 ] in another terminal.

  • Copy forwarding link. It should look something like this "https://e8cc-197-251-147-157.ngrok-free.app"

    Go to config/application.rb and replace the config.hosts code on line 30 with config.hosts << "paste your ngrok link here" Go to app/dev/send_messages_controller.rb. Inside the provider_one method, replace callback_url value with 'https://paste your ngrok link here/delivery_status' Go to spec/requests/dev/send_messages_spec.rb. On line 6 change the value of url to Your ngrok code.

  • Please read the API Documentation file to understand how to use the endpoints and their responses.

Test

  • [$ rspec]

(back to top)

👥 Authors

👤 Abubakar Ummar

(back to top)

🔭 Future Features

I will create a UI that will allow users to:

  • Add their phone number, name, or email so the receiver can know who the message is from
  • Get a notification that displays the status of the message
  • Get a notifcation to try again when the status of messages is 500

(back to top)

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

Anyone who finds this project interesting is welcome to give it a star.

(back to top)

(back to top)

❓ FAQ (OPTIONAL)

  • [How do i run the project in my local machine?]

    • [You need to clone the project in your local environment through the terminal]
  • [What database are you using for this project?]

    • [POSTGRESQL]

(back to top)

📝 License

This project is MIT licensed.

(back to top)

About

The Send Messages API allows you to send SMS messages using two different providers. It employs a weighted approach to determine which provider to use for sending each message, offering redundancy in case one provider is down. Additionally, the API provides endpoints to check the status of a sent message and retrieve message details.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published