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.
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.
- 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.
To run Food Truck Finder locally, follow these steps:
-
Clone the Repository: Clone the Food Truck Finder repository to your local machine.
git clone https://github.com/wubeZ/food_truck_finder.git
-
Create a Virtual Environment: Set up a virtual environment for the project to isolate dependencies.
python -m venv env
-
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
-
Install Dependencies: Install the required dependencies using the provided requirements.txt file.
pip install -r requirements.txt
-
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
. -
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
-
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.
-
π Home Page:
-
π Details Page:
-
π Search Result Page:
-
π¨ Error Page:
- π¨ Configure Django with Tailwind CSS: Enhance the user interface using Tailwind CSS, a utility-first CSS framework.
- π Data Preprocessing: Extract and preprocess relevant data attributes from the dataset for storage in MongoDB.
- π οΈ Custom Commands: Develop a custom command to import data from the CSV file into MongoDB collection.
- π₯οΈ Views and URLs: Implement view logic and define URL patterns to handle user requests and responses.
- β Unit Testing with Pytest: Write comprehensive unit tests using Pytest to ensure code functionality and reliability.
- π¨ UI/UX Refinement: Continuously refine the user interface and user experience to optimize usability, engagement, and responsiveness across various devices and screen sizes.
- π§ 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.
For questions, feedback, or collaboration opportunities, please reach out to Wubshet Zeleke.