PHPackages                             8grams/homie - 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. 8grams/homie

ActiveProject[Framework](/categories/framework)

8grams/homie
============

Dead simple Symfony-based framework for creating homepage

v1.0.6(1y ago)0332[1 PRs](https://github.com/8grams/homie/pulls)MITPHPCI passing

Since Mar 20Pushed 1y agoCompare

[ Source](https://github.com/8grams/homie)[ Packagist](https://packagist.org/packages/8grams/homie)[ RSS](/packages/8grams-homie/feed)WikiDiscussions develop Synced today

READMEChangelogDependencies (17)Versions (10)Used By (0)

 [![Homie](https://raw.githubusercontent.com/8grams/homie/refs/heads/develop/assets/logo.png)](https://raw.githubusercontent.com/8grams/homie/refs/heads/develop/assets/logo.png)

Homie
=====

[](#homie)

Homie is a simple Symfony-based PHP framework designed specifically for creating homepages.

Normally, a homepage should have minimal features, but common PHP frameworks are quite complex because they are designed to tackle complex problems when creating web applications. Homie is different—it doesn’t aim to be a complete framework for web applications. Instead, it is designed for building simple homepages that can be installed anywhere, even on a cheap shared hosting provider.

### SQLite Based

[](#sqlite-based)

Homie relies on SQLite as the backbone of its data management, using it as a persistent database, cache, queue, and more. SQLite is an excellent RDBMS—it is fast, mature, and production-ready. Moreover, it can be installed almost anywhere, from embedded devices to large server fleets.

### Dependencies

[](#dependencies)

Homie is built on top of prominent open-source software to function effectively:

1. [SQLite](https://www.sqlite.org/) as the database
2. [Symfony Components](https://symfony.com/). Homie utilizes various Symfony Components such as http-foundation, routing, http-kernel, and more
3. [Redbean](https://redbeanphp.com/) for database connection and ORM
4. [Plates](https://platesphp.com/) as template engine
5. [Adminer](https://adminer.org/) as Database Browser
6. [Bedrock](https://roots.io/bedrock/) as Wordpress boilerplate
7. [Laravel Sitemap](https://github.com/spatie/laravel-sitemap) as Sitemap Generator

Usage
-----

[](#usage)

### Prerequisites

[](#prerequisites)

- PHP &gt;= 8
- Modules: php-mbstring, php-xml, php-sqlite, php-curl

### Install

[](#install)

```
composer create-project 8grams/homie

```

### Working with pages

[](#working-with-pages)

`pages` directory is where we, as homepage web developers, works most of time. Homie directly maps basic URLs to the `pages` directory. For example, if you want to have URL like this

```
https://example.com/home

```

then, you should create a PHP file named `home.php` inside `pages` directory.

You can start coding using OG native PHP where you can mix PHP code with HTML. But for better maintainability, we recommend writing PHP code first before any HTML code.

It also handles localization quite well. All of these URLs map to `home.php`.

```
https://example.com/id/home
https://example.com/en/home

```

```

Hello, my name is

```

Any file you create in the `pages` directory has direct access to utilities such as database, cache, or http client.

```

Book created with ID

```

### Initiate

[](#initiate)

Make PHP Module for SQLite3 is already installed. For example, in Debian you install it with

```
sudo apt install php8.3-sqlite3 php8.3-curl php8.3-mbstring php8.3-xml

```

To initiate Homie, execute `/admin/init` path once. This path will initialize database and configure some settings

```
curl -v https://example.com/admin/init

```

### Local Development

[](#local-development)

Install composer

Ref:

Run composer

```
composer install -vvv

```

Install Symfony cli

```
curl -sS https://get.symfony.com/cli/installer | bash

```

Start Symfony Dev Server

```
symfony server:start

```

Run init, by accessing `init` URL from browser

```
https://example.com/admin/init

```

Start coding, for getting started you can access `/home`

```
https://example.com/home

```

Basic Layout
------------

[](#basic-layout)

By default, Homie provides 3 basic layouts, all located in the `pages/layouts` directory: `main`, `navbar`, and `footer`. `main`, As the name suggests, this is the main layout where all pages are attached. It is also where you can define global JavaScript and CSS scripts.

You can override `navbar` or `footer` using functions from Plates, for example

```

    Override Navbar
    New Navbar

```

Like regular `pages` files, `navbar` and `footer` also have direct access to Homie's utilites like database or cache.

### Components

[](#components)

Homie is designed with a component-based approach in mind. We chose Plates for its flexibility and extensibility, allowing us to create component-based layouts.

To create a component, add a file inside `pages/components` directory. You can then use it in any page file, even in the navbar or footer. For example, we create `drawer.php` file:

```

```

Again, like other regular page files, this component also has direct access to Homie’s utilities, such as the database, cache, and HTTP client.

Handle Request
--------------

[](#handle-request)

### Query parameters

[](#query-parameters)

```
https://example.com/home?name=glend&city=Surabaya

```

```

```

### Form Data

[](#form-data)

```
curl -X POST https://example.com/home \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "name=glend&city=Surabaya"

```

```

```

### JSON Payload

[](#json-payload)

```
curl -X POST https://example.com/home \
-H "Content-Type: application/json" \
-d '{"name": "glend", "city": "Surabaya"}'

```

```

```

Migration
---------

[](#migration)

All migrations are located on `migrations` directory. To create new migration, add a file with format `[order number]_[migration name].sql`

```
touch migrations/004_create_user_table.sql

```

And execute `/admin/migrate` path

```
curl -v https://example.com/admin/migrate

```

Environment Variables
---------------------

[](#environment-variables)

Define environment variables whether through `.env` file located in the root project folder, or direct inject using `EXPORT` command.

Localization
------------

[](#localization)

Homie supports localization out of the box by providing the trans function, which we can access from the pages with `en` as default language. For example:

```

```

The later arguments is optional and return empty string if Homie cannot handle it. To set default language, use `DEFAULT_LANG` values from `.env`.

There are two ways to work with translations. The first is using lang JSON files which is located on `src/lang`. The second is, insert data into the translations table with the schema name, locale, and value. For example, the SQL should be:

```
INSERT INTO translations (label, value, locale) VALUES ("home", "Home", "en")

```

### Accessing pages with localization

[](#accessing-pages-with-localization)

Attach the language you want to use in the URL as the first path segment. For example:

```
https://example.com/id/home
https://example.com/en/home

```

Dynamic Pages
-------------

[](#dynamic-pages)

Sometimes, we need a way to handle dynamic URLs or slugs. The best example of this is a blog. Let's say you have a blog, and to access a blog post, you want a URL like `https://example.com/blog/blog-title`, where `blog-title` is often a slug version of the blog's title.

To handle this, Homie uses a special file named `slug.php`. Homie checks the URL, and if the path cannot be mapped to a file in a folder, it will check whether `slug.php` exists. If `slug.php` is present, Homie will use that file to handle the request.

In `slug.php`, you can access the slug using `$this->slug`.

Wordpress Integration
---------------------

[](#wordpress-integration)

WordPress is incorporated into Homie out of the box and will be installed in the `/wp` folder. The installed WordPress already uses SQLite as its default database for persistence, and alos caching and multi languages plugins.

The WordPress that will be installed comes from [8grams's Bedrock](https://github.com/8grams/bedrock), a custom Bedrock WordPress forked from `roots/bedrock`. It enables Homie to install WordPress along with its plugins through Composer.

To enable WordPress in Homie, simply set `BLOG_ENGINE=wordpress` in the `.env` file, and run

```
composer install

```

Content Customization
---------------------

[](#content-customization)

Copywriting and images can be customized using the special functions `$this->trans` and `$this->asset`. Take a look at `pages/index.php` for a glimpse of this feature.

```

         height="150">

```

To customize the content, open the Admin Dashboard. You'll notice that all content wrapped with the `data-trans` and `data-asset` attributes can be easily customized.

Sitemap
-------

[](#sitemap)

A sitemap can be generated using the following command:

```
composer run generate-sitemap

```

This will automatically generate a sitemap by crawling your website. To enable this feature, ensure that the correct value is set in the .env file:

```
APP_URL=https://example.com

```

`sitemap.xml` will be generated in the `public/sitemap.xml` and can be accessed on `https://example.com/sitemap.xml`

Note: This sitemap feature in the framework is made possible by modifying Spatie's Laravel Sitemap library. Check on

Admin Dashboard
---------------

[](#admin-dashboard)

The admin panel can be accessed through `/admin`. The login username and password are defined in the `.env` file by setting the `ADMIN_USERNAME` and `ADMIN_PASSWORD` values.

### Demo

[](#demo)

Link: Username: admin Password: admin

### Adminer

[](#adminer)

Adminer is already integrated into Homie Admin and can be accessed at `/_admin/adminer`.

Send Email
----------

[](#send-email)

Email templates should be placed in the `pages/emails` directory. Homie provides three basic email layouts—`main`, `header`, and `footer`—all located in `pages/emails/layouts`.

To send an email, you can call `$this->mailer->send($options, $data, $template)` from any page file, as shown below:

```

```

Make sure to correctly set `MAILER_DSN` in the `.env` file and have an email template ready. In this example, the template `welcome.php` should be placed in `pages/emails`.

Homie supports both an HTML version (`welcome.php`) and a plain text version (`welcome.plain.php`) for the email body.

Upgrading
---------

[](#upgrading)

Upgrading is easy. Run:

```
composer run upgrade

```

Then, check the final result to ensure that no unwanted files have been modified or added.

License
-------

[](#license)

MIT

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance47

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.8% 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 ~9 days

Total

8

Last Release

401d ago

Major Versions

v0.1.0 → v1.0.02025-03-25

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/966956?v=4)[Glend Maatita](/maintainers/glendmaatita)[@glendmaatita](https://github.com/glendmaatita)

---

Top Contributors

[![glendmaatita](https://avatars.githubusercontent.com/u/966956?v=4)](https://github.com/glendmaatita "glendmaatita (130 commits)")[![audinue](https://avatars.githubusercontent.com/u/1407800?v=4)](https://github.com/audinue "audinue (23 commits)")[![mzulfanw](https://avatars.githubusercontent.com/u/60052964?v=4)](https://github.com/mzulfanw "mzulfanw (4 commits)")

---

Tags

homepagehomie

### Embed Badge

![Health badge](/badges/8grams-homie/health.svg)

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

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)

PHPackages © 2026

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