Skip to content

Repository files navigation

TISC Challenge Candidate

My submission for TISC challenge

https://www.csit.gov.sg/events/tisc/challenge-submissions

Set up

Option 1: Docker (Recommended)

✅ Docker setup is fully functional!

The Docker setup provides a complete containerized environment with automatic database setup, migrations, and application deployment.

  1. Clone the repository and navigate to the project directory:
git clone <repository-url>
cd tisc-passkey
  1. Environment Configuration:

    The Docker setup uses environment variables defined in docker-compose.yml. To customize:

    • For local development: Use the default values (application will run on http://localhost:8080)
    • For production: Edit the environment variables in docker-compose.yml:
    environment:
      APP_NAME: passkey.tisc
      APP_DOMAIN: your-domain.com              # Change this to match domain without HTTPS
      PASSKEY_ORIGIN: https://your-domain.com  # Change this (use https for production)
      JETZIG_SESSION_COOKIE: passkey.tisc      # You can leave this alone. This is just Session cookie's name.
      JETZIG_SECRET: YourSecureRandomString123456789  # Not super important to edit this but edit if you want.
      CTF_FLAG: TISC{your_custom_flag_here}    # Default CTF flag is set, or override it.
  2. Build and run with Docker Compose:

docker-compose up

The application will:

  • Set up PostgreSQL database
  • Install Zig 0.15.0-dev with architecture support (x86_64/aarch64)
  • Install OpenSSL (required by Passcay/WebAuthn)
  • Build application in memory-safe mode (ReleaseSafe)
  • Run database migrations automatically
  • Seed the database with initial data
  • Start the application server
  1. Access the application at http://localhost:8080

To stop the containers:

docker-compose down

To remove all data and start fresh:

docker-compose down -v

Option 2: Manual Setup

Requires:

  1. Zig > 0.15.0-dev.377+f01833e03

  2. PostgreSQL

  3. Jetzig CLI

  4. OpenSSL installed on system (Passcay requirement).

  5. Set up the environment variables:

cp .env.example .env
# edit .env
  1. Ensure you have PostgreSQL running and create the database:
CREATE DATABASE tisc_passkey;
CREATE USER tisc_passkey WITH PASSWORD 'tisc_passkey';
GRANT ALL PRIVILEGES ON DATABASE tisc_passkey TO tisc_passkey;
  1. Perform migration and seed the database:
jetzig database migrate
jetzig database seed
  1. Run development server, and go to http://localhost:8080 when it's ready:
jetzig server

Releases

Packages

Contributors

Languages