Skip to content

thomasmodeneis/Sententiaregum

 
 

Repository files navigation

Sententiaregum

A social network based on Symfony2 and ReactJS

Build Status Scrutinizer Code Quality PHP 7 ready Stories in Ready SensioLabsInsight Join the chat at https://gitter.im/Sententiaregum HHVM Status Latest Stable Version Total Downloads Latest Unstable Version License

What is it?

Sententiaregum is a social network based on a REST api written with symfony2 and a frontend in ECMAScript6 using React and Reflux.

Vagrant

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.

Windows

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.

Local nodejs environment

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:

[Optional] Deploying an ssh key to the VM

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.

Custom timezone

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

Install

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.

Deployment

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)

Custom configuration

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

Migrations

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.

License

This project is under the GPL license. The whole license file can be found here

About

A social network based on Symfony2 and ReactJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 77.4%
  • JavaScript 14.6%
  • Gherkin 2.6%
  • Puppet 1.5%
  • HTML 1.5%
  • Ruby 1.1%
  • Other 1.3%