# Introduction New

Modules are a new feature added in Leaf 3 which basically takes parts of Leaf and separates them into installable chunks which can be used both inside and outside of Leaf.

Modules are framework/library agnostic, which means that they'll work just about everywhere with zero config just as with Leaf itself.

Modules can be quickly installed through composer or the leaf CLI with a single command.

# Why modules?

The biggest question people ask with Leaf 3 is why we decided to switch to modules, stripping leaf of almost all it's code.

@mychidarko (opens new window) put an article together on why we decided to switch to modules instead of maintaining the whole code together. We also have a GitHub discussion (opens new window) introducing leaf 3 and everything you need to know about it, we explain modules further here.

# Installing modules

Video Docs

You can take a look at our leaf cli video on youtube.

Working with modules and the leaf cli

Modules are always published on composer and can be installed through composer CLI or the leaf CLI.

Composer:

composer require leafs/<module-name>

Leaf CLI:

leaf install <module-name>

# List of available modules

This list is still being updated, you can keep checking for updates.

Project Status Description
router Latest Stable Version (opens new window) Total Downloads (opens new window) Router module for leaf PHP
anchor Latest Stable Version (opens new window) Total Downloads (opens new window) Basic security tools
csrf Latest Stable Version (opens new window) Total Downloads (opens new window) CSRF plugin for leaf anchor
experiments Latest Stable Version (opens new window) Total Downloads (opens new window) collection of experimental modules
mail Latest Stable Version (opens new window) Total Downloads (opens new window) Mailing made easy with leaf
auth Latest Stable Version (opens new window) Total Downloads (opens new window) Simple but powerful authentication system for your apps
form Latest Stable Version (opens new window) Total Downloads (opens new window) Form processes and validation
password Latest Stable Version (opens new window) Total Downloads (opens new window) Password encryption/validation/hashing in one box
db-old Latest Stable Version (opens new window) Total Downloads (opens new window) Leaf Db from v1 (still maintained)
db Latest Stable Version (opens new window) Total Downloads (opens new window) Leaf Db from v2 (actively maintained)
session Latest Stable Version (opens new window) Total Downloads (opens new window) PHP sessions made simple
cookie Latest Stable Version (opens new window) Total Downloads (opens new window) Cookie management without the tears
fs Latest Stable Version (opens new window) Total Downloads (opens new window) Awesome filesystem operations + file uploads
date Latest Stable Version (opens new window) Total Downloads (opens new window) PHP dates for humans
bareui Latest Stable Version (opens new window) Total Downloads (opens new window) Dead simple templating engine with no compilation (blazing speed)
blade Latest Stable Version (opens new window) Total Downloads (opens new window) Laravel blade templating port for leaf
veins Latest Stable Version (opens new window) Total Downloads (opens new window) Leaf veins templating engine
http Latest Stable Version (opens new window) Total Downloads (opens new window) Http operations made simple (request, response, ...)
mvc-core Latest Stable Version (opens new window) Total Downloads (opens new window) Core MVC tools powering our MVC wrappers
aloe Latest Stable Version (opens new window) Total Downloads (opens new window) Overpowered cli for our MVC wrappers
fetch Latest Stable Version (opens new window) Total Downloads (opens new window) HTTP requests made simple
logger Latest Stable Version (opens new window) Total Downloads (opens new window) HTTP requests made simple
redis Latest Stable Version (opens new window) Total Downloads (opens new window) Redis module