UserFrosting
Modern user management for php

Chances are you're here because you have a great idea for a user-oriented website.

Whether it's a private forum for your gaming community, an employee management system for your business, or the next big social network, you want to get started on your awesome new idea as quickly as possible. You don't want to spend your time reinventing user sign-in and management features for the millionth time. Lucky for you - UserFrosting delivers all of this and more!

Screenshot of a login page

A framework and an application.

UserFrosting is a web framework for PHP. Like other web frameworks, it offers a complete toolbox of programmatic components for building your application.

Unlike other PHP frameworks, it's a fully-functioning user management application, right out of the box. And, it's fully extendable so that you can easily create the custom features you need.

Screenshot of the user management table

Step up your game.

UserFrosting is designed to bring new and returning developers up to speed with the modern PHP community. You'll be comfortably introduced to Composer (the dependency manager), object-oriented design patterns, and the PHP Standards Recommendations (PSR), making your code better structured and easier to manage.

Screenshot of the manage user permissions modal

What's more, you'll learn how to use Node.js and Bower to cleanly manage client-side packages (Javascript and CSS). Transform yourself from a code monkey into a software engineer.

Features

Modern Specs

90's fashion might be back in style, but 90's development practices are not. Our detailed installation guide painlessly introduces you to the modern developer's toolkit.

Sign-in System

Login and persistent sessions ("remember me") are ready out of the box. Basic user functionality is already taken care of for you!

Fully extendable

New in version 4, the modular Sprinkle system lets you implement your application without ever modifying UF's core codebase. Sprinkles can also be used to implement themes, plugins and more - see what our community has to offer!

Admin user management

Built-in user management page lets you view, search, and sort your users, create new user accounts, and edit existing ones. Also provides tools to disable or delete users, manage permissions, and issue password resets.

Separation of concerns

Give the gift of maintainability to your future self, no spaghetti code here.

Roles and permissions

Powerful role-based access control (RBAC) allows you to define fine-grained, programmatic rules for user access, then manage those permissions through the role management page.

Optimization

Define and compile asset bundles with Node.js, leverage caching for template rendering and route resolution, or use Laravel's caching service to cache arbitrary resources. Just about every component can be optimized for production.

User dashboards

Build beautiful dashboards for your users with the default AdminLTE theme.

Documentation

Clear, jargon-free guides for every aspect of the framework. More than just the "how" and "what" - we explain the "why", too. Get answers fast.

FAQ

  • What's the difference between a login script and a framework?

    At least 90% of the time spent on a software project is spent not on writing new code, but reading and debugging existing code. Therefore, it is important to put a lot of care into producing a well-designed application.

    Starting with a framework like UserFrosting is a good way to ensure that you (or others) will be able to understand and maintain your code months or years after the initial work is completed. Anything you find online that bills itself as a "login script" is probably not going to help you produce a piece of software that is built to last.

    While a framework involves a bit of a learning curve compared to "plain PHP," you'll come out a better, more mature developer with a finished project that won't need to be constantly rewritten.

  • Why should I use this? The other options seem easier.

    It may seem simpler to integrate one of the thousands of PHP login scripts that show up in a Google search - and perhaps it would be, at first! But over time, a purely procedural approach tends to leave you with a big ball of mud - a project that is poorly structured and nearly impossible to maintain.

    Furthermore, many of these "user scripts" tend to lack proper maintenance and long-term community support. Bugs and other issues in their codebase can easily end up being your problem, and you may end up needing to significantly rewrite these scripts when major design and security issues come up.

    UserFrosting does take a little more work to set up and learn at first, but it's worth it and we're here to help. The concepts and design principles you'll learn as you write (or rewrite) your project with UserFrosting go far beyond this framework, and even PHP itself! You'll come out a stronger software developer with a more robust application - how many other login scripts can say that?

  • Can I integrate this with my existing scripts?

    Sort of. Actually, you will integrate your existing PHP scripts into a new UserFrosting installation, by implementing a custom Sprinkle. The Sprinkle system helps you keep your code completely separate from the core UserFrosting codebase. This makes it easy to upgrade when a new version of UserFrosting comes out. And, since UserFrosting builds on well-known and widely supported components like Slim, Twig, and Eloquent, much of your code will still be usable even if you decide to move away from UserFrosting in the future.

  • How much does UserFrosting cost?

    UserFrosting is completely free and open source under the MIT license. You can use it for any type of project, even commercial applications - all you need to do is include a copy of the license in any code you distribute that is built with UF. That being said, we always welcome contributions of time, code, and/or money!

Contributors

Louis Charette


Louis is a civil engineer from Montréal, Québec who has a passion for coding. Over the last 15+ years, he has worked on many small projects, learning everything on his own before getting involved with bigger projects. Louis created UserFrosting's Internationalization module, a module crucial to him as a multi-lingual software developer in Canada, where software requires support for both official languages, English and French, as well as UserFrosting's Bakery CLI interface. Overall, he likes to share his knowledge by helping others, the same way he was helped when he first started coding.

Jordan Mele


Jordan's an Australian Software Engineer at Canva. His passion is creating simple yet intuitive software-based solutions for problems that would otherwise be tedious and/or difficult to solve, while keeping the user in control.

Sarah Baghdadi


Sarah toils behind the scenes to make our website and documentation friendlier and more usable. She's a rising web designer who writes HTML and CSS. Sarah completed her BFA in photography from Indiana University in 2017.

Josh Norris


Josh is a wrongly titled digital marketing assistant who is responsible for everything from IT through to social media management. His passion for web development was sparked back in 2011 when trying to access a hidden function on a website due to it's terrible UI. Josh manages the UserFrosting Facebook presence providing updates to the community and extending the reach of UserFrosting. He is often stalking chat at 'weird' hours due to his east coast Australian timezone where he is often the first person to respond. Currently a Computer Science student at the University of Wollongong, he gets way less sleep than he should.

Srinivas Nukala


Srinivas is a web applications architect, with a passion for open source technologies. He is experienced in building SaaS (software as a service) web applications and enjoys working on open source projects and contributing to the community. He has a Masters in Computer Science from Pune University, India.

Abdullah Seba


Abdullah Seba is an electronic engineering hobbyist and noob developer who is into networking, mining and any cool tech. He also helps out with UserFrosting's testing and support in chat.

Latest Release

5.0.0-beta1
04/19/23

This is the first beta of UserFrosting 5 !

IMPORTANT: This version is meant for testing. It's should not be used in a production environnement. No documentation is provided yet, beside this page. Feel free however to test this version and report any bugs, ideas or missing features!

This version is meant as a the first test version of the big V5 released. It's meant for UserFrosting developers to get a first fully working version of UF5 and to test it.

While no major changes are planed at this stage, things could still be moving around. Any breaking changes would however be documented during the beta period. Support for UF5 can be found for this beta on the chat or GitHub Discussions.

Requirements

  • PHP 8.0, 8.1 or 8.2
  • Node.js 14 or higher
  • Database (MariaDB, MySQL, Postgres, SQLite, or SQL Server)
  • Composer 2

Installation

To install locally, you can use theses commands, as long as you met the requirements above (i.e. PHP and Node installed). When running the bake command, you can select sqlite if you don't have a database engine installed.

composer create-project userfrosting/userfrosting UserFrosting "^[email protected]"

Once the initial setup is done, the website can be locally served with the following command from the install directory and then be accessed at http://localhost:8888.

php -S localhost:8888 -t public

In the event something went wrong during initial setup, you can run it again manually with the following command from the install directory:

php bakery bake

What is UserFrosting 5 ?

UserFrosting 5 is the culmination of almost two years of work by @lcharette. It is a complete rewrite of the backend PHP code. And by complete, we really mean complete. No class was left untouched! The main updates are :

  • Slim 3 upgraded to Slim 4
  • Pimple Dependency Injection Container replaced with PHP-DI
  • Frontend assets management replaced with Webpack Encore
  • New Sprinkle system, now with extra modularity
  • Skeleton type main repo for easier initial development
  • Built-in sprinkle are now managed by Composer
  • New Event dispatcher and listener services
  • New Bakery command for easier debugging
  • (Almost) 100% test coverage and quality check through PHPStan
  • And so much more

The Slim migration itself is a big deal. While brining UF to a more modern era, it had the most impact on the core changes applied to the UserFrosting framework. Most changes were made in response to the new Slim 4 requirements and changes. It also required the use of a new Dependency Injector, which itself really brought UF5 to a whole new level. You should really check out PHP-DI, it's awesome!

Basically, UF5 uses updated dependencies, all of existing code have been updated to new standard and new test coverage should provide better long term stability.

What UserFrosting 5 isn't ?

UF5 is not a drop-in replacement for UF4. The whole backend has been rewritten, with a new container, sprinkle system, etc. which will require most sprinkle to be updated manually.

UserFrosting 5 also offers the same frontend as UserFrosting 4. But the bases have been set for the future, with Webpack Encore and the current AdminLTE theme separated in it's own Sprinkle providing the necessary tools for Vue.js or other similar frontend.

Known bugs and missing features

While most features are ready at this point, some things are not:

  • [Webpack Encore] Sprinkle entries needs to be manually copied in their parent sprinkle (Will require a custom plugin or contribution to Encore)
  • [General] Some test coverage still need to be added

What's next? When will it be stable? How can I help?

There's currently no ETA on the release date of the first stable version. For now, new beta released are planed, when necessary, until all documentation is written. Once this is done, the first release candidate version should be released, followed by the first stable release after some more testing.

At this point, the best way to help is to install this version and test it! Any bug you encounter should definitely be reported by opening a new issue. You can also contribute to the code and create pull requests.

Alternatively, you can contribute buy buying @lcharette a coffee.

Full Changelog: 5.0.0-alpha2...5.0.0-beta1