Main Avalanche Network server application. Built with Ruby on Rails.

James Peret: 962c92d65d Readme.md update and README.rdoc deleted 10 gadi atpakaļ
app 1b38d206cf Removed relations from step_validation and step_verification 10 gadi atpakaļ
bin def60a0d18 Initial Commit 10 gadi atpakaļ
config 22b70ffc1c mission slug with friendly id 10 gadi atpakaļ
db 1b38d206cf Removed relations from step_validation and step_verification 10 gadi atpakaļ
features 6d824d5e47 New start page and tests suite fix 10 gadi atpakaļ
lib 21d338e40d Changing rake resque job for Heroku compatibility 10 gadi atpakaļ
public 6265b3ce33 Added font custom, generated avalanche_icons and precompiled assets 10 gadi atpakaļ
script dbf9621e94 Cucumber testing suite ininitialized with first scenario 10 gadi atpakaļ
spec 82f1b72319 Upload Image bg processing with carrierwave_backgrounder and testing 10 gadi atpakaļ
test 6f19f6dee0 Agent controller and dashboard page 10 gadi atpakaļ
vendor def60a0d18 Initial Commit 10 gadi atpakaļ
.fontcustom-manifest.json 6265b3ce33 Added font custom, generated avalanche_icons and precompiled assets 10 gadi atpakaļ
.gitignore 6265b3ce33 Added font custom, generated avalanche_icons and precompiled assets 10 gadi atpakaļ
Gemfile bb8ce26e3a installed Hirb 10 gadi atpakaļ
Gemfile.lock bb8ce26e3a installed Hirb 10 gadi atpakaļ
Procfile d1fe9cab7f spawning another process inside the unicorn server 10 gadi atpakaļ
Rakefile c579b5d55b renamed rails project to Avalanche2 10 gadi atpakaļ
config.ru def60a0d18 Initial Commit 10 gadi atpakaļ
fontcustom.yml 6265b3ce33 Added font custom, generated avalanche_icons and precompiled assets 10 gadi atpakaļ
readme.md 962c92d65d Readme.md update and README.rdoc deleted 10 gadi atpakaļ

readme.md

Avalanche Network (avalanche2)

Second prototype source code of the avalanche network web app.

Installation and Configurations

  1. Clone the project: https://github.com/jamesperet/rails_website_template.git
  2. Create a postgres databases for development and test enviorments.
  3. Configure the databases in config/database.yml
  4. Run rake db:migrate
  5. Run rake bootstrap:all to configure the website and create a admin user
  6. Create the file config/application.yml with all env variables
  7. Set the Google Analytics Tracking code in the file app/assets/javascript/google_analytics.js.coffe
  8. Start the server: rails server -p 3000
  9. Login as admin@website.com with the password 12345678

Deploy to Heroku

  1. Create a new heroku app: heroku create new-app-name
  2. Run figaro heroku:set -e production to copy env variables from config/application.yml and set them in heroku
  3. Add the heroku postgre addon: heroku addons:add heroku-postgresql to create and configure a postgres database in heroku server
  4. Add the heroku Redis to Go addon: heroku addons:add redistogo
  5. Push to heroku: git push heroku master to deploy the repo
  6. Migrate the database: heroku run rake db:migrate
  7. Create the initial config and admin user: heroku run rake bootstrap:all
  8. Add your website URL to the Mixpanel Partner program to earn 200,000 data points every month plus 25,000 people profiles.

Env Variables

	AWS_ACCESS_KEY_ID:
	AWS_SECRET_ACCESS_KEY: 
	AWS_S3_BUCKET:
	AWS_S3_BUCKET_REGION:
	HEROKU_APP_URL: 
	MANDRILL_USERNAME: 
	MANDRILL_KEY: 
	DOMAIN_NAME: 
	SERVER_EMAIL: 
	DEVISE_SECRET_KEY: 
	SECRET_KEY_BASE: 
	MAILCHIMP_KEY: 
	MAILCHIMP_LIST_ID:
	REDISTOGO_URL:

Notes

agent_step

  • step_validations
  • step_submissions
    • step_verification

Avalacnhe2 system scaffolding and notes


rails g scaffold mission mission_agents:references title:string objective:string briefing:text owner:references status:integer launched:boolean 
language:string cover_img:string

rails g model mission_agent mission:references agent_steps:references mission_candidates:references objective:string briefing:text role:string 
description:text user:references agent_number:integer debriefing:text

rails g model agent_step mission_agent:references step:integer title:string description:text completed:bool completed_date:datetime

rails g model step_validation agent_step:reference step_verifications:references mode:string description:string

rails g model step_verification step_validation:references validated:boolean validated_by:references content:string

rails g model mission_candidate user:reference mission_agent:reference status:integer

Undone

rails g model agent_reward mission_agent:reference category:string title:string description:text img:string

mission controller agent controller mission_list_controller settings_controller

mission_list_index agent_dashboard mission_index mission_show mission_edit/create

Emails:

  • pending missions (3-5 days pending steps)
  • Mission Acomplished
  • Mission Failed