Oct 3, 2017

Requirements

  • A way to send SMS messages to subscribers for marketing purposes
  • Only authorized users should be able to send messages

Proposed Solution

A very simple application in which an authorized user may send SMS via a single form. First the user must login:

Following login the authenticated user is greeted by a simple form to generate an SMS within:

In addition to the message form, there is available navigation above. If the user clicks on the User Admin button we can see the users that are authorized and their role:

If there is a user that needs to be deleted, it is as easy as clicking on the trash can and confirming the additional red button:

When the Numbers Admin is visited, a very similar administrative list is available to add and delete numbers. It is expected that the user would have a separate public page for number subscriptions with a special access key to the API that only enables adding phone numbers to the database.

Navigating back to the Send SMS page, the user can finally send a text to their subscribers, whether there are three or 2,000:

It writes each number as it succeeds. Since the Twilio API is used, one message can be sent per second. You can see I got a message on my phone directly after the success message:

 

Architecture

  • Angular 4 (TypeScript) Front End
    • Bootstrap-ngx
    • Boostrap3
    • CSS
    • HTML5
  • Back End
    • docker-compose containers
      • API container (Python)
        • Flask RESTful
        • gunicorn
        • SQLite
      • Proxy container (nginx)

Future Posts

Future posts will go over different details of the back end and front end, in particular the authentication with JWT tokens and hashed passwords, database storage, creating a flask rest api and serving it with gunicorn and nginx, and of course Docker.