Coursemology is an open source gamified learning platform that enables educators to increase student engagement and make learning fun.
- Ruby (= 3.3.5)
- Ruby on Rails (= 7.2.3.1)
- PostgreSQL (= 16) with PGVector extension
- ImageMagick or GraphicsMagick (For MiniMagick - if PDF processing doesn't work for the import of scribing questions, download Ghostscript)
- Node.js (v22 LTS)
- Yarn
- Docker (installed and running)
- Redis
We use Git submodules. Run the following command to initialize them before proceeding:
$ git submodule update --init --recursiveCoursemology consists of three main components:
Set up and run each component sequentially by following the linked documentation pages. As you proceed, open a new terminal window for each component after the previous component has been fully set up and started running.
Once each component has been set up and is running on their own terminals, you can access the app by visiting http://localhost:8080, and log in using the default user email and password:
email: test@example.org
password: Coursemology!
These commands should be run from the repository root directory, unless otherwise noted.
lvh.me is a public domain that resolves to 127.0.0.1. It is used instead of localhost because browsers enforce stricter security policies on localhost that can break the OAuth redirect flow over HTTPS.
-
Generate a self-signed certificate and key for
lvh.me:openssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes \ -keyout config/credentials/server.key \ -out config/credentials/server.crt \ -subj "/CN=lvh.me" \ -addext "subjectAltName=DNS:lvh.me,DNS:*.lvh.me"
Puma and the webpack dev server both use these files automatically on startup.
-
Update the Keycloak redirect URIs to use HTTPS:
bundle exec rake "keycloak:push_redirect_uris[https://lvh.me:8080]"
-
Start the app server with the public hostname:
RAILS_HOSTNAME=lvh.me:8080 RAILS_ENV=development bundle exec puma -
Start the client in HTTPS mode (from the
client/directory):yarn build:development-https
Access the app at https://lvh.me:8080. Your browser will show a certificate warning for the self-signed cert — ignore it or add a security exception.
-
Remove the certificate files so Puma falls back to HTTP:
rm config/credentials/server.crt config/credentials/server.key
-
Restore the Keycloak redirect URIs:
bundle exec rake "keycloak:push_redirect_uris"
-
Restart both the app server and client using the standard commands.
Create an issue on the Github issue tracker or come talk to us over at our Slack channels.
We welcome contributions to Coursemology! Check out the issue tracker and pick something you'll like to work on. Please read our Contributor's Guide for guidance on our conventions.
If you are a student from NUS Computing looking for an FYP project, do check with Prof Ben Leong.
Copyright (c) 2015-2023 Coursemology.org. This software is licensed under the MIT License.
You're more than welcome to use Coursemology for your own school or organization. If you need more help, join our Slack channel to reach our core developers.
We are actively running Coursemology and can provide free use of our infrastructure on a case by case basis. Please contact Prof Ben Leong if you would like to explore this option.
The Coursemology.org Project was made possible by a number of teaching development grants from the National University of Singapore over the years. This project is currently supported by the AI Centre for Educational Technologies.
