November 2018 Summaries
7 posts from Strapi
Filter
Month:
Year:
Post Summaries
Back to Blog
The tutorial provides a detailed guide on creating a food ordering system using Strapi and integrating it with Stripe for payment processing. It begins with setting up a new project and creating a content type for storing order details, including fields for address, city, dishes, and amount. Users are guided to configure roles and permissions in Strapi to allow order creation, and Stripe API integration is explained to handle secure credit card transactions without sensitive data passing through the server. The tutorial also covers setting up a checkout form using React Stripe Elements to capture and process payment information. It concludes by explaining how to create and view orders in the Strapi dashboard, preparing for deployment on platforms like Heroku and NOW. This tutorial is part of a series aimed at building a Deliveroo clone, with contributions from Ryan, a notable member of the Strapi community.
Nov 13, 2018
867 words in the original blog post.
To create a new Strapi project, simply copy and paste the command line `npx create-strapi-app my-project` in your terminal. This tutorial is part of the "Cooking a Deliveroo clone with Next.js (React), GraphQL, S[strapi] and Stripe" series. The author provides instructions on how to add items to a shopping cart using React Context API. A new component named Cart.js is created to track items added to the cart across pages. The state of items in the cart is managed using the React Context API, but saving items to a cookie upon page refresh is not implemented yet. An AppProvider directory is created to use the context throughout the application and on the dishes page. Updates are made to `_app.js` and `restaurants.js` files to use the AppProvider/Consumer components. The Cart component appears on the right side of the dishes when the page is refreshed, and a logout button is added to the Layout header if the user is logged in. However, this implementation lacks server-side validation for sensitive data.
Nov 13, 2018
450 words in the original blog post.
The tutorial provides a step-by-step guide on setting up user authentication for a project using Strapi, a headless CMS, in combination with Next.js and React. It demonstrates how to create a Strapi project and implement user registration and login using the Strapi SDK, which returns a JSON Web Token (JWT) for server-side verification, though server validation is not covered in this tutorial. The tutorial also explains the use of higher-order components, `defaultPage.js` and `securePage.js`, to manage authentication state and pass it to necessary components. To handle authentication, a new `auth.js` file is created under the `/lib` directory, facilitating centralized control over authentication functions, while dependencies like `jwt-decode`, `js-cookie`, and `strapi-sdk-javascript` are introduced to manage JWT and cookies, essential for storing user information in server-side rendering environments. The integration of authentication features involves updating components such as `Layout.js` for displaying user information and managing logout functions, as well as incorporating React Context for recognizing logged-in users, setting the stage for further development of a full-featured shopping cart.
Nov 13, 2018
574 words in the original blog post.
In a tutorial series focused on creating a Deliveroo clone using Next.js, GraphQL, Strapi, and Stripe, users are guided through the process of setting up a Strapi project and managing restaurant and dish content types within it. The tutorial explains how to create a new Content-Type for dishes, detailing its attributes such as name, description, image, price, and its relational link to restaurants. It further instructs on implementing a route to display a list of dishes associated with a specific restaurant and addresses handling 404 errors by setting up an Express server to properly render routes with Next.js. The tutorial hints at upcoming sections that will cover user authentication, highlighting the community contributions of Ryan, an active member of the Strapi community, in producing educational content.
Nov 13, 2018
456 words in the original blog post.
The text is a comprehensive guide on setting up and deploying a Strapi project as part of a tutorial series aimed at creating a Deliveroo clone using Next.js, GraphQL, Strapi, and Stripe. It outlines the steps for deploying the backend with Heroku, including configuring database connection strings and setting up file uploads with Amazon S3. The guide also covers hosting the frontend on Heroku, with instructions on modifying the `package.json` file to ensure compatibility with Heroku's dynamic port assignment. Additionally, the text provides alternative deployment options using the NOW serverless platform and includes detailed steps for creating a Dockerfile and a `now.json` configuration file for deployment. Throughout the tutorial, there are links to source code on GitHub and encouragement for readers to customize and expand on the project, with an invitation to share feedback and contributions to the Strapi community.
Nov 13, 2018
1,155 words in the original blog post.
You can create a new Strapi project with the command `npx create-strapi-app my-project` and start configuring it by adding a new Content Type called "restaurant" with fields such as name, description, image, and others. This will allow you to display a list of restaurants in your web app, which is managed through the API. Strapi creates a customisable CRUD API for this Content Type, but by default, APIs follow REST conventions. You can transform them into GraphQL within 10 seconds using a GraphQL plugin installed via the Strapi CLI or by clicking on the "Marketplace" on your admin dashboard. After installing GraphQL, you need to restart your server and make sure to downgrade the graphql-js dependency to fix an issue with MongoDB IDs serialization. Finally, you install Apollo in your frontend application and use it to connect your app with GraphQL, allowing you to display the list of restaurants in your Next.js app.
Nov 13, 2018
1,036 words in the original blog post.
The tutorial outlines the steps to create a Deliveroo clone using modern web technologies, incorporating Next.js for the front end and Strapi for the backend. It guides users through setting up a project with React, GraphQL, and Stripe for seamless user interface and payment processing. The tutorial begins with creating a Strapi project using a command line and progresses to setting up the front-end environment, integrating Bootstrap for styling, and creating shared components and routes. It also details setting up a Strapi server to manage the backend, including user authentication and database selection, and concludes with launching both the Next.js and Strapi projects locally. The tutorial emphasizes the open-source nature of Strapi and its extensibility through plugins, which save developers significant time in building scalable, production-ready APIs.
Nov 13, 2018
1,416 words in the original blog post.