A social network based on Symfony2 and ReactJS
Sententiaregum is a social network based on a REST api written with symfony2 and a frontend in ECMAScript6 using React and Reflux.
The simplest way to install Sententiaregum is locally is using vagrant:
git clone git@github.com:Sententiaregum/Sententiaregum.git /path/to/target
cd /path/to/target
Now you just need to boot vagrant:
vagrant up
Now a box with Ubuntu 14.04 and PHP 5.6 will be created automatically. There's a shell provisioner that runs the composer and npm and runs the grunt task runner that compiles the css and js.
The settings for the box can be found here: vagrant/hieradata/common.yaml
If you'd like to override some parameters for some special cases, you just need to create a file called local.yaml in the vagrant/hieradata directory. This file is capable at overriding all parameters provided in the common.yaml file.
This file is optional, but will always be ignored by git.
It is not recommended to use windows. When installing the npm dependencies on shared folders, you'll run into big trouble with the path limit.
If you use windows, this blog post helps you to fix that issue.
As a developer you may want to have a local nodejs environment. That can be helpful for local debugging as webstorm doesn't support remote node interpreters.
All linting tools must be installed globally:
The following list of npm packages must be installed globally:
- webpack
- webpack-core
- node-gyp
- mocha
- eslint
- eslint-plugin-react
- less
The dev server is currently not supported, if you'd like to auto-compile your bundle, you need to run the following command:
npm run watch
If you'd like to make the assets production-ready, run the following:
npm run frontend-build
A lint script has been implemented in order to execute eslint:
npm run lint
The rest of the linters used during the build process can be found at the before_script section of the .travis.yml
All local node packages and build production files will be synced.
For ESLint are some PHPStorm/WebStorm plugins available:
Just copy the file vagrant/ssh_key_path.yaml.dist to vagrant/ssh_key_path.yaml and uncomment the first line. Now fix the path to the proper ssh key path and then re-create the vagrant box.
The default timezone inside the vagrant box is "UTC".
In order to change it create a file called "vagrant/hieradata/local.yaml" which should look like this:
timezone: 'Europe/Berlin' # your custom timezone
The installation is really simple.
You just have to call composer install --no-dev and all dependencies will be configured and the setup of the backend and frontend will be processed.
Just have a look at the travis-ci/scripts/install.sh section which runs a setup for continuous integration and contains all necessary installation steps.
The deployment with capistrano is in progress in Sententiaregum/Sententiaregum#49
At the deployment for production some fixtures will be executed. These fixtures must implement the interface AppBundle\Doctrine\ORM\ProductionFixtureInterface which extends the basic FixtureInterface of the data fixtures library.
Currently the following fixtures implement this interface:
- AppBundle\DataFixtures\ORM\RoleFixture (prior=1)
- AppBundle\DataFixtures\ORM\AdminFixture (prior=2)
If you'd like to override configuration values, you can create for every environment in the app/config directory a custom configuration file:
app/config/local_config_{environment}.yml
In order to change values in a DB from different versions in the 'Doctrine' way, we use Doctrine Migrations.
All migrations files are located in the directory app/migrations having the namespace Sententiaregum\Migrations.
This project is under the GPL license. The whole license file can be found here