Skip to content

schmave/demschooltools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DemSchoolTools

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.

Documentation

See the wiki for more information.

Hacking

  1. Download the source code, or clone the git repository. cd into the root level of the source code.

  2. Download and install OpenJDK version 11.x and setup local environment (ex: JAVA_HOME environment variables)

  3. Download and install sbt and the Play Framework. You will also need Java 11 if you don't have it installed already.

  4. Download and install PostgreSQL, including pgAdmin, their graphical administration tool.

  5. Download and install npm and NodeJS. Some versions of npm may not work. NodeJS v18 and npm v8 work.

  6. Run npm install to install the Javascript libraries.

  7. Start PostgreSQL and create a database named "school_crm".

  8. Set the environment variables APPLICATION_SECRET, GOOGLE_CLIENT_SECRET, FACEBOOK_CLIENT_SECRET, ROLLBAR_TOKEN, and SES_PASSWORD to empty values. You can run the "set_keys_blank.sh" script to do this on Mac/Linux.

  9. Run sbt ./sbt.sh, then execute the run command in the sbt/play console.

  10. Navigate to http://localhost:9000 in your browser and wait while DemSchoolTools is compiled.

  11. When it loads, you should see a message saying "Database 'default' needs evolution!". Click "Apply this script now."

  12. 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);
    
  13. 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');

  14. Navigate to http://localhost:9000. You will see a page with headings "People", "Attendance", "JC", etc.