The STEMcoding learning management system (LMS) is a tool for teaching coding. Teachers create courses and programming labs; students write and submit code in an in-browser editor and run p5.js sketches directly in the browser.
The STEMcoding learning management system was developed over a number of years by a number of people who are or were associated with Ohio State University. Specifically, Lilith Daemon led the development of the first working version of the code base which was designed to assist with Prof. Chris Orban's physics classes at Ohio State University Marion campus.
Ohio State University is the copyright holder for this code base. For the benefit of the education community, the code base is being released on github on the AGPLv3 license.
- Roles: student, teacher, super-teacher, and admin, each with its own area.
- Courses & enrollment: course creation, enrollment, signups, and cloneable course templates.
- Programming labs: assign coding labs (with starter/support files) to courses.
- Submissions & grading: students submit code; teachers grade via a gradebook.
- In-browser IDE: an Ace-based editor for writing and submitting code.
- p5.js player: runs student sketches in-browser on a dedicated subdomain.
- Ruby on Rails 7.2 (Ruby 3.4.10), PostgreSQL, Redis + Sidekiq
- Devise (auth) + Pundit (authorization)
- Vite + Vue for the frontend; HAML views
- Docker / docker-compose for local development
Prerequisites: Docker and Docker Compose. DIP is optional but convenient.
# 1. Set up your secrets. The repo ships an encrypted credentials vault but not
# its key. Create your own (see "Credentials" below):
rm -f config/credentials.yml.enc config/master.key
docker compose run --rm runner bin/rails credentials:edit # fills in the schema
# 2. (Optional) copy environment defaults
cp .env.example .env
# 3. Build, set up the database (also seeds it), and boot
docker compose build
docker compose run --rm runner ./bin/setup
docker compose upWith DIP:
dip build
dip provision
dip compose upThen open http://localhost:3000 and sign in with the seeded admin:
- Email:
admin@example.com - Password:
password(override withSEED_ADMIN_PASSWORD)
bin/setup creates and seeds the development database (admin/teacher
accounts plus sample courses and labs), so there's data to click through
immediately. Vite runs as its own service and hot-reloads assets.
The p5 "player" runs on its own subdomain and works out of the box at
http://player.localhost:3000 (*.localhost resolves to 127.0.0.1). The
development environment sets config.action_dispatch.tld_length = 0 so
localhost is treated as the domain and player.localhost parses to the
player subdomain — without that, the subdomain-constrained route would 404.
The subdomain prefixes per environment come from the credentials subdomain:
section.
Secrets are stored in Rails' encrypted credentials
(config/credentials.yml.enc), decrypted with config/master.key /
RAILS_MASTER_KEY. The master key is not committed. To run the app you
create your own vault following the schema in
credentials.sample:
docker compose run --rm runner bin/rails credentials:editRequired keys: database.<env>.name (+ host/username/password when not using
CONTAINERIZED/DATABASE_URL), redis.<env>.{url,password},
secret_key_base, and subdomain.{app,player}.<env>.
Non-secret runtime configuration is read from environment variables — see
.env.example.
docker compose run --rm runner bin/rails db:seedIn development this creates an admin (admin@example.com) whose password is
SEED_ADMIN_PASSWORD (default password) plus sample courses and labs.
docker compose run --rm -e RAILS_ENV=test runner bin/rails db:create db:schema:load
docker compose run --rm -e RAILS_ENV=test runner bundle exec rspecStatic analysis:
docker compose run --rm runner bundle exec rubocop
docker compose run --rm runner bundle exec brakeman
docker compose run --rm runner bundle exec bundle-audit check --updateCI runs all of the above through the same Docker image (see
.github/workflows/ci.yml).
At this time Ohio State University can not commit to providing regular updates on any schedule or overseeing merge requests to this code base. If you are interested to contribute to this code base we recommend that you look at the forks of this repository and find an active project there. We note that Ohio State University professor Chris Orban, who helped to develop the STEMcoding Learning Management System, is involved with the STEMcoding Education Ohio fork of this code base.
To report a security issue, see SECURITY.md.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file for the full text.
Ohio State University is the copyright holder for this code base.
Bundled third-party components (p5.js, cocoon.js, TinyMCE, brand assets) retain their own licenses — see THIRD_PARTY_NOTICES.md.