PHPackages                             friendsofcake/app-template - 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. friendsofcake/app-template

ActiveProject[Framework](/categories/framework)

friendsofcake/app-template
==========================

An empty CakePHP 2.5 application

1.7.0(10y ago)711.8k16[1 issues](https://github.com/FriendsOfCake/app-template/issues)MITPHPPHP &gt;=5.4

Since Sep 9Pushed 9y ago11 watchersCompare

[ Source](https://github.com/FriendsOfCake/app-template)[ Packagist](https://packagist.org/packages/friendsofcake/app-template)[ Docs](http://cakephp.org)[ RSS](/packages/friendsofcake-app-template/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (6)Versions (9)Used By (0)

App Template [![Build Status](https://camo.githubusercontent.com/892bd0cfedde304836c5e0d163088d82be112cc39d9f66ff8b33dc611a7ba3bf/68747470733a2f2f7472617669732d63692e6f72672f467269656e64734f6643616b652f6170702d74656d706c6174652e737667)](https://travis-ci.org/FriendsOfCake/app-template)
==============================================================================================================================================================================================================================================================================================

[](#app-template--)

An empty CakePHP project for use with composer

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

[](#requirements)

PHP 5.4 and above.

Installation
------------

[](#installation)

```
composer -sdev create-project friendsofcake/app-template ProjectName

```

This will create a new project, with dependencies, based on this repository. Be sure to point the webserver at the `webroot` folder and ensure that [URL rewriting](http://book.cakephp.org/2.0/en/installation/url-rewriting.html)is configured correctly.

Sane-default Configuration
--------------------------

[](#sane-default-configuration)

By default, the following has been enabled:

- Composer Autoloading
- Setting Timezone to UTC
- Setting database connection encoding to utf8

You may change any of these at your leisure.

### Application Configuration

[](#application-configuration)

This template is setup to configure the application via [environment variables](http://en.wikipedia.org/wiki/Environment_variable) and [data source names](http://en.wikipedia.org/wiki/Data_source_name) (DSN).

#### What is an Environment variable?

[](#what-is-an-environment-variable)

Defining configuration settings via environment variables allows clear separation between the code, and the config it is running. To remove any complexity, this repository includes [josegonzalez/php-dotenv](https://github.com/josegonzalez/php-dotenv), which automatically configures the environment if it's not already defined.

#### What is a DSN?

[](#what-is-a-dsn)

A DSN is a string which defines how to connect to a service. Since it's a string, it's portable, not language or implementation dependent and anything capable of parsing it can know how to connect to the service it points at.

#### OK but why use Env variables and DSNs?

[](#ok-but-why-use-env-variables-and-dsns)

Using environment variables makes it very easy to separate install-specific config settings from the code itself; and possible to change the application config *without* modifying the source files. There is only [one file](https://github.com/FriendsOfCake/app-template/blob/master/app/Config/.env.default) containing install-specific settings in the template and that file is only used at all [if the environment isn't already configured](https://github.com/FriendsOfCake/app-template/blob/master/app/Config/core.php#L38-L57).

The intention is that in a production system the *environment* is configured not an application - and the application just reads that information.

#### Ok I'm sold, how do I use this?

[](#ok-im-sold-how-do-i-use-this)

In a development scenario, copy the file `Config/.env.default` to `Config/.env` and edit it.

In a production scenario - configure the environment however you wish (via webserver config for example) and remove the use of `php-dotenv`.

In neither case is it necessary/desirable to modify any php files to configure the application temporarily or permanently.

#### Yeah.. that's not for me.

[](#yeah-thats-not-for-me)

If you don't want to use Env variables and DSNs - change it =).

- Use a standard `database.php` file
- Use a standard `email.php` file
- Define `debug` to an integer not an env variable
- Remove the php-dotenv loading logic
- It's also recommended to remove `database.php` (and `core.php` and `email.php`) from the repository as they need to be modified on each install

Heroku Compatibility
--------------------

[](#heroku-compatibility)

This application template is compatible with the [official Heroku PHP buildpack](https://github.com/heroku/heroku-buildpack-php). To use, simply configure your buildpack:

```
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php
heroku config:set LOG_PATH=/app/vendor/php/var/log/
heroku config:set SECURITY_SALT=SOME_ALPHANUMERIC_SALT_HERE
heroku config:set SECURITY_CIPHER_SEED=SOME_NUMERIC_SEED_HERE

```

To setup a production MySQL database setup a ClearDB MySQL add-on in Heroku.

```
heroku addons:create cleardb

```

By default its config variable will be set under the key CLEARDB\_DATABASE\_URL. For our app-template we want this configured at DATABASE\_URL.

```
old_db_url=`heroku config:get CLEARDB_DATABASE_URL`
heroku config:set DATABASE_URL="$old_db_url"
heroku config:unset CLEARDB_DATABASE_URL

```

We recommend using Redis for caching on Heroku. If doing so, remember to add the following to the `require` key in your `composer.json`:

```
"ext-redis" : "*"
```

You can use the RedisCloud add-on in Heroku for a redis datastore:

```
heroku addons:create rediscloud
```

Note about dependencies
-----------------------

[](#note-about-dependencies)

FriendsOfCake encourages the use of composer and it's best not to mix composer with git submodules for dependency management. If you need to use submodules you might notice `/vendor` and `/Plugin` folders are ignored by git. Composer creates those directories when installing vendors and plugins.

There a few ways to solve this:

- edit the `.gitignore` file
- use the `-f` param with `git add Plugin/SomePlugin -f`
- use `app/Plugin` and `app/Vendor` for your submodules.

Included packages
-----------------

[](#included-packages)

The application template comes with some dependencies already included in the composer file. These are designed to help you get up and running quickly.

- [friendsofcake/Crud](https://github.com/friendsofcake/crud)
- [josegonzalez/dotenv](https://github.com/josegonzalez/php-dotenv)
- [ad7six/dsn](https://github.com/AD7six/php-dsn)

To find out how to make the most of these packages, please read their respective readme files.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~140 days

Recently: every ~192 days

Total

7

Last Release

3835d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5203126?v=4)[Friends Of Cake](/maintainers/FriendsOfCake)[@FriendsOfCake](https://github.com/FriendsOfCake)

---

Top Contributors

[![josegonzalez](https://avatars.githubusercontent.com/u/65675?v=4)](https://github.com/josegonzalez "josegonzalez (59 commits)")[![AD7six](https://avatars.githubusercontent.com/u/33387?v=4)](https://github.com/AD7six "AD7six (48 commits)")[![ADmad](https://avatars.githubusercontent.com/u/142658?v=4)](https://github.com/ADmad "ADmad (14 commits)")[![chrisvogt](https://avatars.githubusercontent.com/u/1934719?v=4)](https://github.com/chrisvogt "chrisvogt (6 commits)")[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (4 commits)")[![jippi](https://avatars.githubusercontent.com/u/22841?v=4)](https://github.com/jippi "jippi (3 commits)")[![bcrowe](https://avatars.githubusercontent.com/u/752603?v=4)](https://github.com/bcrowe "bcrowe (3 commits)")[![HarderWork](https://avatars.githubusercontent.com/u/681599?v=4)](https://github.com/HarderWork "HarderWork (2 commits)")[![ceeram](https://avatars.githubusercontent.com/u/111448?v=4)](https://github.com/ceeram "ceeram (2 commits)")[![davidyell](https://avatars.githubusercontent.com/u/49889?v=4)](https://github.com/davidyell "davidyell (2 commits)")[![Indemnity83](https://avatars.githubusercontent.com/u/35218?v=4)](https://github.com/Indemnity83 "Indemnity83 (1 commits)")[![Maff-](https://avatars.githubusercontent.com/u/371966?v=4)](https://github.com/Maff- "Maff- (1 commits)")[![FrodeMMeling](https://avatars.githubusercontent.com/u/3490043?v=4)](https://github.com/FrodeMMeling "FrodeMMeling (1 commits)")[![thegallagher](https://avatars.githubusercontent.com/u/486626?v=4)](https://github.com/thegallagher "thegallagher (1 commits)")

### Embed Badge

![Health badge](/badges/friendsofcake-app-template/health.svg)

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

###  Alternatives

[cakephp/debug_kit

CakePHP Debug Kit

84114.4M160](/packages/cakephp-debug-kit)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k16.8k](/packages/prestashop-prestashop)[cakephp/bake

Bake plugin for CakePHP

11211.7M190](/packages/cakephp-bake)[october/rain

October Rain Library

1581.7M73](/packages/october-rain)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[drupal/recommended-project

Project template for Drupal projects with a relocated document root

1492.8M1](/packages/drupal-recommended-project)

PHPackages © 2026

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