Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📰 SabkeNews - Modern News & Educational Portal

SabkeNews is a high-performance, responsive news and educational portal built with a clean PSR-4 MVC Framework architecture in PHP. It features a modern front-end user experience, robust multi-tiered caching (Redis & File Fallback), SEO optimization (OpenGraph & Schema.org JSON-LD), and a powerful Admin Control Panel.


✨ Features Overview

🌐 Public Front-End

  • Clean MVC Architecture: Organized separation of concerns (Core/, Models/, Controllers/, Helpers/, Views/).
  • Responsive Modern UI: Modern dark/light design system with sleek typography, custom CSS variables, and fluid grids.
  • Fast Performance & Caching: File & Redis-backed caching for articles, settings, and navigation queries (src/Core/Cache.php).
  • SEO & Social Sharing: Auto-generated meta tags, canonical URLs, OpenGraph social previews, and Schema.org NewsArticle JSON-LD markup.
  • Sitemap Generation: Built-in XML (/sitemap) and HTML (/sitemap_html) sitemaps for search engine indexing.

🔐 Admin Panel (admin/)

  • Dashboard Overview: Live analytics overview showing active posts, pending drafts, visitor counts, and system environment info.
  • Post & Category Management: Create, edit, preview, approve, reject, or delete articles and categories.
  • Modular Post Editor (forms/_post_form.php): Unified 2-column post editor with TinyMCE rich text formatting and instant image upload previews (FileReader).
  • Unpublished Article Preview: Ability for authorized admins/authors to preview draft (W) and inactive (N) articles.
  • System Cache Flush: One-click Cache Flush feature in top navbar and Web Settings to clear Redis & file caches (App\Core\Cache::flush()).
  • Visitor Log Analytics: Non-blocking visitor logging with detailed IP, browser, and timestamp tracking.

📁 Repository Directory Structure

PHP-SabkeNews/
├── admin/                     # Admin Control Panel
│   ├── app/                   # Admin backend form processors & app handlers
│   │   ├── app.php            # Central POST action processor
│   │   ├── loading-post.php   # Modal AJAX post loader
│   │   └── ...
│   ├── dashboard/             # Admin Dashboard views & management pages
│   │   ├── index.php          # Main Dashboard Overview
│   │   ├── new-post.php       # Add New Post Page
│   │   ├── update-post.php    # Update Post Page
│   │   ├── view-post.php      # All Posts Listing
│   │   ├── view-single-post.php# Admin Single Post Preview
│   │   ├── manage-website.php # Web Settings & Cache Flush
│   │   └── forms/
│   │       └── _post_form.php # Shared Modular Post Form Component
│   └── index.php              # Admin Login Entry
│
├── assets/                    # Public static assets (CSS, JS, Images, Uploads)
│   ├── css/                   # App stylesheet (app.css)
│   └── postImage/             # Article featured image uploads
│
├── cache/                     # File cache storage & visitor_logs.json
├── src/                       # PSR-4 MVC Source Code
│   ├── bootstrap.php          # Application Bootstrapper & Autoloader
│   ├── Core/                  # Framework Engine (Router, View, Database, Cache)
│   ├── Controllers/           # Application Controllers (Home, Post, Page, Sitemap)
│   ├── Helpers/               # Utilities (SEOHelper, UrlHelper)
│   └── Models/                # Data Models (Post, Category, Setting, VisitorLog)
│
├── system/                    # Core Database Connection (connection.php)
├── views/                     # Front-End Template Views & Layouts
│   ├── layouts/               # Header, Footer, & Base Layouts
│   └── ...                    # Page templates (home, post_details, post_list, etc.)
│
├── .htaccess                  # Apache URL Rewrite Rules
├── index.php                  # Application Front Controller & Entry Point
├── post-details.php           # Legacy/Adapter route for article details
├── post.php                   # Legacy/Adapter route for category listing
├── sitemap.php                # XML Sitemap Endpoint
└── README.md                  # Project Documentation

🛠️ System Requirements & Setup

Requirements

  • PHP: 8.0 or higher
  • Web Server: Apache with mod_rewrite enabled
  • Database: MySQL / MariaDB (Database Name: blog)
  • PHP Extensions: pdo_mysql, mysqli, json, mbstring

Installation Steps

  1. Clone / Download Project: Place the project folder in your local XAMPP/WAMP htdocs directory: C:\xampp\htdocs\PHP-SabkeNews

  2. Configure Database: Import your blog.sql schema into MySQL and verify connection parameters in system/connection.php:

    $server_name = "localhost";
    $username = "root";
    $password = "";
    $db_name = "blog";
  3. Access Public Site & Admin:

    • Public Portal: http://localhost/PHP-SabkeNews/
    • Admin Panel: http://localhost/PHP-SabkeNews/admin/

⚡ Cache Management & Commands

To clear system cache from the Admin Panel:

  1. Click the "Flush Cache" button in the top navigation header bar, OR
  2. Go to Manage Website -> Cache Management and click "Flush System Cache Now".

👨‍💻 Developer & Author

About

SabkeNews is a high-performance, responsive news and educational portal built with a clean PSR-4 MVC Framework architecture in PHP.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages