This is Phoenix Next, the new campaign experience for DoSomething.org! It's built using Laravel 5.3, Contentful, React, and Redux and plays nicely with the rest of our team (Northstar, Rogue, and co.)
Fork and clone this repository to your computer, and then add to your local Homestead installation. Homestead provides a pre-packaged development environment to help get you up and running quickly!
For help on getting Homestead setup on your computer, refer to the following instructions.
# Install dependencies:
$ composer install && npm install
# Copy the default environment variables:
$ cp .env.example .env
# Run database migrations:
$ php artisan migrate
# And finally, build the frontend assets:
$ npm start
We use Contentful as our content management platform. Please setup an account and request access to the space used for this project. Once you have access, head to the APIs section for the space and then you can update your .env
file with the correct API keys and Space ID for the project, allowing you to make requests to access the data from your local environment.
You may run PHP tests locally using PHPUnit, by running:
$ vendor/bin/phpunit
It would be easier to run the PHPUnit tests from within the Homestead Vagrant box.
You may run JavaScript tests locally using Jest, by running:
$ npm test
We use ESLint to lint our front-end JavaScript code. It runs in the following scenarios:
- When using the
npm start
command, your files will be "watched" for changes, and when a change is detected, the JS code will be linted and only compiled if it passes. - You can manually execute linting the code by running
npm run lint -s
. The-s
option lets you suppress the verbose NPM warnings that follows when there are linting errors. - Code linting also runs via Wercker our continuous integration service when a new pull request is made for the repository.
We use StyleCI service to lint our PHP code when a new pull request is made for the respository.
©2017 DoSomething.org. Phoenix is free software, and may be redistributed under the terms specified in the LICENSE file. The name and logo for DoSomething.org are trademarks of Do Something, Inc and may not be used without permission.