Skip to content

yetu/controlcenter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Controlcenter

Build Status bitHound Score

This is the base project for the yetu control center, containing server-side (scala-play framework based) and client-side (reactjs + reflux based) code.

developer setup

If you want to make changes to this project, best is to install prerequisites and initialise the needed dependencies below:

prerequisites

You need to have the following installed in your system:

  • npm

    • install from here
    • check you have it by entering npm into a terminal
  • sbt (and a java JDK)

    • on OSX: brew install sbt
    • every other platform: just execute ./activator or activator.bat - it's a wrapper script around sbt that will download and install sbt for you if you don't yet have it, or otherwise start sbt.

Configuration

If you are working for yetu

To run the project with a real integration with yetu OAuth system, you should grab application-local.conf from private repo. Copy the file to conf/application.conf.

Note: This file is added to .gitignore. You should not be able to commit it, but please pay close attention to not leak the private settings.

If you are not working for yetu

Have a look at conf/application-example.conf, copy to conf/application.conf and request your own OAuth2 credentials, currently please contact [email protected] to obtain them.

For more information on how to develop yetu apps, please see this page

Running the development version

All the scripts are in the root directory.

  1. To run from the clean checkout (if you are starting for the first time or have just checked out a fresh master branch), you need to run the clean_dev.sh script:
./clean_dev.sh
  1. If you want to run the server in dev mode with all things watched:
./dev.sh
  1. Open your browser and point it to http://localhost:9000

Hot reloading components and styles

This project has React Hot Loader integrated. If you run the project using ./dev.sh - everything will work out-of-box!

Otherwise, you can manually start hot-reload server using npm start.

Note: You should have frontendBundlePath = "//local.yetudev.com:8899/assets/" set in yetu section of your conf/application.conf. Otherwise the hot-reloading will not work!

Tests

Four types of tests are currently executed:

1. Scala unit tests

can simply be run with play test and have no further dependencies. They live under test.

2. Javascript unit tests with karma

Are currently run with npm:

npm test

Compiling fonts

  1. Install fontcustom
  2. Run npm run fonts in project root

See fontcustom.yml for configuration.

Adding dependencies

After you have added any library using npm or bower, you have to apply the next steps:

  1. Call npm shrinkwrap - it will freeze the versions of all sub-dependent node modules
  2. Check in bower_components - all bower libraries should be in VCS