PHPackages                             antimonial/antimonial - 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. antimonial/antimonial

ActiveProject[Framework](/categories/framework)

antimonial/antimonial
=====================

A PHP MVC framework where what you read is what runs.

v0.19.0(1mo ago)03MITPHPPHP ^8.1CI passing

Since Jul 14Pushed 1mo agoCompare

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

READMEChangelog (10)Dependencies (3)Versions (15)Used By (0)

Antimonial application skeleton
===============================

[](#antimonial-application-skeleton)

This is the starter application for the [Antimonial](https://github.com/antimonial/framework)framework. It is a **minimal starting point** — a single welcome route and a `users` table — with no bundled demo feature. Run `composer create-project`, get it running, and build your own application on top of it.

The framework itself provides routing, a template engine, a query builder, migrations, sessions, CSRF protection, authentication helpers, file uploads, and logging. Those are *capabilities you can use*; see the framework's own docs and wiki for how.

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- Composer
- A database — MySQL or SQLite (SQLite works out of the box for local dev; see `app/Config/database.php` to switch to MySQL)

Install
-------

[](#install)

```
composer create-project antimonial/antimonial my-app
cd my-app
```

The `post-create-project-cmd` script copies `.env.example` to `.env` for you.

Configure
---------

[](#configure)

Edit `.env`:

```
APP_DEBUG=false
DB_CONNECTION=sqlite
DB_NAME=database.sqlite
```

For MySQL instead:

```
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_NAME=myapp
DB_USER=root
DB_PASS=
```

The front controller auto-loads `.env` via `Antimonial\Core\DotEnv`, so the values are available to `env()` and `Config::load` without any extra step.

Install the database
--------------------

[](#install-the-database)

The skeleton ships a `users` migration (baseline infrastructure most apps need). Create the tables with the bundled CLI (named `petri`):

```
./petri migrate
```

This runs the migrations in `database/migrations/` against the database configured in `.env`. To roll back: `./petri migrate:rollback`. To clear compiled views: `./petri view:clear`.

Run
---

[](#run)

```
php -S localhost:8000 -t public public/index.php
```

Then open . The front controller (`public/index.php`) ships with the skeleton, so you do **not** need to create it.

Where to start building
-----------------------

[](#where-to-start-building)

You want to…EditAdd a page`app/Routes/web.php` (register a route)Handle a request`app/Controllers/` (add a controller)Read/write data`app/Models/` (add a model) + `database/migrations/`Render HTML`app/Views/` (views use the built-in template engine)Change framework config`app/Config/`Routes can be named for reverse URL generation — see the [framework README](https://github.com/antimonial/framework)for named routes and the `route()` helper.

Tests
-----

[](#tests)

The suite is a smoke test that boots the app and asserts `GET /` returns 200. It uses an isolated SQLite database (created per run in `tests/bootstrap.php`) so it never touches your real database.

```
composer install
./vendor/bin/phpunit
```

Views &amp; Template Engine
---------------------------

[](#views--template-engine)

The skeleton ships on top of the framework's built-in template engine (see the [framework README](https://github.com/antimonial/framework) for the full syntax). Views are plain PHP files in `app/Views/` that compile to cached PHP on first render — no setup required.

Key points:

- **Auto-escaping by default.** `{{ $name }}` is XSS-safe; `{{{ $content }}}`emits raw, trusted HTML (used here for the layout's `$content` slot).
- **Loops &amp; conditionals:** `@foreach($items as $item) … @endforeach`, `@if` / `@else` / `@endif`, `@unless`, `@for`, `@while`.
- **Layouts:** a view uses `@extends('layouts/main')` and fills slots with `@section('title') … @endsection`; the parent exposes them with `@yield('title', 'Default')` and receives the view body as `{{{ $content }}}`.
- **Includes:** `@include('partial', ['foo' => 'bar'])`.
- **Filters:** `{{ $name|upper }}` (extensible via `Antimonial\View\Filters::add()`).

The view path is initialized in `public/index.php` via `View::setViewPath(ROOT_PATH . '/app/Views')`. Compiled templates are written to `app/storage/views/` (ignored by git).

Structure
---------

[](#structure)

```
antimonial/
├── petri              # CLI: migrate, migrate:rollback, view:clear
├── public/            # Web root: index.php (front controller) + assets/
├── bootstrap/        # app.php builds the Antimonial\Core\App instance
├── database/
│   └── migrations/    # create_users_table
├── app/
│   ├── Config/       # app.php, database.php (loaded by Config::load)
│   ├── Routes/       # web.php (route definitions)
│   ├── Controllers/  # HomeController
│   ├── Models/       # User
│   └── Views/        # home.php + layouts/ (built-in template engine)
└── composer.json

```

Documentation
-------------

[](#documentation)

- [Framework Wiki](https://github.com/antimonial/framework/wiki) — routing, the template engine, the query builder, sessions, CSRF, and the full API reference.
- [Framework README](https://github.com/antimonial/framework) — quick start, what's included, and security notes.

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance91

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.6% 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

Every ~0 days

Total

14

Last Release

43d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/107444803?v=4)[laureano](/maintainers/lamonega)[@lamonega](https://github.com/lamonega)

---

Top Contributors

[![lamonega](https://avatars.githubusercontent.com/u/107444803?v=4)](https://github.com/lamonega "lamonega (40 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

phpframeworkantimonial

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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