Once upon a time, Thalia managed their own student canteen. It was the time that Martijn
Broenland, treasurer of Thalia during that time, built a system to administer Thalia's inventory: Thadmin.
The system was really great and was updated over and over again. And when the former faculty building was demolished and
replaced by the new Huygens building, and the new student canteens were shared with other associations, Thadmin stayed.
But as with every proper software product, after about 15 years, they start falling apart, especially when they are
not really really not maintained. In 2020, the Thadmin is still being used as a TUI-based barcode scanner point
of sale console, pushing canteen sales to Tantalus.
Fast-forward to 2021: Thalia released their very own payment system Thalia Pay. To allow members to use this payment system for point of sale orders, Thalia needs a cash register system. It's time to revive Thadmin.
Thadmin is a frontend Point of Sale client that integrates with Thalia's concrexit
.
It provides a nice user interface for (committee/board) members to create orders on the concrexit
sales backend.
Moreover, it shows QR codes that members can scan to pay for their orders. This payment functionality itself, however,
is not implemented in Thadmin itself. Thadmin really only provides a user interface to those that are managing shifts.
- Install the Yarn package manager
- Clone this repository
- Use
yarn install
to install the required packages - Use
yarn serve
to serve the test server - Note that you might need to setup a
.env
file in the root of the cloned repository. The.env
file will need to look something like the following (for local development):
VUE_APP_API_BASE_URI=http://localhost:8000
VUE_APP_API_AUTHORIZATION_ENDPOINT=/user/oauth/authorize/
VUE_APP_API_ACCESS_TOKEN_ENDPOINT=/user/oauth/token/
VUE_APP_API_OAUTH_CLIENT_ID=r8d1Zg5c9WKtOPRHTi3wtKUga6xcQyP5YlE0ITXJ
VUE_APP_API_OAUTH_REDIRECT_URI=http://localhost:8080/auth/callback
It is also possible to define these variables in your terminal's environment directly.
Also note that you will need a running concrexit
instance on your machine
to use the previous .env
configuration. The concrexit
instance must also be configured for accepting OAuth requests
from Thadmin
.
Use yarn lint
to lint and fix files.
Use yarn build
to compile and minify for production. This will give you the correct distributable files.
However, this repository also contains the full infrastructure to deploy staged environments. You need an installation of Terraform to do this. We recommend using tfenv to install the correct version.
To be able to deploy Thadmin you need access to the Thalia AWS account with permissions to the Route53, Cloudfront, ACM and S3 services. However, if you only want to update the application itself you should only need access to the correct S3 bucket.
To deploy the develop environment make sure your working directory is set to infra/stages/develop
.
- Setup the correct variables (see 'Getting started')
- Run
terraform init
- Run
terraform apply
to deploy everything
It is possible to target certain resources and deploy only parts of the configuration:
terraform apply -target="module.thadmin_hosting"
terraform destroy -target="module.thadmin_routing"
The main branch of this repository automatically deploys to our staging environment. We have setup GitHub Environments to be able to semi-automatically deploy the production version as well.