A full-stack food delivery application similar to Glovo, built with React, Node.js, and SQLite.
- User Authentication - Register, login, and profile management
- Restaurant Browsing - Browse restaurants with ratings, delivery times, and fees
- Menu Management - View restaurant menus with categories and item details
- Shopping Cart - Add items to cart with quantity management
- Order Placement - Place orders with delivery address and notes
- Order Tracking - View order history and status updates
- Real-time Updates - Live order status updates using Socket.io
- Responsive Design - Mobile-friendly interface
- Frontend: React 18 with TypeScript and Tailwind CSS
- Backend: Node.js with Express.js
- Database: SQLite with sample data
- Authentication: JWT-based authentication
- Real-time: Socket.io for live updates
- State Management: React Context API
- UI Components: Custom components with Lucide React icons
glovo-replica/
βββ client/ # React frontend
β βββ public/
β βββ src/
β β βββ components/ # Reusable components
β β βββ contexts/ # React contexts
β β βββ pages/ # Page components
β β βββ App.tsx
β βββ package.json
βββ server/ # Node.js backend
β βββ database/ # Database initialization
β βββ middleware/ # Auth middleware
β βββ routes/ # API routes
β βββ index.js
βββ package.json # Root package.json
- Node.js (v16 or higher)
- npm or yarn
-
Clone and install dependencies:
git clone <repository-url> cd glovo-replica npm run install-all
-
Initialize the database:
cd server node init-db.js -
Start the development servers:
npm run dev
This will start:
- Backend server on http://localhost:5000
- Frontend development server on http://localhost:3000
Use these credentials to test the application:
- Email: user@glovo.com
- Password: password123
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/me- Get current user
GET /api/restaurants- Get all restaurantsGET /api/restaurants/:id- Get restaurant by IDGET /api/restaurants/:id/menu- Get restaurant menuGET /api/restaurants/search/:query- Search restaurants
POST /api/orders- Create new orderGET /api/orders/my-orders- Get user ordersGET /api/orders/:id- Get order by IDPATCH /api/orders/:id/status- Update order status
GET /api/users/profile- Get user profilePUT /api/users/profile- Update user profilePUT /api/users/password- Change password
The application comes with sample data including:
- 4 sample restaurants (Pizza Palace, Burger King, Sushi Master, Taco Fiesta)
- Menu items with categories
- Sample user accounts
- Restaurant grid with search functionality
- Restaurant cards showing ratings, delivery time, and fees
- Responsive design for mobile and desktop
- Detailed restaurant information
- Menu organized by categories
- Add to cart functionality
- Quantity management
- View cart items grouped by restaurant
- Update quantities
- Remove items
- Order summary with delivery fees
- Checkout process
- Order history with status tracking
- Order details with items
- Real-time status updates
- Order tracking timeline
- Update personal information
- Change password
- Manage delivery address
The app uses Socket.io for real-time updates:
- Order status changes
- Live order tracking
- Real-time notifications
The application uses Tailwind CSS with a custom color scheme:
- Primary: Blue tones (#0ea5e9)
- Secondary: Yellow tones (#eab308)
- Clean, modern design
- Mobile-first responsive layout
# Install all dependencies
npm run install-all
# Start both frontend and backend
npm run dev
# Or start individually
npm run server # Backend only
npm run client # Frontend only# Build the React app
npm run build
# The built files will be in client/build/The SQLite database includes these tables:
users- User accountsrestaurants- Restaurant informationcategories- Menu categoriesmenu_items- Individual menu itemsorders- Order recordsorder_items- Order item details
- Payment integration (Stripe, PayPal)
- Advanced order tracking with GPS
- Restaurant admin panel
- Delivery driver app
- Push notifications
- Multi-language support
- Advanced search and filters
- User reviews and ratings
- Loyalty program
- Restaurant analytics
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
For support or questions, please open an issue in the repository.
Note: This is a replica/learning project and is not affiliated with Glovo. It's built for educational purposes to demonstrate full-stack web development skills.