Announce private personal grading that can be accessed through a Google account
- Nav to Google API Console and acquire an OAuth 2.0 client ID
- Only
auth/userinfo.email
scope is mandatory
- Rename
src/credential.example.js
tosrc/credential.js
with the following content
export default {
GOOGLE_CLIENT_ID: "Client ID from step1",
GOOGLE_CLIENT_SECRET: "Client secret from step1",
SESSION_SECRET: "Secret to store sessions",
};
- Rename
src/config.example.js
tosrc/config.js
with the following content
export default {
title: "The title of the website",
grade_path: "The path to the CSV file to read which stores the scores",
google_callback_url: "https://{your_domain}/auth/google/callback",
};
- Make sure the CSV file is in the path mentioned above. And the format should be (without spacing)
student_id, score_title1, score_title2,...
[leave blank], percentage1, percentage2,...
your_student_id, score1, score2...
- Install and launch the application
npm install
npm start
Or via docker-compose
docker-compose up -d --build
The compose script will mount two volumes. One is for the persistent sessions after the restart. The other is for storing grades to read.
You can update scores without restarting the application.
- MIT
- Author: Yung-Hsiang Hu @ 2022