This tutorial is part of the « E-commerce website with Strapi, Nuxt.js, GraphQL and Stripe »
Note: The source code is available on Github.
Strapi is the leading open-source Headless CMS. The new major version of Strapi introduces many improvements:
Nuxt.js is a free and open-source web application framework based on Vue.js, Node.js, Webpack, and Babel.js. Vue.js is an open-source Model–view–view model JavaScript framework for building user interfaces and single-page applications. GraphQL is a query language for your API and a server-side runtime for executing queries using a type system you define for your data. Stripe is an online payment processing for internet businesses.
Get ready to develop a Deliveroo clone, using amazing technologies: [Strapi](https://strapi.io/), [Nuxt.js](https://nuxtjs.org), [GraphQL](https://graphql.org), and Stripe! From signup to order, you are going to let users discover restaurants, dishes and select their happy meal.
This demo, of the final result, below should make you hungry:
Looking forward to cooking this app? Let's get started!
Create a new empty directory and navigate into it:
1 # Create a new folder
2 mkdir deliveroo-clone-tutorial
3
4 # Move into new folder
5 cd deliveroo-clone-tutorial
6
7 # Opening new folder in VS Code
8 code -r .
In this step, we will use create-nuxt-app to create a new Nuxt project. Open a terminal, or from Visual Studio Code , open an integrated terminal and use the following command to create a new starter project:
1 npx create-nuxt-app frontend
After running the command above, you may answer some questions. Once all questions are answered, it will install all the dependencies.
1 ? Project name: deliveroo-clone
2 ? Programming language: JavaScript
3 ? Package manager: Yarn
4 ? UI framework: None
5 ? Nuxt.js modules: Skip
6 ? Linting tools: ESLint, Prettier
7 ? Testing framework: None
8 ? Rendering mode: Universal (SSR / SSG)
9 ? Deployment target: Static (Static/Jamstack hosting)
10 ? Development tools: jsconfig.json (Recommended for VS Code if you're not using typescript)
11 ? Continuous integration: None
12 ? Version control system: Git
Now that you've created your Nuxt project, you are ready to start a new Strapi project.
Simply copy and paste the following command line in your terminal to create your first Strapi project.
1 npx create-strapi-app@latest backend --quickstart
Using the --quickstart
flag at the end of the command to directly create the project in quickstart mode, which uses the default database (SQLite).
Once the installation is complete, your browser automatically opens a new tab.
Complete the form, to create your new administrator account.
Good job, you successfully set up both Nuxt and Strapi projects! 🎉
The default structure is intended to provide a great starting point for both small and large applications. Here's how our folder structure would look like:
1 // Folder structure
2 deliveroo-clone-tutorial
3 ├── backend # default structure of a Strapi project
4 │ ├── build
5 │ ├── config
6 │ ├── database
7 │ ├── favicon.ico
8 │ ├── node_modules
9 │ ├── package.json
10 │ ├── public
11 │ ├── README.md
12 │ ├── src
13 │ └── yarn.lock
14 └── frontend # default structure of a Nuxt application
15 ├── components
16 ├── jsconfig.json
17 ├── node_modules
18 ├── nuxt.config.js
19 ├── package.json
20 ├── pages
21 ├── plugins
22 ├── README.md
23 ├── static
24 ├── store
25 └── yarn.lock
You can learn more about Nuxt directory structure at Directory Structure, and for Strapi check project structure.
The installation script has just created an empty project. We will start building the Homepage in the next step.
Pierre created Strapi with Aurélien and Jim back in 2015. He's a strong believer in open-source, remote and people-first organizations. You can also find him regularly windsurfing or mountain-biking!