PHPackages                             swiftly/framework - 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. swiftly/framework

ActiveProject[Framework](/categories/framework)

swiftly/framework
=================

A simple PHP framework.

v1.0-beta(4y ago)18MITPHPCI failing

Since Jul 3Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/SwiftlyPHP/framework)[ Packagist](https://packagist.org/packages/swiftly/framework)[ Docs](https://github.com/SwiftlyPHP/framework)[ RSS](/packages/swiftly-framework/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (6)Versions (4)Used By (0)

Swiftly
=======

[](#swiftly)

About
-----

[](#about)

Swiftly is a simple, small footprint, MVC-esque framework designed for quickly prototyping small sites or systems. By no means is it a fully featured framework, and anyone looking to build anything of any serious complexity or scope should probably stop reading here and find a more appropriate tool.

Swiftly originally started life as a learning project in the summer of 2019, but has since quickly grown into the mini framework that exists today. Swiftly is not suitable for production environments. It lacks any real security or advanced features and isn't even guaranteed to work in most cases. However, if you just need a scaffold against which to quickly throw together a prototype, Swiftly might just be the no-nonsense framework you're after!

Structure
---------

[](#structure)

The structure of code in Swiftly is very similar to most of the MVC frameworks currently available. Your code will mostly be separated out into controllers, models and views.

### Controllers

[](#controllers)

Controllers are the main drivers of the framework. Here, the incoming request is processed, business logic performed and user input handled. For typical web applications, the job of almost every controller will be to organise communication with the database through Models and to return a rendered View file.

All Controllers live in the *App/Controller* directory.

### Models

[](#models)

Models, as in most frameworks, handle communicating with the database and making sure the responses are represented in useful formats.

TODO:

All Models live in the *App/Model* directory.

### Views

[](#views)

TODO:

All Views live in the *App/View* directory.

Routing
-------

[](#routing)

Lets say I want to define a `/hello` route. The first thing I need to do is edit the `routes.json` file. This file can be found in the `config/` directory and contains a list containing all the possible routes in your application, along with the controllers they map to and the HTTP methods they support.

If you open the example `config/routes.json` file, you should see something similar to the following:

```
{
    "home": {
        "path":     "/",
        "methods":  ["GET"],
        "handler":  "Home::index"
    }
}
```

This block defines a route called "home", that will match on GET requests to the root `/` URL and is handled by the `index` method of the `Home` controller. Each route definition can have the following values:

### Path

[](#path)

**Required**

The URL path to match against.

```
"path": "/hello/world"
```

Takes a valid string.

**Note:**For the time being, all URLS must start with a forward slash `/`.

### Handler

[](#handler)

**Required**

The controller used to handle this route.

```
"handler": "Controller::method"
```

Accepts either a string in the format `"Controller::method"` or a 2 element array in the format `[ "Controller", "method"]`.

### Methods

[](#methods)

*\*Optional\**

The HTTP method allowed by this route.

```
"methods": ["GET", "POST"]
```

An array of HTTP verbs.

At the moment, Swiftly only supports the following methods:

- GET
- POST
- PUT
- DELETE
- UPDATE

### Tags

[](#tags)

*\*Optional\**

Reference
---------

[](#reference)

// TODO: Document important functions

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance59

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1780d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bfbe8dbad82e6f518d414cade4b583de94f943a94a0a576cca4d416c7b24e059?d=identicon)[clvarley](/maintainers/clvarley)

---

Top Contributors

[![clvarley](https://avatars.githubusercontent.com/u/46519531?v=4)](https://github.com/clvarley "clvarley (366 commits)")

###  Code Quality

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/swiftly-framework/health.svg)

```
[![Health](https://phpackages.com/badges/swiftly-framework/health.svg)](https://phpackages.com/packages/swiftly-framework)
```

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
