The Blog Application is a web application designed to allow users to create and view blog posts. The application consists of a front-end user interface built using HTML, CSS, and JavaScript, and a back-end server built using Node JavaScript framework. The server-side application stores data in a MySQL database.
The Blog Application follows the Model-View-Controller (MVC) architecture pattern. The Model layer consists of a MySQL database, which stores blog post data. The View layer is built using HTML, CSS, and REACT JavaScript, and is responsible for rendering the user interface. The Controller layer is implemented using the Node JavaScript, and provides the application's business logic and RESTful API endpoints.
The MySQL database consists of two tables: blog_post
and blog_users
. The blog_post
table stores information about each blog post, including the post's ID, title, content, author, tag, and creation date. The blog_users
table stores information about each user account, including the users's ID, username, encrypted password, and email address. A many-to-many relationship is maintained between the blog_post
and blog_users
tables using a junction table named blog_post_users
.
The following RESTful API endpoints are provided by the Controller layer:
GET /posts
: Returns a list of all blog posts.GET /posts/{id}
: Returns details of a specific blog post.GET /tags
: Returns a list of all blog tags.GET /tags/{id}/posts
: Returns a list of all blog posts with a specific tag.POST /posts
: Creates a new blog post.PUT /posts/{id}
: Updates details of a specific blog post.DELETE /posts/{id}
: Deletes a specific blog post.
The front-end user interface is built using HTML, CSS, and JavaScript. The UI includes a navigation bar, which allows users to filter blog posts by tag, a section for displaying blog post previews, and a section for displaying individual blog posts. Users can create new blog posts using a form that includes fields for entering a post's title, content, and tags. Users can also upload images to include in their blog posts.
The Blog Application provides users with a platform for creating and viewing blog posts. The application is built using a modern, scalable architecture and provides a clean, easy-to-use user interface. The application's RESTful API endpoints allow for easy integration with third-party tools and services.