Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/poustouflan/crypto-drink

CryptoHack flag announcement and local scoreboard
https://github.com/poustouflan/crypto-drink

cryptography cryptohack java maven postgres quarkus react scoreboard typescript vite

Last synced: 3 days ago
JSON representation

CryptoHack flag announcement and local scoreboard

Awesome Lists containing this project

README

        

# CryptoDrink [Work In Progress!]

An instance of CryptoDrink is hosted at https://www.crypto-drink.com !

This is a complete rework of the previous Discord Bot [CryptoDrink](https://github.com/PoustouFlan/Crypto-Drink-Deprecated).
CryptoDrink allows anybody to create a local [CryptoHack](https://cryptohack.org) scoreboard with friends.
The scoreboards then can be linked to some Discord WebHooks, in order to receive automatic announcements when any user in the scoreboard solves a new challenge.
Whereas CryptoDrink was previously a Discord Bot, it will now also be a proxy and a website.

## Proxy
CryptoDrink now features a proxy over CryptoHack's api, featuring many additional endpoints.

- `/api/category` lists all known challenges of a category
- `/api/challenge` lists all known flaggers of a challenge in a scoreboard
- `/api/scoreboard` allows the creation of a scoreboard, the registration of users in a scoreboard and the connection of a scoreboard to a Discord webhook
- `/api/user` lists all known data about a user, as well as his completion progress for each category

The proxy is entirely coded in Java with Maven + Quarkus in the folder `src`, following the traditional layered architecture.
It uses a postgres database named `cryptodrink` which can be configured in the resources.
The backend should be started with maven.

```bash
mvn clean package -Dquarkus.package.type=uber-jar
java -jar target/CryptoDrink2-1.0-runner.jar
```

## Webhook
Flag announcement is now managed thanks to webhooks.
This is directly implemented in the backend: when the data regarding a user is updated, all new solved challenges are announced through all webhooks of all scoreboards the user belongs to.

Preview:

Flag announcement

## Website [Work in Progress]
A frontend features a convenient visualization of scoreboards and user data.
The frontend is coded using Vite/React/TypeScript, and should be started with npm.

```bash
cd frontend
npm install
npm run build
```

Create a scoreboard at https://www.crypto-drink.com/scoreboard, then register the CryptoHack users you want to appear on the scoreboard.

Preview:

Scoreboard