Table of Contents
|
This project makes unit conversion super easy through SMS (text messages). By using modern web technologies and SMS services, you can convert units just by sending a text. The system takes your SMS, does the conversion, and texts you back the result. It's designed to be a handy and accessible tool for converting units without needing internet access or special apps. Perfect for use in remote areas or when you're on the move. You can also use the website for the unit conversion. The purpose of this project was to demonstrate how can you over-engineer solutions, imagine converting kilograms to grams using a text message! Project uses Infobip API for SMS sending. I was using this documentation. The way it works is that I'm pulling any incoming SMS messages from the Infobip's API by using a Python scheduler to scan an URL. If we found any new messages, let parse that message and inform the User! |
The project uses these technologies:
- Flask: A lightweight WSGI web application framework in Python, used to build the web interface for unit conversion.
- jQuery: A fast, small, and feature-rich JavaScript library, used for DOM manipulation and handling AJAX requests.
- Bootstrap: A popular front-end framework for developing responsive and mobile-first websites.
- Infobip API: A communication platform as a service (CPaaS) that provides SMS messaging capabilities.
- Python: The primary programming language used for backend development.
- HTML/CSS: Standard technologies for creating and styling the web interface.
- JavaScript: Used for client-side scripting to enhance user interaction on the web interface.
- Logging: Python's built-in logging module is used to track the application's activities and debug issues.
It is recommended to use VS Code or Cursor for this project. Python version that was used to develop the project: 3.9.13
Please follow these steps for manual setup:
- Download this GitHub repository.
- Create a virtual environment.
python3 -m venv <myenvname>
- Activate virtual environment.
cd venv
Scripts\Activate.ps1
Or different Activate script, if you are not working from Visual Code.
- Install packages from requirements.txt
pip install -r /path/to/requirements.txt
-
Replace environment variables with your PostgreSQL/Discord API credentials in the .env file.
ReplaceSMS_SERVICE_INFOBIP_API_KEYto your INFOBIP API KEY. Also changeSMS_SERVICE_FROM_NUMBERto the phone number you received from Infobip. -
Run the app.
in the .env file, replace these environment variables with your PostgreSQL database credentials.
| Name | Description |
|---|---|
| SMS_SERVICE_INFOBIP_API_KEY | Infobip API KEY |
| SMS_SERVICE_FROM_NUMBER | Infobip Phone number |
This screenshot shows the main interface of the unit conversion web application.
This screenshot demonstrates the result.

This screenshot demonstrates how SMS conversion work.
This project is licensed under the MIT license. Feel free to edit and distribute this template as you like.
See LICENSE for more information.
