|
||||
---|---|---|---|---|
app | 53a5e004d6 | 10 年之前 | ||
bin | def60a0d18 | 10 年之前 | ||
config | 7f3fb26a02 | 10 年之前 | ||
db | e40bf4052d | 10 年之前 | ||
features | 721be9d4ee | 10 年之前 | ||
lib | 21d338e40d | 10 年之前 | ||
public | b82c4602f3 | 10 年之前 | ||
script | dbf9621e94 | 10 年之前 | ||
spec | e40bf4052d | 10 年之前 | ||
test | 6b13537083 | 10 年之前 | ||
vendor | def60a0d18 | 10 年之前 | ||
.fontcustom-manifest.json | 6265b3ce33 | 10 年之前 | ||
.gitignore | 9c4cc96bf4 | 10 年之前 | ||
Gemfile | b82c4602f3 | 10 年之前 | ||
Gemfile.lock | b82c4602f3 | 10 年之前 | ||
Procfile | d1fe9cab7f | 10 年之前 | ||
Rakefile | c579b5d55b | 10 年之前 | ||
config.ru | def60a0d18 | 10 年之前 | ||
dump.rdb | 8712f6f4f0 | 10 年之前 | ||
fontcustom.yml | 6265b3ce33 | 10 年之前 | ||
readme.md | 94c96a9373 | 10 年之前 |
___ _ __ ___ __ ___ _ __ ______ __ __ ______
/ || | / // | / / / | / | / // ____// / / // ____/
/ /| || | / // /| | / / / /| | / |/ // / / /_/ // __/
/ ___ || |/ // ___ | / /___ / ___ | / /| // /___ / __ // /___
/_/ |_||___//_/ |_|/_____//_/ |_|/_/ |_/ \____//_/ /_//_____/
Second prototype source code of the avalanche network web app.
https://github.com/jamesperet/rails_website_template.git
config/database.yml
rake db:migrate
rake bootstrap:all
to configure the website and create a admin userconfig/application.yml
with all env variablesapp/assets/javascript/google_analytics.js.coffe
rails server -p 3000
admin@website.com
with the password 12345678
heroku create new-app-name
figaro heroku:set -e production
to copy env variables from config/application.yml
and set them in herokuheroku addons:add heroku-postgresql
to create and configure a postgres database in heroku serverheroku addons:add redistogo
git push heroku master
to deploy the repoheroku run rake db:migrate
heroku run rake bootstrap:all
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:
# Mission
rails g scaffold mission mission_agents:references title:string objective:string briefing:text owner:references status:integer launched:boolean
language:string cover_img:string
# Mission Agents
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
# Mission Agent Steps
rails g model agent_step mission_agent:references step:integer title:string description:text completed:bool completed_date:datetime
# Mission Agent Candidates
rails g model mission_candidate user:reference mission_agent:reference status:integer
# Step Validations
rails g model step_validation agent_step:reference step_verifications:references mode:string description:string
# Step Verifications
rails g model step_verification step_validation:references validated:boolean validated_by:references content:string
# Validation Scaffolding
rails destroy model step_validation
rails destroy model step_verification
rails g migration AddStepSubmissionToAgentStep step_submissions:references
# Step Validation
rails g model step_validation agent_step:references validation_id:integer validation_type
# Text Validation
rails g model validation_text step_validation:references description
# Step Submission
rails g model step_submission agent_step:reference submission_contents:references validated:boolean validated_by:references date_validated:datetime
# Submission content
rails g model submission_content submission_content:references submission_id:integer submission_type
# Text Submission
rails g model submission_text submission_content:references content accepted:boolean validation:references
# Rewards
rails g model reward mission:references mission_agents:references title:string description:text img:string
rails g model user_reward reward:references user:references received:boolean date_received:datetime
rails g migration AddRewardsToMission rewards:references
rails g migration AddRewardsToMissionAgent rewards:references
# Mailers
rails g mailer MissionMailer
Each agent_step has many associated classes for storing validation details, user generated content and verification signing.
Each step can have multiple step validations that are set by the mission director. Each step_validation can have one validation type like text, image or agent position. Every time an agent submits the information requested by the step_validations, a step_submission object is created with multiple sumission_content objects, one for each step_validation. The submission_content types can bem text, image or agent_position and they will store this information sent by the agent and process it.
The submission_content class is also responsible for triggering the automatic validation that some step_validations might have. If the validation requires an operator decision, than the step_submission will show up on the mission control panel for manual validation. If the step can be automatic validated, than the system will create a step_verification for the current submission.