Skip to content

Repository files navigation

Simple Blog PHP

A professional, modular, and secure blogging platform built with PHP and MySQL. Designed for clarity, scalability, and security, following recruiter-grade and open-source standards.

Problem Statement

Enable individuals and teams to publish, manage, and share blog content securely and efficiently, with a codebase suitable for enterprise and open-source adoption.

Architecture

  • src/: Core logic (controllers, models, views)
  • config/: Configuration and environment setup
  • tests/: Unit and integration tests
  • docs/: Architecture, contributing, changelog, security
  • scripts/: Automation and utilities

See docs/ARCHITECTURE.md for details.

Tech Stack

  • PHP 7.0+
  • MySQL
  • Bootstrap (frontend)
  • Composer (recommended)

Setup

  1. Clone the repository:
    git clone https://github.com/JosephJonathanFernandes/Simple-Blog-PHP.git
  2. Copy .env.example to .env and set your environment variables.
  3. Create a MySQL database and import schema (see init_db.php).
  4. Configure your web server (e.g., Apache, Nginx) to serve the project.
  5. Run composer install if using dependencies.

Usage

Access the app in your browser at http://localhost/Simple-Blog-PHP.

Value Proposition

  • Modular, readable, and scalable codebase
  • Secure by default (no hardcoded secrets)
  • Easy to extend and maintain
  • Reviewer- and recruiter-friendly

Security

Testing

  • See tests/ for unit and integration tests
  • Recommended: PHPUnit

Contributing

See docs/CONTRIBUTING.md

License

MIT

Usage

  • Register or create an admin user (via create_admin.php).

  • Login and start creating posts.

  • Manage posts with edit and delete options.

Folder Structure

  • index.php - Homepage listing posts

  • create_post.php - Form to add new posts

  • edit_post.php - Edit existing posts

  • delete_post.php - Delete posts

  • db.php - Database connection

  • uploads/ - Folder to store uploaded images

Security Notes

  • Uses prepared statements to prevent SQL injection

  • Basic input validation on forms

  • Avoid uploading unsafe file types

License

  • This project is open-source and free to use.

About

A simple blogging platform built with PHP and MySQL. Features include user authentication, CRUD operations for posts with image upload, and a clean responsive design using Bootstrap. This project demonstrates backend development skills, database management, and basic security practices.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages