Personal blog and portfolio with a admin panel and comment system.

Overview

Implementation of a Full Stack Blog With a Comment System And Admin Panel With PHP, React & MYSQL

FULL DOCUMENTATION

SITE LINK

Contents

  • Database Design
  • PHP Implementation in The Server Side
  • Admin Panel
  • React Implementation in The Client Side
  • Host

Database Design

As you can see in the diagram, the base is very basic, but sufficient for all the inconveniences that could arise. For the management of the posts that I do it was obvious that I needed the POST and CATEGORY entities, the attributes that they contain that are also seen were also obvious that I needed them so I am not going to go into detail about them.

The BLOG_ADMIN table has no relationship with the POST table because I will only be the admin, the table will be used to save my data, guaranteeing even more security in the backend (because if I saved it in some php document I could expose at some risk).

The USER_COMMENT table will save the IPs of the users in order to handle spam, users will be allowed to publish only 3 comments in one day, the number of comments per hour could be changed. The country attribute will be used for general administration information.

I also want to emphasize that I thought up to the issue of the dates of the comments, I mean the time difference, so whenever someone comments on a post I will always save the time zone of that client so that whenever I show a comment to another client can adapt the dates of the comments to the time zone of that client.

This detail is also taken into account when the dates of the posts are shown to the user.

I do this by doing the conversions of hours on the client side, on the server the dates will be saved in the Istanbul timezone.


PHP Implementation in The Server Side

The important points of the server are that it only accepts POST requests from the domain of this page, also that the server has been designed using the implementation of the model view controller (MVC) architecture. To protect the information of the users I never expose out the attributes of their countries and IPs.

For the post actions related to administrative actions, they will always be controlled with the user information, so if, for example, a request is made to publish a post, the username and password of admin will also be expected, this is done to have greater security, also does not generate performance problems since there will only be one admin.


Admin Panel

To raise the level of the project I have decided to make an admin panel, so to be able to make a fully functional application for any client, the panel is completely designed for my personal use.

Here is a demo (click on the photo or here to see the video): Watch the video

I can edit the nicknames and comments of the users (due in case I should delete some part of them) and directly delete the comments, I can add, edit and delete the categories and finally I can create, delete and edit the posts.

You could say that the admin panel is a CRUD application.

I have also put the statistics in the admin section before starting the session, I do this with the purpose of exposing them a little outwards.


React Implementation in The Client Side

For the content reading issue, I have used the react-markdown, remark-gfm and react-syntax-highlighter libraries, because it facilitates both the editing and the display of the content, I name these libraries because the truth It has fascinated me that thanks to them, great things can be done in a short time.

On the client side, I would only like to highlight one thing, I have even thought about the issue of a wrong url, as I have shown before in the server part to show a post, the only thing that is necessary is to give its ID, but what if would there be a wrong title in the url? For this reason on the client side I control if the title also matches the content of the database, based on that the content is loaded or if the user is not told that the post he is requesting does not exist.


Host

The host is completely free, the database is on clever-cloud, the php scripts are on heroku and the static page on the github pages.

You might also like...

A web-based tool to view, edit, format, and validate JSON

A web-based tool to view, edit, format, and validate JSON

JSON Editor JSON Editor is a web-based tool to view, edit, format, and validate JSON. It has various modes such as a tree editor, a code editor, and a

Jan 4, 2023

The world's #1 JavaScript library for rich text editing. Available for React, Vue and Angular

The world's #1 JavaScript library for rich text editing. Available for React, Vue and Angular

TinyMCE TinyMCE is the world's most advanced open source core rich text editor. Trusted by millions of developers, and used by some of the world's lar

Jan 4, 2023

A lightweight and amazing WYSIWYG JavaScript editor - 20kB only (8kB gzip)

A lightweight and amazing WYSIWYG JavaScript editor - 20kB only (8kB gzip)

Supporting Trumbowyg Trumbowyg is an MIT-licensed open source project and completely free to use. However, the amount of effort needed to maintain and

Jan 7, 2023

:notebook: Our cool, secure, and offline-first Markdown editor.

:notebook: Our cool, secure, and offline-first Markdown editor.

Monod Hi! I'm Monod, the Markdown Editor! Monod is a (relatively) secure and offline-first Markdown editor we have built at TailorDev in order to lear

Dec 4, 2022

:herb: NodeJS PHP Parser - extract AST or tokens (PHP5 and PHP7)

php-parser This javascript library parses PHP code and convert it to AST. Installation This library is distributed with npm : npm install php-parser -

Jan 7, 2023

ppo is a super small and useful utils library for JavaScript 🐝🐜

ppo is a super small and useful utils library for JavaScript 🐝🐜

Overview Every frontend developer has written his own utils library, and we often write methods that are easily forgotten and highly used. ppo is a su

Jul 21, 2022

βš—οΈ Zeplin extension that generates Swift snippets from colors, fonts, and layers

βš—οΈ Zeplin extension that generates Swift snippets from colors, fonts, and layers

Zeplin extension that generates Swift snippets from colors, fonts and layers. Features πŸ– Color pallette for iOS Example import UIKit extension UICol

May 29, 2022

Add to your GitHub readme a badge that shows your Discord username and presence (online/idle/do not disturb/offline)!

Discord Profile Markdown badge Add to your GitHub readme a badge that shows your Discord username and presence! Set up Join the Discord server (requir

Dec 30, 2022

Like codepen and jsbin but works offline.

Like codepen and jsbin but works offline.

Jan 2, 2023
Owner
Andres Arturo Rodriguez Calderon
Ege University Computer Engineering
Andres Arturo Rodriguez Calderon
Enjoy creating cover image for your hashnode blog like never before, get started in seconds πŸŽ‰

Slickr ✨️ View Demo · Report Bug · Request Feature Introducing Slickr ✌️ Slick is the most powerful and the easiest app to create beautiful cover imag

Savio Martin 469 Dec 21, 2022
Liferay Remote Blog Editor

Liferay Remote Blog Editor Demonstrate how a blog editor built with React can be integrated as a Remote App in Liferay 7.4. Getting Started Clone this

Louis-Guillaume Durand 1 Jan 28, 2022
Blog template to use Google Docs as article editor.

Godolog Blog template to use Google Docs as article editor. Usage Set up Create a new repository from Use this template button above with Include all

Ryo Nakamura 13 Oct 4, 2022
Blog template to use GitHub Issues as article editor.

Gialog Blog template to use GitHub Issues as article editor. Usage Set up Create a new repository from Use this template button above with Include all

Ryo Nakamura 40 Dec 26, 2022
Open source rich text editor based on HTML5 and the progressive-enhancement approach. Uses a sophisticated security concept and aims to generate fully valid HTML5 markup by preventing unmaintainable tag soups and inline styles.

This project isn’t maintained anymore Please check out this fork. wysihtml5 0.3.0 wysihtml5 is an open source rich text editor based on HTML5 technolo

Christopher Blum 6.5k Jan 7, 2023
A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.

SimpleMDE - Markdown Editor A drop-in JavaScript textarea replacement for writing beautiful and understandable Markdown. The WYSIWYG-esque editor allo

Sparksuite 9.3k Jan 4, 2023
Open source rich text editor based on HTML5 and the progressive-enhancement approach. Uses a sophisticated security concept and aims to generate fully valid HTML5 markup by preventing unmaintainable tag soups and inline styles.

This project isn’t maintained anymore Please check out this fork. wysihtml5 0.3.0 wysihtml5 is an open source rich text editor based on HTML5 technolo

Christopher Blum 6.5k Dec 30, 2022
A modern, simple and elegant WYSIWYG rich text editor.

jQuery-Notebook A simple, clean and elegant WYSIWYG rich text editor for web aplications Note: Check out the fully functional demo and examples here.

Raphael Cruzeiro 1.7k Dec 12, 2022
Quill is a modern WYSIWYG editor built for compatibility and extensibility.

Note: This branch and README covers the upcoming 2.0 release. View 1.x docs here. Quill Rich Text Editor Quickstart β€’ Documentation β€’ Development β€’ Co

Quill 34.3k Jan 2, 2023