Simply copy and paste the following command line in your terminal to create your first Strapi project.
npx create-strapi-app
my-project
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
2
3
4
5
6
7
8
# Create a new folder
mkdir deliveroo-clone-tutorial
# Move into new folder
cd deliveroo-clone-tutorial
# Opening new folder in VS Code
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
2
3
4
5
6
7
8
9
10
11
12
? Project name: deliveroo-clone
? Programming language: JavaScript
? Package manager: Yarn
? UI framework: None
? Nuxt.js modules: Skip
? Linting tools: ESLint, Prettier
? Testing framework: None
? Rendering mode: Universal (SSR / SSG)
? Deployment target: Static (Static/Jamstack hosting)
? Development tools: jsconfig.json (Recommended for VS Code if you're not using typescript)
? Continuous integration: None
? 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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Folder structure
deliveroo-clone-tutorial
βββ backend # default structure of a Strapi project
β βββ build
β βββ config
β βββ database
β βββ favicon.ico
β βββ node_modules
β βββ package.json
β βββ public
β βββ README.md
β βββ src
β βββ yarn.lock
βββ frontend # default structure of a Nuxt application
βββ components
βββ jsconfig.json
βββ node_modules
βββ nuxt.config.js
βββ package.json
βββ pages
βββ plugins
βββ README.md
βββ static
βββ store
βββ 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!