A tool to help you plan and manage a Zeus WPI event!
The app automatically fetches all event and board data by listening to a GitHub webhook installed in the Zeus website repository.
As a fallback, it periodically refetches the data.
You can assign organizers to each event.
Organizers are grouped by academic year and an organizer corresponds to a board member for that academic year.
Each event includes checks to track the progress of its organization. There are two types of checks: manual and automatic.
Manual checks must be manually added and marked as done for each event.
Automatic checks are updated automatically. Currently, they include:
- Is it added to the DSA website?
- Is there an announcement written?
- Has the event been covered in a mail?
You can write announcements for each event and schedule them to be send at a later date.
Similar to announcements, you can write and schedule emails. For each mail you can select with events are covered.
Each event can have 2 posters
Big
-> Poster meant to print out and hang up to advertise for the eventScc
-> Poster displayed on cammie chat screen
The posters are automatically synced with the visueel repository in Gitmate.
If a poster is not yet in the visueel
repository then a pull request will be created to add it after the event is finished.
If the visueel
repository has a poster and events has none or a different one then the events poster will be deleted and replaced by the one in the visueel
repository.
More information can be found in the visueel repository
You can generate a PowerPoint covering one or more events. If available it includes event posters and generates QR codes to the event's webpage.
There's a public API to get some basic events data. Click here to go to the swagger.
In development, no roles or permissions are required to access the application.
However, only board members will be visible as organizers.
Some modules require external API keys. The will fail to launch without them and by result the application will fail to start You can find each API key in the example env file. If you don't have an API key you should remove the startup of the relevant module inside the main file.
-
Install all tools listed in the asdf tool versions file.
If usingasdf
, runasdf install
. -
Install
make
. -
Run
make setup
to install:- Backend tools:
Goose
,Sqlc
- Frontend dependencies
- Backend tools:
-
Install Git hooks for code quality:
git config --local core.hooksPath .githooks/
-
Copy the example environment file
cp .env.example .env
Update values as needed.
-
(Optional) Configure the development config file if you're not using the makefile.
-
Migrate the database:
make migrate
-
Start the project
make watch
- Backend: http://localhost:4000
- Frontend: http://localhost:3000
- Backend: Golang
- Frontend: React + Typescript
Workflows are used to ensure code quality. You can run them manually before each commit by installing the githooks
git config --local core.hooksPath
They rely on [golangci-lint], which is included in the asdf tool versions file.
A Makefile is used to simplify most tasks.
make setup
Installs:
- goose manages the migrations
- sqlc generates statically typed golang code from SQL queries
- Frontend dependencies (manually:
cd ui $$ pnpm install
)
make migrate
Starts a postgres container and applies the migrations. If you want to use your own database you can run the migrations with
go run migrate.go
This uses the connection values specified in your config.
make watch
Starts the full Docker stack with hot module reloading (HMR) for both backend and frontend. It follows logs for the backend and frontend by default.
To view logs from other services (like the database):
docker compose up backend frontend db
Note
A restart is required after adding or removing dependencies
Adding a migration
- Run
make create-migration
Note
Nix users using devshell need to run goose -dir ./db/migrations postgres create my_migration_name sql
- Edit the newly made migration that can be found in the
db/migrations
folder - Update the queries in the
db/queries
accordingly - Run
make query
to generate the new table structs
Adding a new typed query (Sqlc)
-
Add your new query to
db/queries/{target}.sql
-
Run
make query
Check for dead code
- Run
make dead
Generate swagger docs
This will also format the swagger comments
- Run
make swagger
Note
Docker is strongly recommended for development
-
Install Air for HMR
go install github.com/air-verse/air@latest
-
Update your config files as needed
-
Start backend:
air .
-
Start frontend
cd ui && pnpm run dev
It is recommended to run the application using Docker.
Requirements
- Postgres
- Minio
Note
Set the environment to production
and populate the production config file
This repository automatically builds and publishes a docker container. The container will run the migrations before starting the webserver.