Build a Dynamic Blog Management System
The task involves creating a dynamic Blog Management System in Core PHP. The system should
allow users to create, edit, delete, and view blog posts. It must include a basic admin panel for
managing users and blog content. Additionally, the candidate should demonstrate their ability to
implement secure practices and efficient database design.
Requirements:
1. Features
Public Side:
1. Homepage:
• Display a list of published blog posts (title, short description, and publish date).
• Include pagination (10 posts per page).
2. Single Post Page:
• Display the full blog content along with the author’s name and publish date.
• Add a comment section where visitors can post comments.
• Validate and sanitize user comments before storing them in the database.
3. Search Functionality:
• Provide a search bar to find blog posts by title or keywords.
Admin Panel:
1. Authentication:
• Implement a secure login system for admins (username and password stored
securely using password hashing).
• Include a “Forgot Password” functionality with email reset.
2. Blog Management:
• Create, update, delete, and view blog posts.
• Add support for file uploads (e.g., blog post images), with validation for file type and
size.
3. User Management:
• View a list of registered users.
• Add functionality to deactivate or delete users.
4. Comment Moderation:
• Allow admins to view, approve, or delete comments posted by users.
2. Technical Requirements
1. Core PHP Only:
• No frameworks like Laravel or CodeIgniter should be used. However, using
Composer for autoloading classes is allowed.
2. Database:
• Use MySQL for the backend database.
• Design a normalized database structure with tables for:
• Users
• Blog Posts
• Comments
3. Security:
• Prevent SQL injection by using prepared statements.
• Secure the file upload system to prevent malicious file uploads.
• Implement CSRF protection for forms.
• Validate and sanitize all user inputs.
4. Code Structure:
• Use the Model-View-Controller (MVC) architecture.
• Separate HTML, PHP logic, and database operations.
3. Bonus Points
• Implement a Category System for blog posts (e.g., Technology, Lifestyle).
• Add an Activity Log in the admin panel to track admin actions (e.g., created a post, deleted a
comment).
• Create an API to fetch the list of blog posts (e.g., /api/posts).
• Make the system responsive using basic CSS or Bootstrap.
4. Deliverables
1. Complete source code, structured in a GitHub repository with clear commit messages.
2. A README file with:
• Steps to set up and run the project locally.
• Database structure and any prerequisites.
3. A SQL script to initialize the database schema and sample data.
4. A video or screenshots demonstrating the functionality.