In order to gain experience with API development and some concepts like interactivity, designing a responsive UI, and so on, i made a PHPChat with a backend based on a PHP API to manage authentication and messages, coupled with a MariaDB database.
The front-end part, on the other hand, is entirely handled by JavaScript with AJAX requests, and by Bootstrap + Vanilla CSS for the CSS part.
🔐 Login
As you may noticed, the validation is done with AJAX, so it’s dynamic.
💬 Chat
The <form> is directly posted to the API. However, the update and delete fonctionnalities are dynamic; JS updates/removes the element from the DOM (frontend) and does an AJAX request to the API to update/remove it from the database (backend).
⚙️ Settings page
The validation of the entered password is also done witj AJAX, so it’s dynamic.
📂 Source
The source code and installation instructions are accessible here
You’ll also find a docker-compose file there if you want to test the application locally.