#htmx #ctf #front-end #optimized #platform #performance #ct-fd

app ctfr

Optimized CTFd written with Rust & HTMX

1 unstable release

0.1.0 Nov 14, 2023

#20 in #ctf

GPL-3.0 license

7KB

CTFr

github crates.io build status

Introduction

CTFR is an optimized complete rewrite of CTFd written with Rust & HTMX. I've personally stuggled to run CTFd performantly, and often had CTFs I've competed in come to a stand still or 5xx when they start.

A CTF platform frontend is extremely simplistic (mostly just static HTML), so let's use HTMX! Of course for the backend, we need performance...so let's use Rust (in the spirit of Meme-Driven-Development)!

Development

CTFr can be run locally for either further development or customization.

[!NOTE] BEFORE you run the following steps make sure:

  • You have (a recent version of) Rust installed locally on you machine rustup update && rustup install nightly
  • You have docker & docker-compose installed and running
# 1. Clone the repository
git clone https://github.com/MNThomson/CTFr.git && cd CTFr

# 2. In another terminal, run the required postgres docker container
docker-compose up

# 3.1 To start developing, run CTFr
cargo run

# 3.2 Or auto rebuild/run on file save (requires the mold linker & cranelift backend)
cargo r

The development environment is now running and accesible at https://localhost:4321/

License

Licensed under GPLv3
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you shall be licensed as above, without any additional terms or conditions

Dependencies

~6–13MB
~152K SLoC