P-Shakibafar / sms_serial_verification

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sms_verification

This project is done for Altech as a educational series.

How to run

  1. Install python3, pip3, virtualenv, MySQL in your system.
  2. Clone the project https://github.com/jadijadi/sms_serial_verification && cd sms_serial_verification
  3. rename the config.py.sample to config.py and do proper changes.
  4. db configs are in config.py, but you also need to add this table to the database manually: CREATE TABLE PROCESSED_SMS (status ENUM('OK', 'FAILURE', 'DOUBLE', 'NOT-FOUND'), sender CHAR(20), message VARCHAR(400), answer VARCHAR(400), date DATETIME, INDEX(date, status));
  5. Create a virtualenve named build using virtualenv -p python3 build
  6. Connect to virtualenv using source build/bin/activate
  7. Install packages using pip3 install -r requirements.txt
  8. Now environment is ready run it using python3 app/main.py

Or you can use Dockerfile to deploy it to docker

TODO

  • Farhad seifi https://ngrok.com/
  • add db path to config.py.sample
  • do more while normalizing, specially against SQLInjection. remove all non alpha numerical
  • some health check url
  • there is problem with JJ1000000 and JJ100
  • create requirements.txt (pip freeze)
  • the insert will fail if there is a ' or " in excel file
  • another 10 % problem :D
  • refactor name str in normalize function
  • in normalize, convert AB001 to AB00001 (max len? say 15)
  • dockerize (alpine? search for uwsgi)
  • merge pull requests.. check I mean :)
  • do proper inserts with INTO
  • templating
  • thanks H shafiee
  • rate limit
  • add call back token on kavenegar site
  • we do not normalize the failed serials when importing!
  • invalids can have duplicates
  • migrate to mysql
  • if we have 2 matches on serials, regurn a general OK message
  • add altech logo from Downloads/logo.png ; top left
  • close db connection in check_serial
  • count the failed insertions in db
  • regenerate requirements.txt with MySQLdb
  • proper texts are provided in Downloads/sms_reply_texts
  • is it possible to check a serial from the gui?
  • dummy message for end to end test via SMS
  • log all incomming smss
  • Atomic problem when I'm commiting every 10 inserts
  • show smss at the bottom of the Dashboard
  • define indexes on mysql
  • trim too long sms input
  • add some nubmer to the cards
  • fix line 83 and 86 :D
  • are we counting inserts correctly?! :D after the merge
  • Kavenegar tell which IPs they use on their admin GUI, be we already implemented another solution
  • show Exception errors
  • message and answer fields should be rtl
  • is it a good idea to insert rows one by one? not sure. but... what to do :| say 100?
  • remove debug mode

About

License:GNU General Public License v3.0


Languages

Language:CSS 81.7%Language:HTML 10.0%Language:Python 6.4%Language:JavaScript 1.8%Language:Dockerfile 0.1%