image

Project: Strata PHP Framework

URL: https://strataphp.org

Overview

I have been working on this for some time but only now got around to releasing it to the public. Not that i'm suggesting or under the illusion that this will be used or adopted in any way. I’d more a simple example of what a lightweight framework can look like. And if people want to take it and develop it further so be it.

In short, Strata Framework is a modern, modular PHP framework designed to streamline web application development. It offers a clean architecture, robust security, support for modules and flexible module management, making it ideal for both rapid prototyping and scalable production projects.

 

Features

Features

  • Modular architecture: Easily add or remove modules (user system, forum, etc.)
  • Unified DB class: All database access uses the PDO-based DB class
  • Admin & user systems are independent
  • User authentication: Registration, login, profile, password reset (with token expiry)
  • Admin login & profile: Separate admin authentication, dashboard, and profile page
  • Email integration: Uses PHPMailer
  • CSRF protection: Automatic for all forms via the TokenManager class
  • Session management: Robust, secure, auto-started in app/start.php
  • Logging: Security/auth events logged to storage/logs/ via the Logger class
  • Dynamic navigation: Shows login/register/user menu based on config and session
  • Extensible: Add new modules in /htdocs/modules/
  • Admin links management: Add, edit, delete, and reorder links in the admin panel, with FontAwesome icon auto-detection and NSFW marking
  • NSFW support for links: Mark links as NSFW in the admin panel; public users must confirm before visiting NSFW links
  • Module enable/disable UI: Admin panel allows enabling/disabling modules and selecting the default module for the root page

Structure

  • htdocs/ — All PHP code, configs, and assets live here
  • app/ — Config, core classes, utilities
  • controllers/ — Controllers (one per route)
  • models/ — Data models
  • views/ — View templates and partials
  • themes/ — Theme folders (assets, custom views)
  • storage/ — Logs, uploads, and other runtime files
  • vendor/ — Composer dependencies (auto-generated)
  • htdocs/modules/ — Modular features (user system, forum, etc.)

Security & Customization

  • CSRF tokens are auto-generated and checked for all forms
  • Session is started automatically in app/start.php
  • Password reset uses secure tokens and expiry
  • Logging for security/auth events
  • Navigation adapts to user state and config
  • Configure mail settings in app/config.php
  • Extending: Add new modules, controllers, models, views, and assets as needed

Database Migrations & Seeding

  • Forward migrations: php bin/migrate.php
  • Rollback: php bin/rollback.php [steps]
  • Migration status: php bin/migration_status.php
  • Migration locking and logging
  • Migration generator: php bin/create_migration.php MigrationName
  • Seeding: php bin/seed.php
  • De-seeding: php bin/seed.php --down
  • Seed generator: Create your own seed and down seed files in the seeds/ directory

See the bin/ and migrations/ folders for more details and examples.

NSFW Links & Admin Links Management

  • Mark any link as NSFW in the admin panel (checkbox in add/edit forms)
  • NSFW links show a badge in admin and public views
  • Public users must confirm before visiting NSFW links (JS confirmation dialog)
  • Add, edit, delete, and reorder links from the admin panel
  • FontAwesome icon auto-detection for popular domains
  • NSFW marking and badge support
  • Enable or disable modules from the admin panel UI
  • Select the default module for the root page

Tech Stack:

Need Help With Your Project?

Need help with your project? Book a free session with me to discuss your specific project requirements and how I can help you.
Color Switcher