This Common Knowledge (CK) Board is the latest rebuild of the ENCORE Lab's collaborative canvas for guiding collective inquiry and active learning activities.
npm install -g @angular/cli
$ git clone https://github.com/encorelab/ck-board.git
Install Frontend dependencies:
$ cd frontend
$ npm install
Install Backend dependencies:
$ cd backend
$ npm install
Create a .env
file inside the /backend
directory (touch .env
in your terminal or manually create file using your IDE)
Add the following content into the .env
file and replace with your own credentials:
DB_USER=[MongoDB Username]
DB_PASSWORD=[MongoDB Password]
DB_URL=[MongoDB URL]
DB_NAME=[MongoDB Name]
JWT_SECRET=[JWT Secret Token]
PORT=8001
STATIC_FILES_PATH=[for dev, use "./../../frontend/dist/ck-board"; for production, use "/site/wwwroot/frontend/dist/ck-board"]
CKBOARD_SERVER_ADDRESS=[For dev, use "http://localhost:4201"; for production, use server URL, e.g., "https://ck-board.oise.utoronto.ca"]
GOOGLE_APPLICATION_CREDENTIALS="./secrets/keyfile.json"
GOOGLE_CLOUD_PROJECT=[Google Cloud Project ID]
1. GOOGLE_APPLICATION_CREDENTIALS
ai-data-extractor
)../secrets/keyfile.json
).GOOGLE_APPLICATION_CREDENTIALS="./secrets/keyfile.json"
2. GOOGLE_CLOUD_PROJECT
GOOGLE_CLOUD_PROJECT=ck-ai-assistant
SCORE SSO (Optional)
If also running SCORE for Single Sign-On (SSO), add the following additional content into the .env
file and replace with your own credentials:
SCORE_SSO_ENDPOINT=/sso/ckboard
SCORE_SSO_SECRET= [any value that matches ck_board_sso_secret on SCORE]
SCORE_LOGOUT_ENDPOINT=/api/logout
For the SCORE development environment, add the following values to application-dockerdev.properties
ck_board_url=http://localhost:4201
ck_board_sso_secret_key=[any value that matches SCORE_SSO_SECRET on CK Board]
Start redis, server first, then start client app once the server has successfully started:
$ redis-server # Start redis server on default port
# … Open a new terminal tab to run backend server
$ cd backend # Go into backend folder if not already
$ npm run dev # Start server
# … Open a new terminal tab to run client app
$ cd frontend # Go into frontend folder
$ ng serve --port 4201 # Run Angular app; Will start application on http://localhost:4201/
Switch to the /backend
directory.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
Issues
tabissue-{issue-number}
Closes #{issue-number}
at the bottom of the PR description