Skip to content

A production-ready foundation for secure PHP web applications with MVC architecture, authentication, and validation built-in.

License

Notifications You must be signed in to change notification settings

zyin-jessie/php-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Boilerplate

A ready-to-use PHP boilerplate designed to streamline website and application development. This boilerplate follows the MVC architecture, includes essential configurations, and provides a secure and scalable foundation for building modern PHP applications.

Features

  • Modern PHP: Built for PHP 8+ with type safety and modern language features in mind.
  • MVC Architecture: Clean separation of concerns with organized controllers, models, and views.
  • Security Measures: Built-in security measures including request validation and middleware support.
  • Authentication: Foundation for implementing secure user authentication flows.
  • Database Integration: Prepared MySQL connection setup with PDO for safe database interactions.
  • Validation Layer: Dedicated validation directory for structured input sanitization and verification.
  • Development Standards: Includes Prettier configuration for consistent code formatting.

Prerequisites

  • PHP (8+)
  • Apache
  • MySQL

Installation

  1. Clone the repository:

    git clone https://github.com/zyin-jessie/php-boilerplate.git
    cd php-boilerplate

Project Structure

├── public/                    # Static assets
├── src/    
│   ├── config/                # Application configuration files
│   │   └── database.php       # MySQL connection setup
│   ├── controllers/           # Handlers for HTTP requests and response
│   ├── middlewares/           # Middleware configuration
│   ├── models/                # Database models
│   ├── validation/            # Input validation and sanitization
│   ├── view/                  # Presentation templates
│   ├── global.css             # Global stylesheet for the application
│   ├── index.php              # Server entry point
├── .gitignore                 # Git ignore file
├── .prettierignore            # Files to ignore for Prettier formatting
├── .prettierrc.json           # Prettier configuration file
└── README.md                  # Project overview and setup instructions

License

Author

zyin-jessie

About

A production-ready foundation for secure PHP web applications with MVC architecture, authentication, and validation built-in.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published