Welcome to Befoody! This is a modern, high-performance, and fully responsive food delivery platform. Whether you're a hungry customer, a busy restaurant owner, or a delivery hero, Befoody provides a seamless experience for everyone in the food ecosystem.
๐ Live Demo: Check it out here!
Befoody isn't just another food app; it's built with a Mobile-First mindset. We've dedicated significant effort to ensuring that both the Rider and Restaurant dashboards feel like premium native apps on your phone.
- Premium Rider App:
- Online/Offline Toggle: Riders can control their availability.
- Live Order View: Real-time updates for active deliveries with map indicators.
- Earnings Insights: Comprehensive view of daily and total earnings.
- Mobile-First Navigation: Bottom navigation for quick access to Home, Earnings, History, and Profile.
- Smart Kitchen Hub (Restaurant):
- Live Kanban Board: Efficiently manage orders through status columns (New, Kitchen, Ready, Out).
- Menu Management: Real-time availability toggles, price updates, and item deletion.
- Mobile-Specific Layouts: Tabbed views for orders, menu, and analytics on smaller screens.
- Beautiful Customer Experience:
- Guest Checkout: Order food without needing to create an account.
- Advanced Search & Filtering: Filter by cuisine types, price ranges, and ratings.
- Live Tracking Timeline: Visual progress bar for your order's journey.
Explore the codebase with ease:
src/components/: Reusable UI components (Navbar, Footer, Modals).src/components/rider/: Mobile-specific sub-components for the Rider dashboard.src/components/restaurant/: Mobile-specific navigation and UI for restaurants.src/pages/: Main page views (Home, Checkout, Dashboards).src/context/: State management for Authentication and Toast notifications.src/services/: API interaction logic using Axios.src/utils/: Shared helper functions and constants.
index.js: Main entry point, server configuration, and Socket.IO initialization.models/: Mongoose schemas for Users, Restaurants, FoodItems, and Orders.routes/: Express API routes categorized by resource.middleware/: Custom logic for authentication check and error handling.uploads/: Static storage for uploaded product and restaurant images.
We use a modern tech stack to ensure speed, security, and scalability:
- Frontend: React 18 & Vite (Blazing fast development and builds)
- Styling: Tailwind CSS (Modern, utility-first design)
- Backend: Node.js & Express (Robust and flexible API)
- Database: MongoDB & Mongoose (Reliable data storage)
- Real-time: Socket.IO (Live order updates and rider tracking)
- Auth: JWT (Secure and stateless authentication)
Want to run Befoody on your local machine? It's easy!
git clone https://github.com/developer-yasir/befoody.git
cd befoodycd backend
npm installCreate a .env file in /backend:
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
FRONTEND_URL=http://localhost:5173Start the server:
npm run devcd ../frontend
npm installCreate a .env file in /frontend:
VITE_API_BASE_URL=http://localhost:5000Start the app:
npm run devNo need to register! Use these pre-configured accounts to explore the different roles:
| Role | Password | What to expect? | |
|---|---|---|---|
| Admin | admin@befoody.com |
admin123 |
Full control over the system |
| Restaurant | owner@restaurant.com |
password123 |
Manage orders & update your menu |
| Rider | alex.rider@befoody.com |
password123 |
Go online and start delivering |
| Customer | john.doe@gmail.com |
password123 |
Order your favorite food |
Tip
You can also use the Quick Demo Access buttons on the login page to jump right in!
- Hungry? A customer places an order (works even as a guest!).
- Ping! The restaurant gets a real-time notification on their Kitchen Hub.
- Cooking... Restaurant confirms and prepares the food.
- Ding! Once ready, a notification goes out to nearby Riders.
- On the move! A rider accepts, picks up the food, and delivers it to your door.
- Yum! Order delivered.
Full API documentation for developers:
POST /api/auth/register: Create a new user account.POST /api/auth/login: Authenticate user and receive JWT.
GET /api/restaurants: Fetch all active restaurants.GET /api/restaurants/:id: Retrieve detailed info and full menu for a specific restaurant.POST /api/fooditems: (Restricted) Add new items to a restaurant's menu.
POST /api/orders: Create a new order (Guest friendly!).GET /api/orders/my-orders: Retrieve order history for the logged-in user.PUT /api/orders/:id/status: (Restricted) Update the status of an order (Kitchen flow).
GET /api/riders/available-orders: View orders waiting for a rider.POST /api/riders/accept-order: Claim an order for delivery.
Facing issues? Check these common solutions:
- MongoDB Connection Error: Ensure your
MONGO_URIis correct and your IP is whitelisted in MongoDB Atlas. - Images Not Loading: Check if the backend is running and the
/uploadsfolder is accessible. - Socket Disconnects: Ensure the
FRONTEND_URLin the backend.envmatches your local development port. - Role Permission Denied: Verify your user has the correct role (admin, restaurant, or rider) in the database.
- Apple/Google Pay Integration: Seamless checkout experience.
- Push Notifications: Real-time alerts even when the app is closed.
- Rider Route Optimization: AI-powered delivery paths.
- Customer Reviews & Ratings: Allowing users to share their food experiences.
graph TD
User((User)) -->|Browser| Frontend[React Frontend]
Frontend -->|API Calls / Socket| Backend[Node/Express Backend]
Backend -->|CRUD| DB[(MongoDB Atlas)]
Backend -->|Events| Socket[Socket.IO Engine]
Socket -->|Real-time Updates| Frontend
We love community feedback! If you find a bug or have a feature idea, feel free to open an issue or submit a pull request.
- Found a bug? Open an Issue.
- Want to help? PRs are welcome!
- Just want to chat? Reach out to the team.
Distributed under the MIT License. See LICENSE for more information.
Built with โค๏ธ by Yasir