pandaclose is a sustainability-driven feature for a food delivery app that helps reduce food waste. It allows vendors to list closing deals on dishes nearing expiration. Consumers can explore these deals through a dedicated page or a map view, helping them decide whether to pick up orders or have them delivered.
This repository contains the frontend implementation of the consumer experience built with React for our hackathon project focused on sustainability and waste reduction.
- Frontend Repository (React, Tailwind CSS)
- Backend Repository (Golang, MySQL, Docker Compose, Colima)
- As a vendor, I want to offer discounts on specific dishes near closing or after lunch hours, so that I can reduce food waste and increase sales during off-peak periods.
- As a customer, I want to discover closing discounts nearby, so that I can enjoy affordable meals while helping reduce food waste.
Below are the wireframes for both the current and future (possible) implementation. The links to the Figma project can be accessed
- Closing Deals Exploration: Browse vendor-listed closing deals on specific dishes
- Map View Integration: View nearby closing deals on an interactive map for easier decision-making
- Vendor Pages: Explore vendor-specific offers and menus
- Search & Filter Options: Search for specific vendors or filter based on preferences
- Responsive Design: Optimized for mobile with a clean, user-friendly interface
- React - JavaScript library for building user interfaces
- Tailwind - Utility-first CSS framework for styling
- Golang - Backend server programming language
- MySQL - Relational database for storing application data
- Docker Compose - Tool for defining and running multi-container Docker applications
- Colima - Local development environment for containerized applications
To run the frontend locally, follow these steps:
-
Clone the Repository
git clone https://github.com/averygan/bon-appetea-frontend.git pandaclose-frontend cd pandaclose-frontend
-
Set Up Environment Variables
Duplicate the provided
.env.sample
file, rename it to.env
and fill in the following environment variables in the .env file# Default address VITE_DEFAULT_LATITUDE=<Your Default Location Latitude> VITE_DEFAULT_LONGITUDE=<Your Default Location Longitude> VITE_DEFAULT_NAME=<Your Default Location Name> VITE_DEFAULT_BLOCK=<Your Default Location Block No> VITE_DEFAULT_ROAD=<Your Default Location Road Name> VITE_DEFAULT_POSTALCODE=<Your Default Location Postal Code> # Leaflet access token VITE_LEAFLET_ACCESS_TOKEN=<Your Leaflet Access Token> # Backend URL VITE_DEFAULT_API_URL=http://<Host>:<Port Number>
-
Install Dependencies Ensure you have
Node.js
andnpm
installed, then runnpm install
-
Start the Development Server
npm run dev
-
Access the Application
Open http://localhost:5173 (default Vite port) in your browser to access the app
-
Deals Page
Navigate to the main Deals Page to browse all vendor-listed closing deals, including discounts on specific dishes near closing or post-lunch hours. -
Map View
Switch to the Map View to explore closing deals near your current location. This helps you decide whether to:- Pick Up the food directly from the vendor.
- Request Delivery using riders.
-
Vendor Pages
Access individual vendor pages to view specific dishes, offers, and menus. Use the search bar to find dishes or vendors quickly.
- Filter & Search: Easily search for vendors or dishes.
- Map Integration: Visualize nearby deals with Leaflet-powered interactive maps.
- Limited-Time Offers: Grab discounts before they expire.
The project structure follows a modular and scalable React architecture:
bon-appetea-frontend
│── assets/ # Static assets
│ ├── images/ # Image files
│ └── readme/ # README assets (if any)
│── public/ # Public directory for static files
│── src/ # Application source code
│ ├── components/ # Reusable UI components
│ ├── contexts/ # Context providers for state management
│ ├── utils/ # Utility functions and helpers
│ └── views/ # Page views (main application pages)
│── App.css # Global CSS
│── App.jsx # Root React component
│── main.jsx # Application entry point
│── .env # Local environment variables
│── .env.sample # Environment variable template
│── .gitignore # Git ignore file
│── eslint.config.js # ESLint configuration
│── index.html # Main HTML file
│── package-lock.json # Lockfile for dependencies
│── package.json # Project dependencies and scripts
│── postcss.config.js # PostCSS configuration
│── README.md # Project documentation
│── tailwind.config.js # Tailwind CSS configuration
└── vite.config.js # Vite configuration file