This is the web app for Getting Unstuck, a Scratch learning experience developed by the Creative Computing Lab at the Harvard Graduate School of Education.
API docs for development: here
- OS: tested on Windows 10, Mac, and Linux
- Python 3.7 or higher
- MongoDB 4.0 or higher
- RabbitMQ 3.8 or higher
- (Production) Server software, like Apache or Nginx
Assuming all the dependencies above are met, you'll need to do the following to get the web app running:
- Clone this directory.
- In the
secure
subdirectory, copycelery.json.example
tocelery.json
. Incelery.json
, changename
to be the app name. Thebroker_url
is the Celery broker URL for task management. Theresult_backend
is the Celery result backend URL for task management. - In the
secure
subdirectory, copydb.json.example
todb.json
. Indb.json
, type in your database credentials. If you have a database URI, copy that into thehost
field. - Open
lib/settings.py
in a text editor. Change the fields as necessary. - In the repository directory, create a Python virtual environment of your choice. Activate the virtual environment and run
pip install -r requirements.txt
to install the Python dependencies.
In a development environment, running the server is simple.
- Make sure the MongoDB and RabbitMQ servers are running.
- Navigate to the repo directory and activate the virtual environment in two terminal windows/tabs.
- In the first terminal window, run
flask run
. - In the second terminal window, run
celery -A app.celery worker --pool=solo -l info
. - Navigate to
http://localhost:5000
in your browser to start using the web app. When first setting up the server, go tohttp://localhost:5000/setup
to set up the first admin user.