Loading repository data…
Loading repository data…
rodrigomarcelo643 / repository
A clean PHP 8+ MVC boilerplate with a structured js/ layer, split route files, super admin + admin panels, session auth with live password strength validation, role-based routing, OAuth (Google + GitHub), flash toast system, AJAX fetch helpers, Alpine.js reactive UI, Tailwind CSS, and PHPUnit — zero frameworks, zero fluff.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
js/ layer, split route files, super admin + admin panels, session auth with live password strength validation, role-based routing, OAuth (Google + GitHub), flash toast system, AJAX fetch helpers, Alpine.js reactive UI, Tailwind CSS, and PHPUnit — zero frameworks, zero fluff.⭐ Star on GitHub · 📖 Docs · 🧪 Tests
Vanilla PHP MVC Starter Kit is a lightweight, zero-framework boilerplate for developers who want a clean starting point without the overhead of Laravel or Symfony. Built on pure PHP 8+, it ships with a hand-rolled MVC architecture, session-based authentication, role-based routing, and a full admin panel — all wired up and ready to go.
The frontend uses Tailwind CSS and Alpine.js via CDN, so there's no build pipeline to configure. AJAX helpers, avatar uploads, password reset flow, and a responsive multi-panel layout (super admin, admin, app, client) are included out of the box.
Backed by PHPUnit with 77 tests across unit and feature suites, GitHub Actions workflows for linting, quality checks, and deployment, and a single SQL file to get your database running in minutes.
Start building in minutes, not hours.
Session::flash() sets one-time toasts, auto-fired on next page load.env-driven configuration, no hardcoded credentialscomposer.jsonThis starter kit is intentionally built without Laravel — and that's the point.
If you are learning PHP for the first time or studying MVC architecture, Laravel's abstractions (Eloquent, Facades, Service Containers) can hide what's actually happening under the hood. This kit exposes everything — the router, the auth system, the database layer — in plain, readable PHP so you can see exactly how it works.
Start here. Understand MVC fundamentals. Then move to Laravel with confidence.
Not every project needs the full weight of a framework. This kit is:
.env file, and you're live| This Kit | Laravel Equivalent |
|---|---|
Router::get() | Route::get() |
php kit make:controller | php artisan make:controller |
php kit db:seed | php artisan db:seed |
php kit migrate | php artisan migrate |
.env config | .env config |
| Middleware classes | Middleware classes |
| MVC structure | MVC structure |
The patterns here are intentionally Laravel-inspired — so once you understand this kit, transitioning to Laravel feels familiar, not foreign.
| Scenario | Use This Kit | Use Laravel |
|---|---|---|
| Learning MVC from scratch | ✅ | ❌ Too much magic |
| Small business site / portfolio | ✅ | ✅ |
| Shared hosting (cPanel) | ✅ | ⚠️ Can be tricky |
| Large enterprise SaaS | ⚠️ | ✅ |
| Understanding routing internals | ✅ | ❌ Hidden behind framework |
| Rapid API with auth/queues/etc | ⚠️ | ✅ |
Home
Sign In
Sign Up
Forgot Password
Admin Dashboard
User Panel
See the full visual walkthrough in VISUALS.md
starterkit/
├── app/
│ ├── config/ # App, database, mail & OAuth config (reads from .env)
│ ├── controllers/ # MVC controllers
│ │ ├── auth/ # AuthController, OAuthController, PasswordController, ProfileController
│ │ └── superadmin/ # SuperAdminDashboardController, SuperAdminAdminController
│ ├── core/ # Router, Model, Auth, Session (+ flash), Database, Mailer
│ ├── helpers/ # Global helper functions
│ ├── models/ # Data models (User, Admin, SuperAdmin, PasswordReset)
│ └── views/ # Layouts, components & pages (superadmin/admin/app/client/auth)
├── assets/ # CSS & fonts
├── database/
│ └── starter.sql # Database schema + seed data
├── js/
│ ├── admin/ # Admin-specific JS (admin.js, users.js)
│ ├── ajax.js # Fetch wrapper (Ajax.post / Ajax.get)
│ ├── app.js # Global utilities (toast, alert, setLoading)
│ ├── auth.js # Auth form handlers + strength meter
│ ├── avatar.js # Avatar upload with drag & drop + XHR progress
│ ├── logout.js # Logout confirmation modal
│ ├── profile.js # Profile edit + change password handlers
│ ├── settings.js # Settings page theme sync
│ ├── sidebar.js # Sidebar keyboard shortcut (Ctrl+B)
│ └── theme.js # Dark/light mode toggle
├── routes/
│ ├── web.php # Entry point — loads all route files
│ └── web/
│ ├── superadmin/ # Super admin page + AJAX routes
│ ├── admin/ # Admin page + AJAX routes
│ ├── app/ # Authenticated user page + AJAX routes
│ ├── auth/ # Auth page + AJAX + OAuth routes
│ └── client/ # Public/client page routes
├── storage/ # Uploads
├── tests/ # PHPUnit unit & feature suites
├── .agent/ # AI coding assistant context & prompt templates
├── .claude/ # Claude/Cursor context file
├── .github/workflows/ # CI/CD workflows
├── .env.example # Environment template
├── .htaccess # URL rewriting
├── composer.json # Dependencies
└── index.php # Application entry point
1. Create the project via Composer
composer create-project mardev/starter-kit my-app
Place it inside your server's web root (e.g., htdocs/ or www/). Composer will automatically download the kit, install all vendor dependencies, and trigger the interactive setup wizard automatically.
3. Set up the database
database/starter.sqlstarter database with tables and seed data4. Configure environment
cp .env.example .env
Edit .env with your values:
APP_NAME="Starter Kit"
BASE_URL="/your-folder-path"
DB_HOST=localhost
DB_NAME=starter
DB_USER=root
DB_PASS=
5. Visit the app
http://localhost/your-folder-path
| Role | Password | |
|---|---|---|
| Super Admin | superadmin@starter.com | password |
| Admin | admin@starter.com | password |
| User | alice@example.com | password |
When you run composer install, the setup wizard automatically launches and asks you to pick an installation mode:
====================================================
Welcome to Vanilla PHP MVC Starter Kit
====================================================
Which preset would you like to install?
[1] Full Stack (Alpine.js + AJAX Monolith) - Default
[2] REST API (Full Stack with JS)
[3] Backend Only (REST API, No UI)
[4] jQuery Stack (Full Stack with jQuery AJAX)
Select an option [1]:
The classic MVC full stack mode. All views are rendered server-side. AJAX calls use the /ajax/ route prefix and return JSON. The /api/ routes are also registered and available for external consumers alongside the HTML interface.
/ajax//api/ (JSON)http://localhost/yourapp/ → renders HTML homepageIdentical to Option 1 but injects the smart Controller which auto-detects /api/ prefixed requests and switches them to JSON output mode. All HTML views remain intact. The frontend JS layer drives data via /api/ fetch calls.
Controller — /api/ routes return JSON, page routes return HTMLhttp://localhost/yourapp/ → renders HTML homepagehttp://localhost/yourapp/api/admin/users → returns JSON user listPure JSON API mode. All frontend assets (views, JS, CSS, client routes) are removed. Every request returns JSON. Use this when building a decoupled frontend (React, Vue, mobile app) that communicates with this backend via the /api/ endpoints.
routes/api.php is loaded — pure JSON responsesController auth guard returns JSON 401/403 (no HTML redirects)http://localhost/yourapp/ → returns JSON welcome messagehttp://localhost/yourapp/api/admin/users → returns JSON user listFull stack traditional monolith mode leveraging jQuery instead of Alpine.js for interactive views and AJAX forms. The installer automatically downloads and incorporates the dynamic jQuery libraries.
http://localhost/yourapp/ → renders HTML homepage| Feature