DemSchoolTools is a database that excels at managing Judicial Committee records for Sudbury-inspired schools. In addition, it does a satisfactory job of tracking people (students, parents, donors, and others), student attendance, and the management manual.
See the wiki for more information.
-
Download the source code, or clone the git repository.
cd
into the root level of the source code. -
Download and install OpenJDK version 11.x and setup local environment (ex: JAVA_HOME environment variables)
-
Download and install sbt and the Play Framework. You will also need Java 11 if you don't have it installed already.
-
Download and install PostgreSQL, including pgAdmin, their graphical administration tool.
-
Download and install npm and NodeJS. Some versions of npm may not work. NodeJS v18 and npm v8 work.
-
Run
npm install
to install the Javascript libraries. -
Start PostgreSQL and create a database named "school_crm". You'll also need to set the password for the user named "postgres" to "123", or change the database username and password in conf/base.conf.
-
Set the environment variables APPLICATION_SECRET, GOOGLE_CLIENT_SECRET, FACEBOOK_CLIENT_SECRET, ROLLBAR_TOKEN, CUSTODIA_PASSWORD, and SES_PASSWORD to empty values. You can run the "set_keys_blank.sh" script to do this on Mac/Linux.
-
Run sbt
./sbt.sh
, then execute therun
command in the sbt/play console. -
Navigate to http://localhost:9000 in your browser and wait while DemSchoolTools is compiled.
-
When it loads, you should see a message saying "Database 'default' needs evolution!". Click "Apply this script now."
-
Open pgAdmin and run this SQL:
INSERT INTO organization_hosts(host, organization_id) VALUES ('localhost:9000', 1); INSERT INTO tag(title, use_student_display, organization_id, show_in_jc) VALUES ('Current Student', true, 1, true); INSERT INTO tag(title, use_student_display, organization_id, show_in_jc) VALUES ('Staff', false, 1, true);
-
Create a user for logging in: Go to
https://www.browserling.com/tools/bcrypt
to encrypt a password In pgAdmin run the following query (replacing names and passwords):INSERT INTO users(email, name, active, email_validated, hashed_password) VALUES ('EMAIL', 'NAME', true, true, 'PASSWORDHERE');
In pgAdmin run the following query (replacing the user_id with the user you just created):INSERT INTO public.user_role (user_id, role) VALUES (USERID, 'all-access');
-
Navigate to http://localhost:9000. You will see a page with headings "People", "Attendance", "JC", etc.