Sp23 Badges:
@beautyjoy/BJC-Teacher-Tracker Status:
The Beauty and Joy of Computing (BJC) is an introductory computer science curriculum developed at UC Berkeley meant for high school freshmen up to college freshmen. The program has a teacher guide and a newly generated password that is to be given to any teacher who signs up for the program as a volunteer educator in the Bay Area - there are plans to expand the program to other states in late 2020. This pilot application is designed as a dashboard to track the workflow of teachers who run the program and provide high-level, descriptive statistics on the courses taught and participating schools. The BJC Teacher Tracker is a NEW project started in Fall 2019 by a group of 5 student developers in UC Berkeley's CS 169: Software Engineering.
C4Context
title BJC Curriculum Management Dashboard
Boundary(b1, "Dashboard System") {
Person(teacher, "Teacher", "Signs up and manages own information")
System(curriculumSystem, "Curriculum Dashboard", "Central platform for curriculum management")
Person(admin, "Admin", "Administers systems and oversees communications")
System(teacherInfoSystem, "Teacher Management System", "Manages teacher profiles")
System(emailSystem, "Email System", "Handles all email communications")
System(workshopSystem, "Workshop System", "Coordinates workshop registrations")
Rel(admin, curriculumSystem, "Administers", "HTTPS", "left")
Rel(admin, teacherInfoSystem, "Administers", "HTTPS", "left")
Rel(admin, emailSystem, "Sends Emails", "SMTP", "down")
Rel(admin, workshopSystem, "Organizes Workshops", "HTTPS", "up")
Rel(teacher, curriculumSystem, "Accesses if approved", "HTTPS", "right")
Rel(teacher, teacherInfoSystem, "Manages own profile", "HTTPS", "left")
UpdateElementStyle(admin, $bgColor="#F9D648FF", $fontColor="#000000", $borderColor="#C4972F")
UpdateElementStyle(teacher, $bgColor="#8ABAD3FF", $fontColor="#000000", $borderColor="#045D75")
UpdateElementStyle(curriculumSystem, $bgColor="#F0F0F0", $fontColor="#000000", $borderColor="#707070")
UpdateElementStyle(teacherInfoSystem, $bgColor="#B8DEE6", $fontColor="#000000", $borderColor="#76A5AF")
UpdateElementStyle(emailSystem, $bgColor="#F7E0B5", $fontColor="#000000", $borderColor="#DDBE7E")
UpdateElementStyle(workshopSystem, $bgColor="#D1F4C9", $fontColor="#000000", $borderColor="#95C896")
UpdateRelStyle(teacher, curriculumSystem, $textColor="#046307", $lineColor="#0D4006")
UpdateRelStyle(teacher, teacherInfoSystem, $textColor="#046307", $lineColor="#0D4006")
UpdateRelStyle(admin, curriculumSystem, $textColor="#860136", $lineColor="#540229")
UpdateRelStyle(admin, teacherInfoSystem, $textColor="#860136", $lineColor="#540229")
UpdateRelStyle(admin, emailSystem, $textColor="#860136", $lineColor="#540229")
UpdateRelStyle(admin, workshopSystem, $textColor="#860136", $lineColor="#540229")
}
application.yml
(rails env framework). Instead, we use a .env
file at directory root to load all env vars. Use .env.example
as a reference for env format.brew install postgresql chromedriver
brew services start postgresql
sudo apt install postgresql
sudo su - postgres
(to get into postgres shell)createuser --interactive --pwprompt
(in postgres shell)DB_USER
and DB_PASSWORD
fields in the .env
file.pg_ctlcluster 12 main start
sudo service postgresql start
rvm use 3.2.3
# Double-check .ruby-version
bundle
bin/rails db:setup
(Run this after setting up Postgres)nvm install 14
Node v14 is neededyarn install
Yarn is neededovermind
, you can simply npm run dev
.bundle exec rspec
bundle exec cucumber
bundle exec rubocop
(Autocorrect all with bundle exec rubocop -a
)heroku pg:psql
(for Heroku) or psql bjc_teachers_dev
(for local) to get into psqlrails db
to get into psqlUPDATE teachers
SET admin = true
WHERE Email LIKE '%@berkeley.edu%'
;
Of course, you can swap in the email of your choice.
heroku run rails console
(for Heroku) or rails console
(for local) to get into rails consoleTeacher.where("email LIKE '%@berkeley.edu%'").update_all(admin: true)
stylesheet_pack_tag
doesn't work. :(heroku buildpacks:set heroku/nodejs
# this must be the first buildpack.heroku buildpacks:add --index 2 heroku/ruby
heroku addons:create heroku-postgresql
heroku git -a [app-name]
git add .
git commit -m "<Message>"
git push heroku master
(If this fails, try commenting the release command in Procfile
for this first deployment only and go on to the next step. After you are done with the deployment, uncomment back the release command again. For more information, see this PR.)If bundler install runs successfully, continue with the following commands to correctly setup the PostgreSQL database on Heroku:
heroku run bin/rails db:drop
(if this fails, you can skip this step)heroku run bin/rails db:schema:load
heroku run bin/rails db:seed
heroku config:set ...
for each of the environment variables.heroku open
TODO: Link to download CodeClimate binaries for macOS.
https://codeclimate.com/downloads/test-reporter/test-reporter-latest-darwin-amd64