Building A To-Do App Using Next.js and Strapi
Published: 2022-07-13 08:31:57

In this tutorial, we'll learn how to create a small to-do app using two amazing technologies: Next.js and Strapi.

[Strapi is an open-source Node.js headless CMS that gives developers the power to easily create self-hosted, customizable, and performant content REST/GraphQL APIs.](https://strapi.io/) It is easy to use. First, you create the content structures, i.e. the tables and models. Then, you can write, edit or manage any content type.

[Next.js is the frontend part of the to-do app and Strapi will provide the API endpoints to the to-do app.](https://strapi.io/integrations/nextjs-cms) Strapi ensures that we follow the best practices when creating and consuming web resources over HTTP. 

For example, we have a book resource: `/books`. The HTTP verbs denote the action to be performed on the book’s resources. The books become a collection and a new book can be added, a book can be edited and a book can also be deleted.
* `post /books` -  A new book 
* `put books/:id` - Edit a book. 
* `get /books/:id` - Get a book. 
* `delete /books/:id` -  Delete a book.

Books become the collection and any of the CRUD actions can be performed on a book as we have seen above. By the end of this tutorial, you will be able to create a Strapi API and a Next.js project. The Strapi will serve our to-dos backend while the Next.js will fetch the to-dos from the Strapi backend and render them.

## Prerequisites

This project needs some software and tools to be installed before you can proceed:
- Nodejs: Strapi supports Nodejs v12.x or 14.x, you can download it from here [Nodejs](https://nodejs.org/)
- npm: NPM comes bundled with Nodejs.
- yarn: Yarn can be installed via npm:
```bash
    npm I yarn -g
```
- VS Code: The most popular code editor from Microsoft. Download from [VS Code](https://code.visualstudio.com/download)

## Installing Strapi 
Let’s begin by creating a central folder that will hold the Strapi backend and Next.js frontend.  To proceed, launch your terminal and enter the following command to create a project folder.
```bash
    mkdir strapi-ToDo-blog
```
This creates a strapi-ToDo-blog folder. Now, move into the folder:
```bash
    cd strapi-todo-blog
```
Now, we scaffold our Strapi project:
```bash
    npx create-strapi-app strapi-ToDo-blog --quickstart
```
![A Sample Screenshot](https://lh6.googleusercontent.com/twmPjH71SEqDPoP_QL8IozoyyIG9ZsApUQb9_Mu_2CFrGuPjNqSXxoAj0kEyP7PEuY_1Uekq4-zPdnccz9Qc8-61vUHn5ld0sTli65ysUVYvhQS9YqMYZzD7zvEr1DZeUQOA0UKHcBKg7urH2g)

The above command will create a new Strapi project and install the necessary dependencies. 

To start your Strapi project navigate to the folder when you installed the Strapi project and run the command below:
```bash
    npm run develop
```
Here, Strapi builds the admin UI with development configuration.

![A sample screenshot](https://lh3.googleusercontent.com/g8Wy4jDfGaD5OL5C0hYPwLatpEKDKxrSs02OV3mI4BQURtYiDXsNLhFurvc00qaW18A-ShGs51sX2acDuqESJu-InHC-QifM8p6cY8tpIlD35CaeNM18in2TTWAmtgR7oSA3Q8xVjF4xZ_DKug)


Next, Strapi runs the Strapi project by running the command: 
```bash
strapi develop
```
![A Sample Screenshot](https://lh4.googleusercontent.com/5rq9hClATHmU8SWjp73mb8SG68xo1Bp5IWmH02D2pARWvP82uLedETyfxn4p2X23ynL50JNm0DVvyj3NNiMc7lIZDsfm-UnrGxxeMAAP0qrXIzv6M9A-Vr2_kIYYqCPOx3Oo2RkCXSElG2HfHg)


The Strapi server is started at `localhost:1337`. We can go to `localhost:1337/admin` to setup our admin privileges. Open your preferred browser and navigate to localhost:1337/admin

Fill in your details:
![A Sample Screenshot](https://lh6.googleusercontent.com/u8gBvcTqEYCXA-BrVw2vD67QKwVgkxExUmurTXYqBGMD0g7yv4Rmy1hC2PYLNaLZ8jngrBgErSsohanxRr6A1WqZ8CvSK3_CbeOUw4ryGs4ffz7qwxQPCS-9m64Q959xZRmmhRotSMkNyldCog)

Then,  click on the “LET’S START” button. Clicking on this button will create your account and the strapi UI for admin will show:

![A Sample Screenshot](https://lh5.googleusercontent.com/PGCCEDYUbgtWcPvihnE82iF_aUxFuMguD1biWa6nHh9HURAhMsIEI1mgMAXynAWdV5pJ5DIkpttZnV4TypKpC-gI5w-AbDe_WMIEjDPVOw8gNN3U7gYh_S2tjwteMsvyuU-XMX8TV7WsOYGwgQ)

## Creating Collections
Now, we will create the web resources. Go to Content-Types Builder and click on the Create new collection type.
![A Sample Screenshot](https://lh6.googleusercontent.com/uPriGbswRqRjJC5if5ubakgDohoom6qeFbLebM0w-lrSkjKCkaNyU41XiNIVVH2iG15Gj_sEY5SQJnqNA_t9cKCBm80R-GNxF_zDqiIRGTWpWJSbGNV9N1EKmwdvBHnktPJ5Aq0hVrTcThIh9w)

 A modal will appear, there is the Display name input box, enter To-Do.
![A Sample Screenshot](https://lh6.googleusercontent.com/ARF3q1TmNfJQ-Q2OgRfS2h5xaCaa7YhAUIi2SiauHbqdS2qACIUSLadc_FErPCdp8XU6G9sEKx_6SRfoVQyBj3DIe8BngdYVPMsyB9UxhY7am2xBK4eL6ilRGIKOIocj95IPTzdaLfWrwUnQBA)

Then, click on Continue.
![A Sample Screenshot](https://lh4.googleusercontent.com/gNiytHE6s1JJ1C_kDcpGB-_QcJf6vMe9F4XkiFQZowGmdIGjht4g6DOchWLXpEnuEgd5QS87Xvk4dNy3QV4gWy2KbP9LUE5muJDC1eDa3ZB5jGsS4lVc_aK24aMh24vTIFnGesQ9TpoXgEBQoQ)


A modal will appear where we select the field for our collection type. Click on Text.
![A Sample Screenshot](https://lh4.googleusercontent.com/Xy7eY-Bv2EiITECNpzu-zwQhqzppguoaKRlgC4jR1meu5HhmLk4mlvZ8a43Jx9iTm34rCLJUXpA7w_Ve8cQGIsr8cwItoL0mqCKj8kZGzhJWJELdU5GJTQi6sBH0VwKOVh3DeekKAilDOy-WCA)

Enter the name of the field selected. Type in ToDojText, then click on "Finish".

![A Sample Screenshot](https://lh3.googleusercontent.com/EyfnjFsN3wToppNmt5BmpH29uW8khpZ3TJePLbxg-wE7tnq7f_tJRMFUy1wksIba_gjLU80mUVultJFg6HZsakas5izTHKMNYpEE6IZIZ-9DyL0dyCa8GWPogxjqQHMar6Ah-DZgP0sL5Z2Dkw)

Click on “Save”. On the sidebar, you'll see “COLLECTION TYPES” under it and you will see “Todo”.

![A Sample Screenshot](https://lh6.googleusercontent.com/1uicqmOnOoCUCpjSPH0HlceHWwB-GR_mCRFs84_dENAb-nnKb052d9shXwG0Ecr8up8L8qB-r5HDfXvc2w746m_XExLTGwekLRE4Zv5-3wEMZa4PsNWRHD4nIhMxxax6nhBytYlhonpOjSBWkw)

## Managing To-Do Content
Now to add some to-do items to the To-Do.
* Click on the “To-Do”
![A Sample Screenshot](https://lh4.googleusercontent.com/8SyhawDPmFVqXyteRsNCIL7yijW06g7gnZqs7hl0fZq7Mfj7J7rKJRURYi7hZqsJcAAZFEbMCuk5zgLo4apcBQ9l0zHSNDJyPM5n0s2iYr4UCUbQwNqgSHeyELCoSKLRSm-9D6rgYO41QBB-Fw)

* Let’s add a new to-do. To do that click on the “+ Create New entry” button.
![A Sample Screenshot](https://lh5.googleusercontent.com/gvQ0OnlUF3Clkzma4g3PBDn3Fs6-rQUD_ZMdeK8UA-_BWgVfE-AHy86GmXcu3CZkxCxw42kMtVLnYyvuJWwRu723yp3CtQPHMw8HvV7aEADDL00W5818LWMuVudnPlL2u-FZlkTiY04etaJ6NQ)

* Enter “Go to church” in the “TodoText” input box. Next click on “Save”. The “Publish” button will become enabled. Click on it to publish the todo text.

![A Sample Screenshot](https://lh3.googleusercontent.com/woUwNcqb_juaacUolN-uqJsQo670YNd-7GteJQUR9QjsuOyRDItrIeE5QLAFurZPmu4mjRIjeBT7acD8EAC0AMa2pp56NaZ9SGDynI5qGzxEuXXaiFTe6tsxqp4Kx2cCxhCTpz2WFi2DAeq9nA)

Now, the to-dos will be like this:
![A Sample Screenshot](https://lh6.googleusercontent.com/ExywZ9y17nfDOjxHpIARf7ArudWir8q1EkLAAYgoZbrLD0eFL-zmAdnDwbhkqjAmOT7k91VYIdyGyV8l9CpkV41uK3I3w0m7hzWlVKldkoZoeiuJ5kc-IrVyjLADZuSFuM6bF6jKf0lAQyXOQA)

The id, `published_at` and `created_at` fields are added by Strapi. id is the primary key and auto-incremented. `published_at` is a date timestamp that records the time when the todo is edited and published. `created_at` is the timestamp that records the todo was created.

Right now, to access our todos is restricted to only authorized users with certain roles. But let’s make it accessible to the public. To do that go to Settings - Roles.

![A Sample Screenshot](https://lh6.googleusercontent.com/7ga-p8GQ09B2gW4DQQUrqJm-7zIEc03uLjpc3rLYWtpIA0KbRge_9G6bTYkPLwE1twBx3cbYm-mfIt8CR_n0seHnkq96D25xX6nDiCDkdPENRUPHN83M2L1-ihykSHcN3bSSOq-KKKMXaxhA_Q)

We see two roles here: “Authenticated” and “Public”. Click on “Public”, on the page that appears, scroll down to “Permissions” and click on the “Select all” checkbox to select all checkboxes.

![A Sample Screenshot](https://lh6.googleusercontent.com/OzIQM9vUB5WLiNuAwbBnEqxDaypPjm3LGsWiU0OHWq_gnzzNqrwtUeHKmfQMJ2ZDN8OSrMCUAGevrP4i30Yh6EXCimVm5oEnQnsuJ65kFvOjoZCPPHwAT4cuplyD3r_KQi9CUtRyaI2JKFc6Uw)

With this, unauthorized users can perform CRUD actions on the todos collections. Now, we can test the todos endpoint using Postman.

## Testing the API Endpoint.
* Open a new tab on the browser. To fetch your to-dos, type localhost:1337/api/to-dos into the URL.

![A Sample Screenshot](https://lh6.googleusercontent.com/kIdZUAyBHc4K9jkneoNhu3l3raha5J9_RcdLsQad2nGG-Ppr1J_DHYW9XTF9zr0ygS0nhL1-KiuoI0l4CV3UCQU6peFBt0oLFDNwR4NMVHsVREfiTOPSbZ8F7rrJRjTH-CZiRZNTAJoGOArRlw)

We can see that all todos are returned.

* To fetch a single todo, pass in the ID of the todo that you want to fetch as to the Strapi api url, `localhost:1337/todos/{ID}`.
* Replace the ID with the todo ID item that you want to fetch. For instance to fetch a to-do item with the ID 2 then make a request to the endpoint, `localhost:1337/todos/2`.
* To fetch the todo with id 2, enter localhost:1337/todos/2 in the URL input box and click on "Send".

![A Sample Screenshot](https://lh5.googleusercontent.com/8GiUQAJj9k8-WNaVy9CSIruyDLhE2MfmXLhmJIBi1fCt08zMFunGYv3eCeBCsZf0uKJJB2bcxf0Kc4qzAKWrb3K7PgpFcqf4N8DmYWG6-Zz1t64f8-dDCNUyLO_Hwrs8VOylYocG-LWNIQCnGw)

The todo with id 2 is returned.

## Building the Next.js App
We have built and tested our API endpoints. Now, it is time to create the frontend using Next.js.
* To create a next.js project, make sure you move outside of the current Strapi project on your terminal and run the command below.
```bash
yarn create next-app todo-app
```
The above command creates a Next.js project todo-app.
* Open the todo-app project in VS Code. Our todo app will look like this:

![A Sample Screenshot](https://lh4.googleusercontent.com/cOqZ7uPtKsb-osmXKqh1_fNYzpaNzockn_LXrjFV2VBV4_xUjpj904ZYYZRLvC7aE7mRHV6PseMn1WyMbPNTiknJ3wUBQ1o5d1B7zJJ422d7SnIDv_H5LleDmGcR6v0N2quPtk72RLYYbJD5yQ)


Now, we will divide it into components:
![A Sample Screenshot](https://lh6.googleusercontent.com/iNXso1NP8QINQtlf4zk39_DUdEnket70oDjJJLegjCKv4C_DLEVAEeIfs78W7f7dghf3em_2FOJc8br7XZbG3AGed3ECN_KNRIhJ9xsXPTUdRocHw2kIvP6Z8_g91GHjqCQnR-sEmrEYCF82dg)

The Header and TodoItem will be a presentational component, while AddTodo and TodoList will be containers.

To create the folders components and containers in the todo-app project,
* In the components folder, add the files header.js and todoItem.js.
* In the containers folder, add the files addTodo.js and todoList.js.
* In Header.js, paste the below code:
```js
    //header.js will hold the header section.
    function Header() {
      return (
        <div className="header">
          <h2>ToDo app</h2>
        </div>
      );
    }
    export default Header;
    
    In todoItem.js, paste the below code:
    // todoItem.js will hold the single todo display.
    
    function TodoItem({ todo, editTodoItem, deleteTodoItem }) {
      return (
        <>
          <div className="todoItem">
            <div className="todoItemText">{todo.todoText}</div>
            <div className="todoItemControls">
              <i className="todoItemControlEdit">
                <button className="bg-default" onClick={() => editTodoItem(todo)}>
                  Edit
                </button>
              </i>
              <i className="todoItemControlDelete">
                <button className="bg-danger" onClick={() => deleteTodoItem(todo)}>
                  Del
                </button>
              </i>
            </div>
          </div>
        </>
      );
    }
    export default TodoItem;
```
The TodoItem component has props that expect the todo to display, then editTodoItem, and deleteTodoItem are functions that will be called when a todo is to be edited or deleted.

* Add the following code:
```js
    // addTodo.js is where new todos are added to our backend.
    function AddTodo({ addTodo }) {
      return (
        <>
          <div className="addTodoContainer">
            <input
              className="todoInputText"
              type="text"
              placeholder="Add new todo here..."
              id="todoText"
              onKeyDown={(e) => {
                if (e.code === "Enter") {
                  addTodo(todoText.value);
                  todoText.value = "";
                }
              }}
            />
            <input
              className="todoInputButton"
              type="button"
              value="Add Todo"
              onClick={() => {
                addTodo(todoText.value);
                todoText.value = "";
              }}
            />
          </div>
        </>
      );
    }
    export default AddTodo;
```
There is an input box and a button. Whenever the button is clicked, the addTodo function prop is called with the value of the input box. We added an onKeyDown event on the input box so we can capture the "Enter" key when it is pressed and call the addTodo function.
```js
    // todoList.js renders the todo list gotten from the Strapi backend.
    import TodoItem from "../components/todoItem";
    function TodoList({ todos, editTodoItem, deleteTodoItem }) {
      return (
        <div className="todoListContainer">
          <div className="todosText">Todos</div>
          {todos
            .sort((a, b) => b.created_at.localeCompare(a.created_at))
            .map((todo, i) => (
              <TodoItem
                todo={todo}
                key={i}
                deleteTodoItem={deleteTodoItem}
                editTodoItem={editTodoItem}
              />
            ))}
        </div>
      );
    }
    export default TodoList;
```
This component gets the todo list in an array. It sorts the array by the time it was created and then renders them. It receives editTodoItem, deleteTodoItem in its props and passes it to the TodoItem component. 

We are done fleshing out our components. Now, we have to render the containers. We are going to need the axios library, so we install it with
```bash
yarn add axios
```
* Go to the index.js file in the pages folder and paste the following code:
```js
    import Head from "next/head";
    import { useEffect, useState } from "react";
    import Header from "../components/header";
    import AddTodo from "../containers/addTodo";
    import TodoList from "../containers/todoList";
    import axios from "axios";
    export default function Home() {
      const [todos, setTodos] = useState([]);
      useEffect(async () => {
        const result = await axios.get("http://localhost:1337/todos");
        setTodos(result?.data);
      }, []);
      const addTodo = async (todoText) => {
        if (todoText && todoText.length > 0) {
          const result = await axios.post("http://localhost:1337/todos", {
            todoText: todoText,
          });
          setTodos([...todos, result?.data]);
        }
      };
      const deleteTodoItem = async (todo) => {
        if (confirm("Do you really want to delete this item?")) {
          await axios.delete("http://localhost:1337/todos/" + todo.id);
          const newTodos = todos.filter((_todo) => _todo.id !== todo.id);
          console.log(newTodos);
          setTodos(newTodos);
        }
      };
      const editTodoItem = async (todo) => {
        const newTodoText = prompt("Enter new todo text or description:");
        if (newTodoText != null) {
          const result = await axios.put("http://localhost:1337/todos/" + todo.id, {
            todoText: newTodoText,
          });
          const moddedTodos = todos.map((_todo) => {
            if (_todo.id === todo.id) {
              return result?.data;
            } else {
              return _todo;
            }
          });
          setTodos(moddedTodos);
        }
      };
      return (
        <div>
          <Head>
            <title>ToDo app</title>
            <link rel="icon" href="/favicon.ico" />
          </Head>
          <Header />
          <main className="main">
            <AddTodo addTodo={addTodo} />
            <TodoList
              todos={todos}
              deleteTodoItem={deleteTodoItem}
              editTodoItem={editTodoItem}
            />
          </main>
        </div>
      );
    }
```
This renders Header component and the container components, AddTodo and TodoList. We have a todos state, initially set to an empty array. This state holds the current todos array.

Next, we have a useEffect that we use to fetch the todos from the Strapi endpoint when the component mounts. See that we use the endpoint `localhost:1337/todos` to get all todos.

Here also, we defined the functions addTodo, deleteTodoItem, editTodoItem. These functions are passed to the container components where they are called.

The addTodo function adds a new todo in the endpoint. The function accepts the todo text in the todoText arg, then uses the HTTP POSt to create the new todo via `http://localhost:1337/todos` passing the todo text as payload. Then, the result of the action is gotten, and the newly added todo is added to the todos state thus making our app display the new todo in the UI.

The deleteTodoItem function accepts the todo object to be deleted in the todo arg. It confirms first if the user wants to delete the todo, if yes, it proceeds to call the endpoint `http://localhost:1337/todos/:todoId` with the todo id and the HTTP DELETE verb. This will cause Strapi to delete the todo with the id in its database. Next, we filter out the deleted todo and set the filtered result as the new todos in the todos state.

The editTodoItem functions edits a todo. It prompts the user to enter the new todo text. Upon clicking OK in the prompt dialog, it edits the todo via the endpoint via `http://localhost:1337/todos/` with the todo id, the HTTP PUT verb is used here, with the property in the todo model to edit is sent in the body. This causes Strapi to seek out the todo and edit it accordingly.

Next, we use Array#map method to get the todo in the local todos state and change it to was it is currently is in the Strapi backend, then, we set the modified todos in the todos state.

Let’s add CSS to our project. Open styles folder and paste the following in the globals``.``css file.
```css
    html,
    body {
      padding: 0;
      margin: 0;
      font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu,
        Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
      font-size: xx-large;
    }
    a {
      color: inherit;
      text-decoration: none;
    }
    * {
      box-sizing: border-box;
    }
    .main {
      padding: 10px 0;
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }
    .header {
      display: flex;
      justify-content: center;
      color: rgba(70, 130, 236, 1);
    }
    .todoInputText {
      padding: 10px 7px;
      border-radius: 3px;
      margin-right: 2px;
      margin-left: 2px;
      width: 100%;
      font-size: large;
    }
    button {
      padding: 10px 10px;
      border-radius: 3px;
      cursor: pointer;
      margin-right: 2px;
      margin-left: 2px;
      font-size: large;
    }
    .bg-default {
      background-color: rgba(70, 130, 236, 1);
      border: 1px solid rgba(28, 28, 49, 1);
      color: white;
    }
    .bg-danger {
      background-color: red;
      border: 1px solid rgba(28, 28, 49, 1);
      color: white;
    }
    .todoInputButton {
      padding: 10px 10px;
      border-radius: 3px;
      background-color: rgba(70, 130, 236, 1);
      color: white;
      border: 1px solid rgba(28, 28, 49, 1);
      cursor: pointer;
      margin-right: 2px;
      margin-left: 2px;
      font-size: large;
    }
    .addTodoContainer {
      margin-top: 4px;
      margin-bottom: 17px;
      width: 500px;
      display: flex;
      justify-content: space-evenly;
    }
    .todoListContainer {
      margin-top: 9px;
      width: 500px;
    }
    .todoItem {
      padding: 10px 4px;
      color: rgba(70, 130, 236, 1);
      border-radius: 3px;
      border: 1px solid rgba(28, 28, 49, 1);
      margin-top: 9px;
      margin-bottom: 2px;
      display: flex;
      justify-content: space-between;
    }
    .todosText {
      padding-bottom: 2px;
      border-bottom: 1px solid;
    }
```

### Run the Next.js Server
* Use the command below:
```bash
yarn dev
```
* Navigate to localhost:3000, there you will see our frontend being rendered.
![A Sample Screenshot](https://lh6.googleusercontent.com/ob0rNlSs6lXMpuP-ACLb0jXbw0vEskPZ-j1AKGuXi2e7yj5WSjKK-2JHe8me5N5yi4MJMLN2Yzx3ocw2GdvNjKRQ2-zDm5wYS4OBSRLw8VWOrHILmvvPk0kA0CoMkcc1KYLUmp06AzkssYgqhQ)

See we have a “go to church” todo there. This is from the todo we added via the Strapi admin panel when we were setting up the todos collection.

### Add a New To-Do
* Type “go to market” and click on the “Add todo” button.
![A Sample Screenshot](https://lh5.googleusercontent.com/6Nv4gugGCmcAb5hltyEiUbOjxz-Yb3FeH6eezwN24rkPI1ABAiCjmwrDGfFoPu8UB5Ppf0HwCKOxq0Grqiki7ZZTFCZ_oIZ-ogkwkkrm9-oj_sAkekvBxBIG8EIMWN4aevB6ZGqRdDbV6z4aWQ)

See a new todo shows up with “go to market”.
![A Sample Screenshot](https://lh5.googleusercontent.com/pvlQea24EFaenvOj9M9DomyVNMdjPTFd7tZeKExPDcmjZPsJ2pQ9h-08TgOTxGnaGgUlt7QhUCT0kjf5PcIwEVfUO5UNSiWNeSzD-X_PtpIfseZ9BKxCdJeb3mGcYLk6FGac5OV9Gcfu_zpOTg)

### Edit the To-Do Text
* Click on the “Edit” button next to the “go to market” todo.
![A Sample Screenshot](https://lh6.googleusercontent.com/gprrUFAnKFaFh6BEvSijySB8OAuZsMxDwsgM7wXKyAEyShSmmlxmK30mA4FM7eiQjS--V1K4a_MLhnk85F8sWKXskrdzvpM1gTLZ1qqE2wnl0xUtQRHxpmBJezV1n9v3qKdujRH9bKGFmO30Xw)

* A prompt dialog shows up, type in “go to shopping mall in Jabi”. Click on OK.
![A Sample Screenshot](https://lh6.googleusercontent.com/WsMWHqrYH1PpbzasJ7lXQQDgghzuxCkqwGHwdwErzvaIjOtY5qt52Aq3mdIPbdvm16GM9sPzTDe7q_UsL2zhlf9mGV0MSxNIM6v12jlwZYac3IBmR96ZQVobZRaAVzU3nv8ry8fkQ2jf0kE6BQ)

See the todo text changes to “go to shopping mall in Jabi”

### Delete the To-Do
* Click on the “Del” button next to “go to shopping mall in Jabi” todo. A confirm dialog shows up.

![A Sample Screenshot](https://lh5.googleusercontent.com/_Ketcc0Ny4zJ46_7VYF9vrVXg7Ct1qBgiUN64pcJg1nJzGk_5yGVI5TmNJiUvcM-DAKTPRV2iu6Eq2tdw8j3UF0fGULZ5hBj2mep-wKICI3z0v2OotaoD40Urgwwb32rwgsftf56o6UG3gUEEA)

* Click on OK. The to-do is deleted.

![A Sample Screenshot](https://lh5.googleusercontent.com/rlDkEwdzWELWjcJHmbt2wNad_2QzRR3xdSLj7LlS_fifZsWOGwcfLUMtl03IroyQJ3PXuUasQ3xvZgpBBttfF3iGcs403jsMW88ntEb8mRaea2dKaq8zfOOxpRQPA197pSW3QuAjXDlUrOTRQg)

## GitHub Source Code
You can [find the source code of the project here](https://github.com/olujerry/olujerry/tree/main/strapi-todo-app-main).

## Conclusion
 Strapi is both powerful and simple to use, as you can see. It was incredibly quick and straightforward to set up our backend. Simply construct your collections, and Strapi will provide endpoints that adhere to proper web principles.