Logo Lanfrica

Dhie-boop/PICK-WASTE-APP

Domaine:

environment and energydigital infrastructure

Type de record:

software
Créateur:
Dhi
Hôte:
Pick Waste Solutions is a mobile and USSD-based application built with Flask and powered by SQLAlchemy for database management. It leverages USSD technology integrated with the Africa's Talking API to provide a seamless, text-based interface for waste collection services. # Pick Waste Solutions Pick Waste Solutions is a mobile and USSD-based application built with Flask and powered by SQLAlchemy for database management. It leverages USSD technology integrated with the Africa's Talking API to provide a seamless, text-based interface for waste collection services. ## Getting Started with Pick Waste Solutions Before you begin, you'll need the following tools installed on your system: * Python 3.10+ * Git * Virtual Environment Tools (e.g., venv) * PostgreSQL or SQLite * An Africa's Talking API Account ## Installation and Setup 1. **Clone the Repository** ```bash git clone [github.com] cd PICK-WASTE-APP 2. **Set Up a Virtual Environment** * python -m venv venv * source venv/bin/activate ``` On Windows: venv\Scripts\activate ``` 3. **Install Dependencies** ```pip install -r requirements.txt ``` 4. **Set Up Environment Variables** Create a file named ```.env``` in the project's root directory and add the following lines, replacing the placeholders with your actual credentials: ```app.py FLASK_APP=app.py FLASK_ENV=development AFRICASTALKING_USERNAME=your_africas_talking_username AFRICASTALKING_API_KEY=your_africas_talking_api_key DATABASE_URL=sqlite:///db.sqlite3 # Update for PostgreSQL SECRET_KEY=your_secret_key DEBUG=True USSD_CODE SHARED SERVICE CODE ``` 5. **Database Migration** Initialize the database using SQLAlchemy: ```termainal flask db flask db migrate -m "Initial migration" flask db upgrade 6. **Run the Application** ```terminal flask run The application will be accessible at 127.0.0.1. ## Simulating the USSD on Localhost To test the USSD app locally, use Ngrok to expose your Flask server: 1. **Install Ngrok:** ``` bash brew instal ngrok # On Mac choco install ngrok # On Windows 2. **Start Ngrok on the Flask port:** ``` bash ngrok http 5000 3. **Copy the Ngrok URL (e.g., abc123.ngrok.io) and set it in your Africa's Talking callback settings for your USSD app.** ## …