Our next step is to implement saving of the changes made on the client side to the server.
It is usually done using the dataProcessor library, which is embedded into the gantt.
Open index.phtml and add the following lines of code:

DataProcessor will react to each action on the client (i.e. adding data into the chart, modifying or removing it) by sending an AJAX request to the server.
The dataProcessor will work in the REST mode, which means it will use different HTTP methods for different actions, here is
a complete list of routes.

So now we need to add these routes to our app and implement the required logic. Firstly, go to src/routes.php:

As you can see, while there is relatively a lot of code, each method is plain simple: we create/update/delete tasks and links.
The insert action should return the database id of a new item back to the client.

Note that we don't handle database relations here, i.e. we don't delete nested tasks or related links when tasks are deleted.
It is handled by the client side by default. Gantt will send a separate request for each child task and link to be deleted.

If you want to handle it on a backend, you'll need to switch the cascade_delete config on.

Now everything is ready. Let's run our application. Open http://127.0.0.1:8080 and enjoy a nice Gantt chart we've just created.

Gantt doesn't provide any means of preventing an application from various threats, such as SQL injections or XSS and CSRF attacks. It is important that responsibility for keeping an application safe is on the developers implementing the backend. Read the details in the corresponding article.