Skip to content

ugoa/play-silhouette-reactivemongo-angular-seed

 
 

Repository files navigation

Play Silhouette Reactive Mongo Angular Seed Project

The Play Silhouette Reactive Mongo Angular Seed project shows how Silhouette can be used to create a SPA with AngularJS/Satellizer and Play scaffolded by yeoman and how you can presisit the users with MongoDb. It's a starting point which can be extended to fit your needs.

This project is a mix of these two projects:

  1. play-silhouette-angular-seed
  2. play-silhouette-reactivemongo-seed

Example

Deploy to Heroku

(The "Build App" phase will take a few minutes)

Features

Documentation

Consulate the Silhouette documentation for more information. If you need help with the integration of Silhouette into your project, don't hesitate and ask questions in our mailing list or on Stack Overflow.

Getting started

  1. Install MONGODB

    Then create a db called silhouette.

  2. Make sure u have Ruby and node.js installed.

Then you must install the node packages yo, grunt and bower:

npm install -g yo grunt grunt-cli bower

And the ruby packages sass and compass:

gem install sass compass

Alternative you can use Bundler to install the ruby packages:

bundle install -j4 --path .bundle
  1. Configure social providers

To configure the social providers for Satellizer, Open the file "~\ui\app\scripts\app.js" and input your providers clientId:

// Facebook
$authProvider.facebook({
  clientId: 'your-client-id',
  ...
});

// Google
$authProvider.google({
  clientId: 'your-client-id',
  ...
});
...

If you are using Heroku Update the "~\app.json" file with your client secret and client ID.

"env": {
  "BUILDPACK_URL": "https://github.com/heroku/heroku-buildpack-multi",
  "NPM_CONFIG_PRODUCTION": "false",
  "PLAY_CONF_FILE": "application.conf",
  "PLAY_APP_SECRET": "changeme",
  "FACEBOOK_CLIENT_ID": "",
  "FACEBOOK_CLIENT_SECRET": "",
  "GOOGLE_CLIENT_ID": "",
  "GOOGLE_CLIENT_SECRET": "",
  "TWITTER_CONSUMER_KEY": "",
  "TWITTER_CONSUMER_SECRET": ""
}

To test social providers on localhost, you can either set your system environment variables as defined in the app.json "env" section or manually update the "~\conf\silhouette.conf" file directly with your client ID and client secret.

# Google provider
google.accessTokenURL="https://accounts.google.com/o/oauth2/token"
google.redirectURL="http://localhost:9000"
google.clientID="your-client-id"
google.clientSecret="your-client-secret"
google.scope="profile email"
  1. Start sbt and run the following:
$ update

$ npm install

$ bower install

$ grunt build

$ run

License

The code is licensed under Apache License v2.0.

About

Seed Application for PlayFramework 2.4, Silhouette 3.0, ReactiveMongo 0.11 and AngularJS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 37.0%
  • Scala 31.1%
  • ApacheConf 18.0%
  • HTML 11.1%
  • CSS 2.3%
  • Ruby 0.5%