Skip to content

ZeusWPI/events

Repository files navigation

Events

A tool to help you plan and manage a Zeus WPI event!

Features

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.

Organizers

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.

Checks

Each event includes checks to track the progress of its organization. There are two types of checks: manual and automatic.

Manual Checks

Manual checks must be manually added and marked as done for each event.

Automatic Checks

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?

Announcements

You can write announcements for each event and schedule them to be send at a later date.

Mails

Similar to announcements, you can write and schedule emails. For each mail you can select with events are covered.

Posters

Each event can have 2 posters

  • Big -> Poster meant to print out and hang up to advertise for the event
  • Scc -> 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

Powerpoints

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.

Public API

There's a public API to get some basic events data. Click here to go to the swagger.


Development

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.

Quickstart

  1. Install all tools listed in the asdf tool versions file.
    If using asdf, run asdf install.

  2. Install make.

  3. Run make setup to install:

    • Backend tools: Goose, Sqlc
    • Frontend dependencies
  4. Install Git hooks for code quality:

    git config --local core.hooksPath .githooks/
  1. Copy the example environment file

    cp .env.example .env

    Update values as needed.

  2. (Optional) Configure the development config file if you're not using the makefile.

  3. Migrate the database:

    make migrate
  4. Start the project

    make watch

Full Explanation

  • 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

Useful make targets

Adding a migration

  1. Run make create-migration

Note

Nix users using devshell need to run goose -dir ./db/migrations postgres create my_migration_name sql

  1. Edit the newly made migration that can be found in the db/migrations folder
  2. Update the queries in the db/queries accordingly
  3. Run make query to generate the new table structs

Adding a new typed query (Sqlc)

  1. Add your new query to db/queries/{target}.sql

  2. Run

    make query

Check for dead code

  1. Run make dead

Generate swagger docs

This will also format the swagger comments

  1. Run make swagger

Running without docker

Note

Docker is strongly recommended for development

  1. Install Air for HMR

    go install github.com/air-verse/air@latest
  2. Update your config files as needed

  3. Start backend:

    air .
  4. Start frontend

    cd ui && pnpm run dev

Production

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.

About

Evenementen Verzamelen en Evalueren, Notificeren van Todo's en Statussen

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 2

  •  
  •