Giter Site home page Giter Site logo

interview-task-2's Introduction

interview-task-2

Technical test using Symfony 4, Doctrine, MySQL, Redis, RabbitMQ, Twilio and Vagrant.

Allows an SMS to be sent via a form.

Usage

  • Install VirtualBox and Vagrant
  • Create a file, .env.local, in the symfony directory. Add the following keys and appropriate values: TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, TWILIO_SENDER_NUMBER, RECIPIENT_PHONE_NUMBER
  • Navigate to the vagrant directory and run vagrant up
  • To start the sms consumer, ssh into the interview-task-2 vagrant box (vagrant ssh interview-task-2), navigate to /vagrant/interview-task-2/symfony and run php bin/console rabbitmq:multiple-consumer sms
  • To send a message, make a GET request (or navigate in your browser) to http://localhost:8000

Completed Functionality

  • Send an SMS to any number using a GET request (Queues messages with RabbitMQ)
  • Rate limit requests to 1 per 15 seconds (Uses Redis)
  • Serve a page with a form to enter a message and phone number
  • On submitting the form (via a send button), queue the message to be sent
  • Validation of requests (limit sms body to 140 chars, limit recipient to UK mobile number)
  • Store all messages sent (body, sender, timestamp)
  • Serve a page with a list of all SMS messages sent by the system, ordered by newest first

To do

  • Error handling
  • Store & update the status of the SMS (queued, sent, failed). Note this will update after the initial message is sent (in progress)
  • Create a user sign-up & login
  • Restrict sending SMS to signed-in users
  • Test it - read up on best practises for RabbitMQ & Rate limiting tests first
  • Run the tests in Travis and display results in Github

interview-task-2's People

Contributors

mloveday avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.