This repository contains the code base for UC NeXt platform, which is currently under development and not intended for use at this time.
The UC NeXt platform is open-source software licensed under the BSD 3-clause license. The full text of the license may be found in the LICENSE file.
The UC NeXt platform is a product of its collaborators, including those who have contributed code, submitted bugs or even simply participated in the dialogue.
The UC NeXt platform is built on top of a number of outstanding open source platforms and packages including Ruby, RubyGems, Bundler, Ruby on Rails, Rake, Node.js, npm, Saas, Compass, WebBlocks, Elasticsearch, Bootstrap, Normalize.css and jQuery. Its quality is assured by Gemnasium, Code Climate, Travis CI and Coveralls. A sincere thanks is extended to the authors, maintainers and providers of all these fine tools.
- Ruby 2.1+
- Bundler
- Node.js
- npm
- Git
- Java 7.x JDK (Oracle / OpenJDK)
- Elasticsearch 1.7.1+
- ImageMagick
Install required Ruby packages:
bundle install
Install required Node.js packages:
npm install
Build your CSS and JS assets with WebBlocks:
bundle exec blocks build
When editing CSS and JS assets, rerun the above command to recompile your site CSS and JS.
Set your database connection details in config/database.yml
.
Run the following command to populate the schema:
bundle exec rake db:migrate RAILS_ENV=development
To load some sample data (such as a local test account), run the following command:
bundle exec rake db:seed RAILS_ENV=development
If using SQLite, you can erase your development database as (and then must rerun the above migration - and possibly seed - command):
rm -rf db/development.sqlite3
Two authorization methods are supported:
- Local users, recommended for development use
- Shibboleth via OAuth, recommended for production use
By default, the development environment is set up to use local login.
The configuration for this is available in config/environments/[your rails environment name].yml
:
auth:
route: /auth/local/new
allow_local: true
If local login is supported, once you seed the database (see the "Database" section above), you'll be able to log in with the starting account admin@localhost and the password password.
The easiest way to integrate this application with Shibboleth is to bridge it across OAuth. See:
Once this is set up, define the route to the bridge within config/environments/[your rails environment name].yml
:
oauth2:
provider:
shibboleth:
enabled: true
key: your-key
secret: your-secret
properties:
site: http://shib.auth.localhost
authorize_url: /oauth2/authorize
token_url: /oauth2/access_token
routes:
get_user: /oauth2/user
The login route via Shibboleth is then available at /auth/oauth2/shibboleth.
You should also change the auth
block in config/environments/[your rails environment name].yml
:
auth:
route: /auth/oauth2/shibboleth
allow_local: false
Run the application as:
RAILS_ENV=development bundle exec thin start --ssl -p 8080