PHPackages                             rodrigocborges/facilphp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. rodrigocborges/facilphp

ActiveProject[Framework](/categories/framework)

rodrigocborges/facilphp
=======================

A dev-friendly, file-based routing PHP framework.

00PHPCI passing

Since Mar 24Pushed 3mo agoCompare

[ Source](https://github.com/rodrigocborges/facilphp)[ Packagist](https://packagist.org/packages/rodrigocborges/facilphp)[ RSS](/packages/rodrigocborges-facilphp/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

🚀 Facil Framework
=================

[](#-facil-framework)

[![PHP Version](https://camo.githubusercontent.com/4542719a7edd03b96231e4bbf6056af424372447b9e65f30b46e636c7ae14e43/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344253230382e312d3737374242343f6c6f676f3d706870)](https://camo.githubusercontent.com/4542719a7edd03b96231e4bbf6056af424372447b9e65f30b46e636c7ae14e43/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344253230382e312d3737374242343f6c6f676f3d706870)[![License](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)

**Facil** is a dev-friendly, insanely fast **file-based routing** PHP framework designed for rapid API and Fullstack development.

Forget heavy boilerplates and complex configurations. Drop a file in the `routes/` folder, and your endpoint is ready. Built for developers and indie hackers who want to ship micro-SaaS projects fast without sacrificing a solid architecture.

✨ Features
----------

[](#-features)

- 📁 **File-Based Routing:** Next.js inspired routing. Your file structure dictates your API endpoints.
- 🗄️ **MicroORM &amp; Database:** Elegant Query Builder and raw PDO wrapper (inspired by `better-sqlite3`).
- 🛠️ **Schema Builder:** Programmatic migrations out-of-the-box.
- 🛡️ **Built-in Security:** Automatic CSRF protection, CORS handling, and strict security headers.
- 🔐 **Authentication:** Simple, session-based Auth manager ready to go.
- ✅ **Validation:** Powerful payload validation including native support for Brazilian CPF/CNPJ.
- 🌍 **Environment Management:** Native `.env` loader.
- 🎨 **Views:** Easy HTML rendering with variable extraction.

📦 Installation
--------------

[](#-installation)

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

```
composer create-project rodrigocborges/facilphp my-app
cd my-app
```

🚀 Quick Start
-------------

[](#-quick-start)

Start the built-in development server:

```
composer run start-dev
```

*(For production or network testing, use `composer run start-prod`)*

### Creating your first Route

[](#creating-your-first-route)

Create a file at `routes/api/users.php`. It automatically maps to `http://localhost:8000/api/users`.

```
