Skip to content

Latest commit

 

History

History
106 lines (78 loc) · 5.7 KB

README.md

File metadata and controls

106 lines (78 loc) · 5.7 KB

Food Truck Finder

🌟 Introduction

Welcome to Food Truck Finder! Our platform is designed to help you discover the best street food options, particularly food trucks, in San Francisco. Whether you're a local foodie or a visitor exploring the city, Food Truck Finder has got you covered.

For a detailed walkthrough of this project, check out my Medium post: Exploring San Francisco’s Street Food Scene with Food Truck Finder.

🎯 Problem Statement

San Francisco boasts a vibrant street food scene with numerous food trucks offering a variety of delicious cuisines. However, finding these hidden gems can be challenging, especially for newcomers or those unfamiliar with the city's layout. Food Truck Finder aims to solve this problem by providing a convenient way to locate and explore food trucks across San Francisco.

San Francisco's food truck open dataset (csv) is included in this repo.

⚙️ Tech Stack Used

  • Django: A powerful web framework for building robust web applications.
  • MongoDB: A flexible and scalable NoSQL database for storing and managing data.
  • Leaflet.js: An open-source JavaScript library for interactive maps, allowing users to visualize food truck locations.
  • Pytest: A testing framework for writing and executing unit tests to ensure code quality and reliability.

🏃‍♂️ How to Run

To run Food Truck Finder locally, follow these steps:

  1. Clone the Repository: Clone the Food Truck Finder repository to your local machine.

    git clone https://github.com/wubeZ/food_truck_finder.git
  2. Create a Virtual Environment: Set up a virtual environment for the project to isolate dependencies.

    python -m venv env
  3. Activate the Virtual Environment: Activate the virtual environment to install and run dependencies locally.

    • On Windows:
      .\env\Scripts\activate
    • On MacOS/Linux:
      source env/bin/activate
  4. Install Dependencies: Install the required dependencies using the provided requirements.txt file.

    pip install -r requirements.txt
  5. Set Up MongoDB Atlas: Create a MongoDB Atlas account and obtain the MongoDB URI. Replace the placeholder values in the .env.example file with your actual MongoDB URI and any other required environment variables. Rename the file to .env.

  6. Import Data into MongoDB: Use custom commands to import food truck data from a CSV file into MongoDB.

    cd food_truck_finder
    python manage.py import_csv
  7. Run the Application: Start the Django development server to run the Food Truck Finder application.

    python manage.py runserver

Open your web browser and navigate to http://localhost:8000 to access Food Truck Finder.

📸 Screen Shot Preview

  • 🏠 Home Page:

    Home Page 1 Home Page 2
  • 📝 Details Page:

    Details Page
  • 🔍 Search Result Page:

    Search Result Page
  • 🚨 Error Page:

    Error Page

🛠️ Workflow

  1. 🎨 Configure Django with Tailwind CSS: Enhance the user interface using Tailwind CSS, a utility-first CSS framework.
  2. 🔍 Data Preprocessing: Extract and preprocess relevant data attributes from the dataset for storage in MongoDB.
  3. 🛠️ Custom Commands: Develop a custom command to import data from the CSV file into MongoDB collection.
  4. 🖥️ Views and URLs: Implement view logic and define URL patterns to handle user requests and responses.
  5. ✅ Unit Testing with Pytest: Write comprehensive unit tests using Pytest to ensure code functionality and reliability.
  6. 🎨 UI/UX Refinement: Continuously refine the user interface and user experience to optimize usability, engagement, and responsiveness across various devices and screen sizes.

🚀 Things to Improve

  • 🔧 GitHub Action Workflow: Address issues related to setting up GitHub Action workflows, particularly regarding database connectivity with MongoDB Atlas.
  • 🐳 Containerization with Docker: Containerize the project using Docker to ensure consistency in development and deployment environments.
  • 🚀 Deployment on Hosting Service: Consider deploying the containerized application on a hosting service for improved scalability and availability.
  • 🗺️ Consider using OSRM (Open Source Routing Machine): Unlike the Haversine formula, which calculates distances based on spherical geometry, OSRM takes into account real-world road networks, traffic conditions, and other factors to provide precise routing and distance calculations.

📧 Contact

For questions, feedback, or collaboration opportunities, please reach out to Wubshet Zeleke.