PHPackages                             ackama/silverstripe-cwp-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. ackama/silverstripe-cwp-template

AbandonedArchivedSilverstripe-recipe[Framework](/categories/framework)

ackama/silverstripe-cwp-template
================================

Ackama Silverstripe CWP Template

0.4.0(5y ago)08[6 issues](https://github.com/ackama/silverstripe-cwp-template/issues)[3 PRs](https://github.com/ackama/silverstripe-cwp-template/pulls)BSD-3-ClauseShellPHP &gt;=7.4.0

Since Mar 4Pushed 2y ago13 watchersCompare

[ Source](https://github.com/ackama/silverstripe-cwp-template)[ Packagist](https://packagist.org/packages/ackama/silverstripe-cwp-template)[ Docs](https://ackama.com)[ RSS](/packages/ackama-silverstripe-cwp-template/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (13)Versions (8)Used By (0)

Silverstripe CWP Template Project
=================================

[](#silverstripe-cwp-template-project)

Meta README
-----------

[](#meta-readme)

*You can erase this section after completing it*

### Pre-project

[](#pre-project)

CWP accounts/environments take up a long time to get setup. Make sure this has been requested before removing comment.

CWP will need a personal account for each of your developers. It will also require a Release Manager role. Make a list of people with e-mail, name and role. Attach the list with your request to your client. With this information they will be able to create the request and immediately provide Ackama with the required permission to start using the account

Please read our [SilverStripe CWP Project Management](https://github.com/ackama/wiki/wiki/SilverStripe-CWP-Project-Management)wiki page for more thorough information regarding managing a CWP project.

Also refer to our [Ackama README Template](https://github.com/ackama/wiki/wiki/Ackama-README-Template)wiki page to better customise this README

Purpose
-------

[](#purpose)

*Fill in purpose of this project*

### Project Setup

[](#project-setup)

#### Create your project from this repository

[](#create-your-project-from-this-repository)

- Remove this title after setting up the project, to avoid confusion \*

Execute the following to create a new project based of this repository, updated to the latest version of the SilverStripe stack

```
$ composer create-project --no-install ackama/silverstripe-cwp-template your-cwp-project
$ cd your-cwp-project
```

Cloning this repository and working from there will not work as expected.

#### Platform Requirements

[](#platform-requirements)

The docker environment that is provided will be running these versions and you can use those utilities within the containers directly through scripts available in `./bin/` to work. They are documented here and as dotfiles in the repository if you want or need to match your host environment's versions

- PHP: 7.4
- COMPOSER: 1
- NODE: 14
- NPM: 6

#### Rename Resources

[](#rename-resources)

- Remove this title after setting up the project, to avoid confusion \*

Defaults for namespaces and prefixes have been set so they are easily replaceable after initialising the project. Please do the following replacements:

- Replace `silverstripe-template-project` in all files with the name of your project.
- Replace `SilverstripeTemplateProject` in all files with the namespace of your project.

#### Repository Setup

[](#repository-setup)

- Remove this title after setting up the project, to avoid confusion \*

After cloning the project, you will have to commit this into a repository. You can safely commit all created files. The available pipeline uses `main` as the development branch and `deployment` as production. `deployment` is completely managed by the pipeline after the initial setup.

*Don't forget to give appropriate access to your team!*

```
git init .
git add .
git remote add origin git@github.com:ackama/your-cwp-project.git
git commit -m "Project Initialisation"
git branch -M main
git push origin main
git branch -C deployment
git push origin deployment
git branch -D deployment
```

#### Pipeline Setup

[](#pipeline-setup)

The project already contains CI/CD scripts and definitions for Github Actions, for running automated tests and automated deployment. You will need to setup the following pipeline variables:

```
# Private Key to be used to push and interact with your repository.
# Must have write permissions
SSH_PRIVATE_KEY

# CWP setup
CWP_DASH_USER
CWP_STACK_ID
CWP_DASH_TOKEN
```

##### Heroku Setup

[](#heroku-setup)

If you are planning to enable a Staging environment in Heroku, you will also need to set some values in your Pipeline and Heroku environments:

Pipeline

```
HEROKU_APP_ID
HEROKU_API_KEY
```

Heroku

```
# Use dev or uat for SS_ENVIRONMENT_TYPE
# Setting this to prod will cause a DNS error
SS_ENVIRONMENT_TYPE

# Because heroku workers run behind proxies, SilverStripe needs to be aware of
# their IPs, otherwise requests will error. You can use * as the value if you
# are not worried security at initial stage
SS_TRUSTED_PROXY_IPS

# Use your heroku URL
SS_BASE_URL

# Standard Database configuration
SS_DATABASE_SERVER
SS_DATABASE_USERNAME
SS_DATABASE_PASSWORD
SS_DATABASE_NAME
```

It is also possible to execute CI locally. Refer to [Running tests](#running-tests)

#### Other Configuration

[](#other-configuration)

- Replace your Sentry DSN, or remove file otherwise: `./app/_config/sentry.yml`
- Configure `app/_config/email.yml` according to your project.

Operations
----------

[](#operations)

*Edit as necessary*

CI pipelines need to be active and configured

This project follows the following branch convention: **main** Main development branch **deployment** Deployment branch that gets tagged and tagged releases are deployed

**Environment****URL****Hosting Platform****Git Branch**Staging*TODO*Herokudeployment (tagged)UAT*TODO*CWPdeployment (tagged)Production*TODO*CWPdeployment (tagged)### SSH access

[](#ssh-access)

CWP does not provide SSH access. There will be no SSH access to the servers.

### Secrets

[](#secrets)

Secrets are stored encrypted in the CI's config

Project Resources:
------------------

[](#project-resources)

**Resource****URL**RepositoryBacklog URL\[ Placeholder \]Invision\[ Placeholder \]People Involved
---------------

[](#people-involved)

**Role(s)****Name(s)**Developers-Designer-Project Manager-Product Owner-### Dependencies

[](#dependencies)

- docker
- docker-compose

### Running this app

[](#running-this-app)

Clone the project: `git clone git@github.com:ackama/your-cwp-project.git`

Once the project is cloned, execute this command:

- `docker-compose up` will setup your runtime environment.

### Using your development environment

[](#using-your-development-environment)

- The website will be available at `https://localhost`. You might need to override how your browser treats *localhost* Insecure Certificates, as the docker machine uses a self-signed certificate:
    - Chrome &amp; Opera: Browse to chrome://flags/#allow-insecure-localhost and Enable the highlighted option.
    - Firefox: you will be given the option to accept the risk of opening your localhost URL
- Use `bin/console` to log in into your local dev environment
- If you want to have access to your dependencies in the host, run `composer install --no-scripts`, `npm ci` and `composer vendor-expose`. These directories are not shared into your containers to avoid lowering performance.
- Run `npm run watch` in a separate view to build your assets in realtime.
- Whenever you make changes in your silverstripe app or theme, run `sake dev/build flush=1`
- MailDev is available at

#### Runtime in your environment

[](#runtime-in-your-environment)

To kickstart your development, dependencies and building processes need to be run, ideally from inside your docker machine (`bin/console`). Running these commands will be ready to build:

```
composer install --no-scripts
composer vendor-expose
npm ci
sake dev/build flush=1
npm run watch

```

#### Build your project

[](#build-your-project)

Your project's build process is configured to run automatically in a two-step process.

- First the project gets tested and its assets get built and bundled in a CI pipeline.
- Secondly, CWP deploys the silverstripe project.

Although the realtime packager or the bundler should render the same results, if you find yourself needing to build your project as it would be built by CI/CD for debugging purposes, run these:

```
composer install --no-scripts
npm ci
npm run package

```

#### Testing in your environment

[](#testing-in-your-environment)

Because of the nature of CWP, local usage of composer should be done in a slightly different way. Ideally you would use composer this way in order to get a working copy of your project as this is the way CWP deploys, potentially skipping steps in your project or dependencies.

- `composer install --no-scripts`
- `composer vendor-expose`
- `sake dev/build`

Using `composer install` *might* lead to differences when testing. Your builds, however, will get tested and build in the CI pipeline using the method described above, both before merging and after.

#### Solr Search

[](#solr-search)

Solr Search capabilities are available for your local environment. You can access the Solr console on

Your development environment enabled Solr Search **only when in `dev` mode and the environment value `SS_SOLR_ENABLED` has been set**, otherwise it assumes no configurations. Your docker-compose file already contains this deafult configurations. If you wish to configure Solr check the [required ENV values](https://docs.silverstripe.org/en/4/getting_started/environment_management/)and the `app/_config.php` file.

By default the engine is activated and running. You will need to manually execute the Configuration task and the Indexing tasks when you want. Otherwise the usage of Solr will fail. You do this by accessing your console and executing:

```
sake dev/tasks/Solr_Configure flush=1
sake dev/tasks/Solr_Reindex flush=1

```

### Load a working copy from other environments

[](#load-a-working-copy-from-other-environments)

- Obtain a silverstripe packed version of the site. you can do so by downloading a snapshot from CWP's dashboard. Navigate into `Project > Snapshot > Create Snapshot`, create a snapshot or choose one that's available and download it into the root of your project
- Run `sspak load [snapshot-filename]` will load the database and uploaded assets into your install
- Subsequently run `sake dev/build "flush=1"`

### Running tests

[](#running-tests)

Use the following to run your tests locally

```
docker-compose exec app -T ci/run-tests
```

### Deploying outside of CWP

[](#deploying-outside-of-cwp)

If you are deploying to environments other than CWP (like Heroku), configure your environment accordingly:

- If your application workers are behind a proxy in `test` mode, you need to make SilverStripe aware of the proxy's IP. in order for it to behave as expected. In your environment, set teh `SS_TRUSTED_PROXY_IPS` value to either `*` or a comma-separated list of known IPs.
- Remember that `dev` mode will by default not enforce SSL protection.

Find more information about environment management at:

- [CWP environment variables](https://www.cwp.govt.nz/developer-docs/en/2/working_with_projects/cwp_environment_variables)
- [Silverstripe Environment Management](https://docs.silverstripe.org/en/4/getting_started/environment_management/)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.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

4

Last Release

1853d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/08f6c2f0a3566586d0db267f7f5570a68a179b151955eba5e337ea2373aa92c5?d=identicon)[halles](/maintainers/halles)

---

Top Contributors

[![halles](https://avatars.githubusercontent.com/u/193157?v=4)](https://github.com/halles "halles (142 commits)")[![G-Rath](https://avatars.githubusercontent.com/u/3151613?v=4)](https://github.com/G-Rath "G-Rath (2 commits)")

---

Tags

ackamacwpphpsilverstripe-cwptemplate

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ackama-silverstripe-cwp-template/health.svg)

```
[![Health](https://phpackages.com/badges/ackama-silverstripe-cwp-template/health.svg)](https://phpackages.com/packages/ackama-silverstripe-cwp-template)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M190](/packages/laravel-telescope)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

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

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

708181.8M591](/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.

91245.3M585](/packages/laravel-pail)[nette/bootstrap

🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.

68435.8M590](/packages/nette-bootstrap)

PHPackages © 2026

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