{"id":25905533,"url":"https://github.com/endafk/bingwadata","last_synced_at":"2026-04-10T13:32:10.373Z","repository":{"id":278820456,"uuid":"936359525","full_name":"endafk/BingwaData","owner":"endafk","description":"Bingwa Sokoni Data is an open-source React Native app built with Expo that allows users to purchase Bingwa Sokoni (data, minutes, SMS) through a clean, modern interface.","archived":false,"fork":false,"pushed_at":"2025-06-23T07:49:31.000Z","size":324,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-23T08:42:55.928Z","etag":null,"topics":["android","bingwa-sokoni","ios","kotlin","mpesa","react","react-native","safaricom","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/endafk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-21T00:23:08.000Z","updated_at":"2025-06-23T07:49:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"cbd41089-12a3-4db1-8686-0d04d6c613c3","html_url":"https://github.com/endafk/BingwaData","commit_stats":null,"previous_names":["endafk/bingwadata"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/endafk/BingwaData","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endafk%2FBingwaData","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endafk%2FBingwaData/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endafk%2FBingwaData/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endafk%2FBingwaData/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/endafk","download_url":"https://codeload.github.com/endafk/BingwaData/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/endafk%2FBingwaData/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271606595,"owners_count":24788979,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","bingwa-sokoni","ios","kotlin","mpesa","react","react-native","safaricom","typescript"],"created_at":"2025-03-03T05:15:23.115Z","updated_at":"2025-12-30T21:40:13.642Z","avatar_url":"https://github.com/endafk.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bingwa Data\n\nBingwa Sokoni Data is an open-source React Native app built with Expo that allows users to purchase Bingwa Sokoni (data, minutes, SMS) through a clean, modern interface. It features a custom purchase UI with modals, transaction history, dark mode, and a custom bottom tab navigator with icons.\n\n## Click on the thumbnail to Watch the Demo of the app video\n\n[![Watch the Demo of the app video](https://img.youtube.com/vi/jUraYmkniFo/0.jpg)](https://www.youtube.com/watch?v=jUraYmkniFo)\n\n\u003cimg src=\"assets/images/icon.png\" alt=\"App Icon\" width=\"200\" height=\"200\"/\u003e\n\n## Table of Contents\n\n- [Features](#features)\n- [Getting Started](#getting-started)\n- [Installation](#installation)\n- [Running the App](#running-the-app)\n- [Building for Production](#building-for-production)\n- [Project Structure](#project-structure)\n- [Contributing](#contributing)\n- [Learn More](#learn-more)\n- [License](#license)\n\n## Features\n\n- **Purchase Bundles:**  \n  Select a bundle and purchase it via a modal interface.\n- **Clean Response Display:**  \n  The app shows only the relevant server status message (e.g., \"Purchase Successful, Please Enter Mpesa Pin\").\n- **Transaction History:**  \n  View a log of all purchase transactions on the History tab.\n- **Dark Mode / Theming:**  \n  Toggle between light and dark themes using a switch in the global header.\n- **Custom Bottom Tab Navigator:**  \n  Rounded tab bar with Ionicons for each tab.\n- **Error Handling:**  \n  An Error Boundary catches unexpected errors.\n\n## Getting Started\n\nWhen you're ready, run:\n\n```bash\nnpm run reset-project\n```\nThis command will move the starter code to the app-example directory and create a blank app directory where you can start developing.\n\n## Installation\nClone the Repository:\n\n```bash\ngit clone https://github.com/endafk/BingwaData\ncd BingwaData\n```\n##Install Dependencies:\n\n```bash\nnpm install\n# or\nyarn install\n```\n\n\n## API Configuration\n\nThis app uses a sample API endpoint for handling bundle purchases. The current endpoint is hard-coded as:\n\n```js\nconst response = await fetch('https://api.bingwasokoni.lore/api/bundle.php', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json; charset=UTF-8' },\n  body: JSON.stringify(payload),\n});\n```\n\nTo use your own API, follow these steps:\n\n- Locate the API Call:\n\nOpen index.tsx (or the file where handlePurchaseBundle is defined) and find the fetch call shown above.\n\n- Replace the URL:\n\nChange the URL (https://api.bingwasokoni.lore/api/purchases.php) to your own endpoint.\n\n- Verify the Payload Structure:\n\nThe app sends a JSON payload with the following fields:\n```JSON\nuser_id: (number) Your user's unique identifier.\noffer_amount: (number) The bundle amount (extracted from the bundle price).\nphone_number: (string) The phone number that will receive the bundle.\nmpesa_phone: (string) The phone number associated with mobile money (M-Pesa).\noffer_ussd: (string) A USSD code used for the bundle (optional based on your API).\naction: \"purchase_bundle\" – This specifies the type of request.\n```\n- Adjust the payload if your API requires different fields.\n\n- Handle the Response:\nThe app currently expects a JSON response containing at least a status field (e.g., { \"status\": \"Purchase Successful, You will be prompted to enter your Mpesa PIN\" }).\n\nIf your API returns a different structure, update the response parsing logic in handlePurchaseBundle accordingly.\n\n- Test Your Endpoint:\nOnce you update the API URL and payload (if necessary), test your changes locally by running:\n\n```bash\nnpx expo start\n```\n\nand attempting a purchase to ensure that the app communicates properly with your API.\n\nBy following these steps, you can easily replace the sample API with your own without affecting the rest of the app's functionality.\n\n\n## Running the App\n\nTo start the development server, run:\n\n```bash\nnpx expo start\n```\n\nUse the Expo Go app to scan the QR code, or run the app on an iOS/Android simulator.\nBuilding for Production\nExpo’s EAS (Expo Application Services) makes it easy to build production-ready apps:\n\n## Install EAS CLI (if not already installed):\n\n```bash\nnpm install -g eas-cli\n```\n\n## Log in to Expo:\n\n```bash\neas login\n```\n## Configure Your Project:\n\n```bash\neas build:configure\n```\n\n## Build Your App:\n\nFor Android:\n```bash\neas build --platform android\n```\nFor iOS:\n```bash\neas build --platform ios\n```\nFollow the prompts to complete your build. Once finished, you'll receive a URL to download your APK/IPA.\n\n## Project Structure\n   - AppNavigator.js:\n      Contains the main navigator with the global header (with dark mode switch), custom bottom tab     navigator (with icons), and screens for Bundles, Minutes, SMS, Transaction History, and About.\n   - Themes:\n      Defined within the code for both light and dark modes.\n      ErrorBoundary:\n   - Catches unexpected errors to prevent app crashes.\n      Screens:\n   - Includes individual components for purchasing, viewing transaction history, and app information.\n\n\n## Contributing\nContributions are welcome! Please follow these steps:\n   - Fork the repository.\n   - Create a new branch for your feature or bugfix.\n   - Commit your changes and push your branch.\n   - Open a Pull Request with a detailed description of your changes.\n\n\n## ToDo:\nThe Project is still on development:\n    - Integrate it to daraja api\n    - Reduce final app size(React Native Lore)\n    - Script it\n\n## Learn More\nTo learn more about developing your project with Expo and React Native, check out these resources:\n\n   [Expo Documentation](https://docs.expo.dev/)\n   [React Native Documentation](https://reactnative.dev/)\n   [EAS Build Documentation](https://docs.expo.dev/eas/)\n\n## License\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendafk%2Fbingwadata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendafk%2Fbingwadata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendafk%2Fbingwadata/lists"}