bush-campus-signin

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2024 License: MIT Imports: 11 Imported by: 0

README

Bush Campus Signin

a simple webapp written in go to allow students at bush to sign in and out of campus.

basic rundown

  1. A student visits the URL through the QR code (if the app is launched with a QR password)
  2. The student then signs in with their google account if they have not already to verify their identity
  3. The student then submits the form, saying whether or not they are signing in/out and specifying the reason
  4. This data is then uploaded to a google sheet where the school can monitor who is on campus and who is not

How do I configure/run this application

This application is deployed using containers, and in the future will use nginx as a reverse proxy (currently uses caddy) To run this application you must properly configure the google console and put in the correct environment variables

  1. create a new directory to store application data
  2. copy the .env template to a .env file for all of the credentials required to run the application
  3. copy the sample docker-compose.yml and modify it to your needs
  4. create an empty directory data, this will be mounted onto the container and hold encrypted session data
  5. create an oauth 2.0 webapp in google cloud console
    • in the .env file you copied, set the GOOGLE_OAUTH_CLIENT_ID and GOOGLE_OAUTH_CLIENT_SECRET appropriately from the JSON values downloaded
  6. create a service account through the google cloud console
    • be sure to save the private key into the .env file under GOOGLE_SREADSHEET_ACCOUNT_KEY and the email under GOOGLE_SREADSHEET_ACCOUNT_EMAIL
  7. Next, create a spreadsheet for storing the attendence data, make sure to share it with the service account you created earlier, inputting the email assigned to it.
    • copy the spreadsheet ID from the url and put it inside of the .env file in the field GOOGLE_SPREADSHEET_ID
  8. using the sample docker-compose.yml you are now (hopefully) able to run:
docker-compose -d up

FAQ

Q: why not use microsoft OAuth A: their APIs are more challenging to work with, google simply makes it easier for developers to use their tooling, along with their better documentation. You can do all of the same things you can do with the google account that you can with the microsoft for this usecase so it really does not matter.

Q: why does this exist? A: Keeping track of attendence on a paper sheet to know who is on campus and who is not, can be a hard and error prone task, by automating this, it saves significant time and energy

Q: when will this be deployed? A: hopefully before summer.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL