lobo-studio / tamarin-php

0 stars 0 forks source link

Tamarin


Installation

  1. Download Composer or update composer self-update.
  2. Run composer update.

CakePHP

Configuration

The framework source code can be found here: cakephp/cakephp.

Read and edit config/app.php and setup the 'Datasources' and any other configuration relevant for your application, if needed.

If you're going to use Heroku and follow the steps below, you probably don't need to change anything in this file, only in file .env.

Running

bin/cake server -H 192.168.13.37 -p 5673

Create local database

Create a database to use in your local environment.

For the structure and data, you can either:

Change environment variables

Check CakePHP's section on env variables: http://book.cakephp.org/3.0/en/development/configuration.html#environment-variables

If you don't have an .env file in the project's root folder, create it.

Add the following line with your local database info, for example:

DEBUG=1
APP_ENCODING='UTF-8'
APP_DEFAULT_LOCALE='fr_FR'
DATABASE_URL='mysql://root:password@localhost/local_tamarin'
DATABASE_TEST_URL='mysql://root:password@localhost/test_tamarin'

Heroku

Setup

After receiving Heroku's invitation to join the project, run:

heroku git:clone -a tamarin

Create a procfile

If you don't have a file named Procfile (no extensions), create it with the following content:

web: bin/cake server -p $PORT

Modify it to run as you would run CakePHP. For example, if you use a host different than localhost:

web: bin/cake server -H XXX.XXX.X.X -p $PORT

For more information: https://devcenter.heroku.com/articles/procfile


Run locally

heroku local web -p 5673

Go to your browser and access the URL returned (e.g. http://localhost:5673).

Analyze code using PHP_CodeSniffer

Before each pull request, analyze your code against CakePHP's standards:

Let code sniffer know where to find your sniffs

./vendor/bin/phpcs --config-set \
installed_paths ../../cakephp/cakephp-codesniffer

Analyze the code

To analyze the code:

./vendor/bin/phpcs --standard=CakePHP src

To automatically correct coding standard violations:

./vendor/bin/phpcbf --standard=CakePHP src

Resources

PHP CodeSniffer Documentation: https://github.com/squizlabs/PHP_CodeSniffer/wiki

CakePHP CodeSniffer: https://github.com/cakephp/cakephp-codesniffer

A good tutorial: http://andy-carter.com/blog/setting-up-php-codesniffer-in-sublime-text-3-for-cakephp-and-other-standards

Emails

Accounts

Admin email

lobobot+tamarinAdmin@lordalexworks.com lordalexworks

Mailchimp account

Username: tamarinadmin Password: @Lordalexworks0406 Email: lobobot+tamarinAdmin@lordalexworks.com

Security questions:

Name of your first employer?

LoBo

What kind of coffee do we serve in the office?

None

What brand of coffee maker do you use in the office?

None

Email address of imported members

Whenever importing a CSV file with debug mode active (for local and staging environments), all the member emails are switched to lobobot+tamarin{id}@lordalexworks.com, according to the member's ID. This is a precaution measure so we can test real CSV data without worrying that we'll email real members.

This does not happen for manually added members, even in debug mode. It also does not apply to editing members.

When emails are sent to the admins

For now, never.

When emails are sent to the members

Via sendgrid and Heroku Job Scheduler, no connection to mailchimp for now.

  1. Membership expired 15 days ago
  2. Membership expired today
  3. Membership will expire in 15 days

Mailchimp

Once a list is created in mailchimp, the user can create email campaigns directly there, not needing to change anything in Tamarin.