ucsb-cs156-s21 / proj-ucsb-cs-las

https://proj-ucsb-cs-las.herokuapp.com/
MIT License
2 stars 3 forks source link

proj-ucsb-cs-las

codecov

Purpose

This app is a course project of https://ucsb-cs156.github.io, a course at UC Santa Barbara.

This repo implements an application that can be used as an information management platform for the UCSB CS Learning Assistant (LA) program. You can learn more about the UCSB CS LA program here:

The functions that this application will eventually support may include:

It contains:

Getting Started

To get started with this application, you'll need to be able to

This application has integrations with the following third-party services that require configuration

All of the setup steps for running the app on localhost and Heroku are described in these file:

Setting up GitHub Actions (CI/CD, CodeCov)

To setup GitHub Actions so that the tests pass, you will need to configure some secrets on the GitHub repo settings page; see: ./docs/github-actions-secrets.md for details.

This file also describes the setup for Codecov

Property file values

This section serves as a quick reference for values found in either secrets-localhost.properties and/or secrets-heroku.properties.

Property name Heroku only? Explanation
app.namespace See Getting Started
app.admin.emails A comma separated list of email addresses of permanent admin users.
app.member.hosted-domain The email suffix that identifies members (i.e. ucsb.edu vs gmail.com)
spring.data.mongodb.uri The URL for read only access to the MongoDB database with archived course data; see more information below.
auth0.domain See Getting Started
auth0.clientId See Getting Started
security.oauth2.resource.id Should always be same as ${app.namespace}
security.oauth2.resource.jwk.keySetUri Should always be https://\${auth0.domain}/.well-known/jwks.json
spring.jpa.database-platform Yes Should always be org.hibernate.dialect.PostgreSQLDialect
spring.datasource.driver-class-name Yes Should always be org.postgresql.Driver
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults Yes Should always be false
spring.datasource.url Yes Should always be ${JDBC_DATABASE_URL}
spring.datasource.username Yes Should always be ${JDBC_DATABASE_USERNAME}
spring.datasource.password Yes Should always be ${JDBC_DATABASE_PASSWORD}
spring.jpa.hibernate.ddl-auto Yes Should always be update

MongoDB URL

You'll also need a value for the MongoDB URL for read-only access to the archived course data.

For students working on the project, you will typically not need to set up your own instance of this database; instead the course staff will do that for you, and then provide you with the URL.

This url is used for the value of spring.data.mongodb.uri

Enabling fixtures

You can enable fixtures (aka pre-populate the database) by running the following command:

# Un-sample the data.sql.SAMPLE file
cp src/main/resources/data.sql.SAMPLE src/main/resources/data.sql

You can also add fixtures via SQL statements by adding sql statements to the data.sql file.

Storybook Support

To run React Storybook:

Additional stories are added under javascript/src/stories

For documentation on React Storybook, see: https://storybook.js.org/