Skip to content

Repository files navigation

⛽ FuelUp - Gas Price Finder App

A cross-platform mobile application that helps users find the nearest gas stations and compare real-time fuel prices. Built with Flutter for the frontend and Python for backend data scraping.

📱 Overview

FuelUp aggregates gas price data from GasBuddy to provide users with up-to-date fuel prices at gas stations near their location. The app supports multiple fuel types and payment methods, making it easy to find the best deal on gas.

✨ Features

  • Location-Based Search - Find gas stations by ZIP code
  • Multiple Fuel Types - Compare prices for:
    • Regular
    • Midgrade
    • Premium
    • Diesel
    • E85 (Ethanol)
  • Payment Filtering - Filter by payment method:
    • Credit and Cash accepted
    • Credit Only
  • Real-Time Prices - Live gas price data scraped from GasBuddy
  • Station Details - View gas station name, address, and current prices
  • Multi-Brand Support - Includes all major gas station brands:
    • Shell
    • Chevron
    • ARCO
    • Costco
    • 76
    • 7-Eleven
    • And more...

🏗️ Project Structure

FuelUp-Gas-App/
├── flutter_application_1/     # Flutter mobile app
│   ├── lib/
│   │   ├── main.dart          # Main app entry point
│   │   └── algorithm.py       # ZIP-based price lookup
│   ├── android/               # Android-specific configuration
│   ├── ios/                   # iOS-specific configuration
│   └── pubspec.yaml           # Flutter dependencies
├── finalGas.py                # City-based gas price scraper
├── scrape.py                  # Basic price scraping module
├── search.py                  # API-based state price lookup
├── data.txt                   # Sample output data
├── response.csv               # Cached API response data
└── README.md

🛠️ Tech Stack

Frontend

  • Flutter - Cross-platform mobile framework
  • Dart - Programming language for Flutter
  • Material Design - UI components

Backend

  • Python 3 - Backend scripting
  • BeautifulSoup4 - Web scraping
  • Requests - HTTP library
  • Pandas - Data manipulation
  • OpenPyXL - Excel file handling

APIs & Data Sources

  • GasBuddy - Primary gas price data source
  • CollectAPI - State-wide gas price aggregation

📦 Installation

Prerequisites

  • Flutter SDK (>=2.7.0)
  • Python 3.x
  • pip (Python package manager)

Flutter App Setup

# Navigate to Flutter directory
cd flutter_application_1

# Install Flutter dependencies
flutter pub get

# Run the app
flutter run

Python Backend Setup

# Install Python dependencies
pip install beautifulsoup4 requests pandas openpyxl lxml pytz

# Run the price scraper
python algorithm.py

🚀 Usage

Mobile App

  1. Launch the FuelUp app on your device
  2. Enter your ZIP code
  3. Select your preferred fuel type
  4. Choose payment method preference
  5. View nearby gas stations sorted by price

Command Line (Python)

python flutter_application_1/lib/algorithm.py

Sample Output:

Enter Zip Code: 92620
(1)Regular, (2)Midgrade, (3)Premium, (4)Diesel, (5)E85
Pick Fuel Type: 2
(1)Credit and Cash, (2)Credit Only
Pick Payment: 2

Results:
['76', '$5.23', '4760 Irvine Blvd, Irvine, CA']
['Shell', '$5.69', '4162 Trabuco Rd, Irvine, CA']
['ARCO', '$5.69', '14111 Jeffrey Rd, Irvine, CA']
['Chevron', '---', '6320 Irvine Blvd, Irvine, CA']

📊 Data Output Format

The app outputs gas station data in the following format:

Field Description
Station Name Gas station brand (Shell, Chevron, etc.)
Price Current fuel price in USD
Address Full street address with city and state

🗺️ Supported Regions

Currently supports California cities including:

  • Los Angeles
  • San Diego
  • San Francisco
  • Sacramento
  • Oakland
  • San Jose
  • Orange County
  • Riverside
  • And 25+ more metro areas

🔧 Configuration

API Configuration (search.py)

headers = {
    'content-type': "application/json",
    'authorization': "apikey YOUR_API_KEY"
}

Fuel Type Codes

Code Fuel Type
1 Regular
2 Midgrade
3 Premium
4 Diesel
5 E85

📝 Notes

  • Gas prices are updated in real-time from GasBuddy
  • Some stations may show "---" if price data is unavailable
  • The app requires an internet connection to fetch current prices

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is open source and available under the MIT License.

⚠️ Disclaimer

This application is for informational purposes only. Gas prices may vary and should be confirmed at the station. This project is not affiliated with GasBuddy or any gas station brands mentioned.

About

Original Code For Gas App

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages