Team | Web | HTML, CSS, JS, PHP, MySQL & C#
Time: 29 Januari 2024 - 19April 2024
My second time Developing an backend with api's and my first within websites. I used a XAMMPS apache server to host all my API calls to. It needed to be understandable for none programmers So i made it a single endpoint that was "/api.php" Here you could send an JSON payload thru with an param "action" to difine your action.
Me: Backend & Frontend Assistance/Updates
The backend went pretty smooth. I started by making table with users. In the users you had a field token. This token is used to verify that you are indeed making the call to the api. A token will get assigned to you when you log in, Gets saved in your local storage and the database and will be compaired with each action you do. If you are inactive for 10 minutes. When logging out. everything in the local storage and will send you to the login dialog again.
In the database, there are 3 tables linked with blogs. These are "Websites", "Styling", and "WebsiteStyling". The table contains everything you see in the video, the table that you see. Additionally, there is the "Styling" table. This table only contains boolean values regarding what is complete in the styling of the website. "WebsiteStyling" is the table that links these websites and styling together. So you can seach the styling of the website quickly.
Every key action is logged by the server. This includes creating or deleting a new user, creating or deleting a new blog, and posting a blog on the blog websites. These actions are logged by sending a request body, as shown in the image on the right. Then, an entry is made in the "Activitylog" table with the data, as shown in the image on the left.