承接 daranger/php-starter 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

daranger/php-starter

Composer 安装命令:

composer create-project daranger/php-starter

包简介

A modern PHP starter kit with MVC.

README 文档

README

A modern, lightweight PHP starter kit and micro-framework with a built-in admin panel, MVC architecture, and Docker support. Designed as a robust foundation for building secure and scalable web applications without the overhead of heavy frameworks.

Dashboard

Admin Settings

User Management

Login / 2FA

PHP License Docker

Core Features & Architecture

🛠️ Custom MVC Micro-framework

Built from scratch with zero heavy dependencies to keep the application blazing fast:

  • Routing Engine — Supports GET, POST, route groups, prefixes, and parameter extraction.
  • Dependency Injection Container — Intelligent container featuring autowiring via Reflection. Resolves dependencies recursively and supports singletons (getInstance()->bind(...)).
  • Middleware Pipeline — Clean request filtering before hitting controllers. Includes built-in AuthMiddleware, AdminMiddleware (with dynamic IP whitelisting), and CsrfMiddleware.

🛡️ Security & Authentication

  • Secure Sessions — Stored in Redis with automatic TTL for performance and security.
  • CSRF Protection — Integrated middleware automatically generates and validates _csrf tokens on every POST request.
  • Authentication — Bcrypt hashed passwords, rate-limiting against brute force, and ready-to-use 2FA logic.
  • Role-based Access Control (RBAC) — Distinct permissions for regular users and administrators.

🌐 Localization (i18n)

  • Built-in Translation System — A robust helper __('key') maps dictionary files from the lang/ directory to strings in the current user's locale.
  • Session & DB tied — Language preferences persist across sessions.

🎨 Themes & UI

  • Dark & Light Modes — Native support for theme switching out of the box.
  • Dynamic Settings — App name, mail host, UI settings are driven by the settings database table, configurable directly from the Admin Panel instead of hardcoded .env files.

📋 Logging & Telemetry

  • Database & File Logging — User actions (user_logs) and daemon background jobs (daemon_jobs_log) are tracked.
  • System Dashboard — Built-in SystemService that tracks server metrics (RAM, Disk, CPU Load Average, Uptime) and outputs them to the admin dashboard.

🐳 Docker Ready

  • Comes with a complete docker-compose.yml for instant local development.
  • Bundles Nginx, PHP-FPM 8.2, MySQL 8.0, and Redis 7.2.

Stack

Layer Technology
Language PHP 8.1+
Web server Nginx (via Docker) / Apache
Database MySQL 8.0 / MariaDB
Cache / Sessions Redis (Predis)
Mail PHPMailer
Framework Custom MVC (Container, Router, Middleware)
Tests PHPUnit 11

Requirements

  • PHP 8.1+ (if running bare-metal)
  • Composer
  • MySQL 8.0+ or MariaDB
  • Redis server
  • Or simply Docker & Docker Compose for local development.

Installation via Composer

The easiest way to start a new project is via Composer:

composer create-project daranger/php-starter my-new-app
cd my-new-app

Composer will automatically clone the repository, remove the git history, and install all dependencies.

Installation via Docker (Alternative)

  1. Clone the repository

    git clone https://github.com/daranger/php-starter.git
    cd php-starter
  2. Setup environment

    cp .env.example .env
    # Edit .env to set your database credentials if needed
  3. Start the containers

    docker-compose up -d
  4. Install PHP dependencies

    docker-compose exec app composer install
  5. Run migrations & seed

    # Make sure to run your database migrations/seeds here
    # e.g., import database/Migrations/*.sql
  6. Access the application Open your browser and navigate to http://localhost.

Testing

The framework includes a comprehensive test suite powered by PHPUnit.

composer dump-autoload
vendor/bin/phpunit

License

This project is licensed under the MIT License — see the LICENSE file for details.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固