Skip to content

An Uber Eats-style food delivery platform, running Medusa 2.0 and Next.js 14.

License

Notifications You must be signed in to change notification settings

Mundreanuc223/medusa-eats

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Medusa logo

Medusa Eats - Food Delivery Platform Demo

Medusa Eats ia a fullstack food delivery platform, inspired by Uber Eats, running on Medusa 2.0 and Next.js 14.

PRs welcome! Discord Chat Follow @medusajs

Table of Contents

  1. Overview
  2. Project Structure
  3. Quickstart
  4. Contribute
  5. Resources

Overview

Medusa Eats is built with:

Features include:

  • Restaurant storefront
  • Realtime order status dashboards
  • Driver and restaurant dashboards
  • User roles
  • Authentication
  • Medusa Workflows
  • Realtime Server Sent Event

Project structure

The project consists of two main directories:

  • /backend contains the Medusa 2.0 project with all the customizations.
    • This handles core functionalities, including user authentication, order management, and more.
  • /frontend contains the Next.js project.
    • This handles the user interface, restaruant storefronts, dashboards, and more.

Quickstart

Install dependencies

Use Yarn to install dependencies in both directories.

In /frontend run:

yarn

In /backend run:

yarn

Set up environment variables

The project comes with .env.template files to quickly set up your environment variables. Copy them to a .env file by running the following commands:

In /frontend run:

cp .env.template .env

In /backend run:

cp .env.template .env

Set up and seed the database

Create a Postgres database called medusa-eats.

The repo contains a setup script to build the project, run migrations and seed dummy data.

Make sure your local Postgres server is running.

In /backend run:

yarn setup-db

This will also create an admin user with the following credentials:

email: [email protected]
pasword: supersecret

Start developing

You are now ready to start up your project.

Start Medusa dev server

Make sure that Redis and Postgres servers are running locally on their default ports.

In /backend run:

yarn dev

The Medusa server is now running on http://localhost:9000.

Start Next.js dev server

In a separate terminal, cd to /frontend and run:

yarn dev

The Next.js frontend is now running on http://localhost:3000.

Create user accounts

We're gonna create a restaurant admin and driver account so we'll have access to both sides of the platform.

Create restaurant admin account

  1. Go to http://localhost:3000/signup.
  2. Select 'I'm a restaurant'.
  3. Select the restaurant you want to create an admin for.
  4. Fill out the remaining form fields and click 'Create account'.
  5. You can now log in as a restaurant admin and access the restaurant dashboard at http://localhost:3000/dashboard/restaurant.

Create driver account

  1. Repeat above steps, but this time select 'I'm a driver'.
  2. You can now log in as a driver and access the driver dashboard at http://localhost:3000/dashboard/driver.

Place an order and handle a delivery

To go through the entire delivery workflow in realtime, you'll need to log into both a restaurant and a driver account. To do so, use an icognito window or second browser.

  1. Go to the storefront at http://localhost:3000/.
  2. Select a restaurant from the list.
  3. Add menu items to you delivery by clicking the + buttons.
  4. Click the shopping bag button on the top right.
  5. Click 'Go to checkout'.
  6. Complete the form and place you order. A live order status dashboard will show up.
  7. In a new tab, go to http://localhost:3000/dashboard/restaurant and log in as an admin for the restaurant you just placed an order at.
  8. Your order should be visible in the "Incoming orders" column. Click the button to accept the incoming order.
  9. In an incognito window, go to http://localhost:3000/dashboard/driver and log in as a driver.
  10. The accepted order will show up on your dashboard. Click the button to claim it.
  11. The order will go through the different stages on all dashboards in realtime. You can progress the order by marking each stage as complete on the relevant dashboard.

Contribute

We happily welcome contributions to this project!

Note: Please review the source code and ensure you have a thorough understanding of it before making any changes

Follow the steps below to contribute to this project:

1. Fork the Repository

  • Start by forking the repository to create your own copy.

2. Browse the Issues

  • Head over to the Issues tab to view open issues.
  • If you find an issue you want to work on, leave a comment to request being assigned to it.

3. Open a New Issue

  • If you find a bug or have a feature idea that isn’t already listed, open a new issue.
  • In your issue, provide a clear description and reasoning behind the bug or idea.

4. Make Changes in Your Fork

  • After being assigned an issue, clone your forked repository to your local machine.
  • Create a new branch for your changes, using a descriptive name.

6. Merging Code

  • Make sure your changes don't conflict with existing functionalities
  • Push your changes to your forked repository and raise a pull request to the original repository

Resources

Learn more about Medusa

Learn more about Next.js

About

An Uber Eats-style food delivery platform, running Medusa 2.0 and Next.js 14.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.3%
  • Other 0.7%