Markdown Converter
Agent skill for markdown-converter
This document provides instructions for Human or AI agents working on the `qcrypt` client codebase.
Sign in to like and favorite skills
This document provides instructions for Human or AI agents working on the
qcrypt client codebase.
qcrypt is a single-page browser application for client-side text encryption and decryption. It is designed to be easy to use, trustworthy, and secure, leveraging the Web Crypto API (SubtleCrypto) and libsodium for all cryptographic operations. The primary use case is to encrypt text for storage on insecure media.
This
qcrypt client can built, served, and tested locally. It depends on a backend API server called qcrypt-server. Currently the API server cannot be deployed locally and must run in AWS. Separate test and production qcrypt-server instances are deployed in AWS. The vast majority of dev/test work should be against the test server https://test.quickcrypt.org. This is configured automatically.
src/.libsodium-wrappers and @simplewebauthn/browser for cryptographic and WebAuthn functionalities.src/assets/protocol6.pdf and online at https://quickcrypt.org/help/protocol.qcrypt-server for user management and passkey operations. Server code is at qcrypt-server github and deployed at https://test.quickcrypt.orgsrc/app/core.src/app/qcrypt.component.ts: The main Angular component containing the core application logic.src/app/services/ciphers-current.ts: Contains the implementation of the most recent encryption and decryption ciphers.src/app/services/deciphers-old.ts: Contains the implementation of previous decryption ciphers versions.src/app/services/authenticator.service.ts: Handles WebAuthn authenticator logic.src/assets/protocol6.pdf: Detailed documentation of the cryptographic protocol.package.json: Lists project dependencies and npm scripts for building, serving, and testing the application.karma.conf.cjs: Configuration for the Karma test runner (used for unit tests).playwright.config.ts: Configuration for Playwright (used for end-to-end and unit tests).tests/: Contains Playwright test specifications, including unit.spec.ts, sequential.spec.ts, and parallel.spec.ts.Very important (particularly for AI agents): You must set up a development environment and successfully run both the Unit and End-to-End test suites described below, with all tests passing, before making any other changes. This helps you distinguish between environment setup problems and errors introduced by changes you make to the project.
sudo sudo snap install lxd sudo adduser $USER lxd newgrp lxd lxd init --auto lxc launch ubuntu:24.04 qcrypt lxc exec qcrypt -- /bin/bash
sudo apt update && sudo apt dist-upgrade -y sudo apt install -y git ca-certificates cd ~ git clone https://github.com/bschick/qcrypt.git && cd qcrypt ./ubsetup.sh 2>&1 | tee ubsetup.log
Unit Tests locally:
# Before starting the Karma server, you must first run the One-time setup steps above # The Karma server needs to be running before executing the tests. # For interactive users, you can run the server and tests in separate terminals. # For automation, the server can be run as a background process. nohup npm run karma > karma.log 2>&1 & sleep 35s # Allow the server time to start npm run test pkill npm; pkill ng # Stop the Karma server and ng process
End-to-End Tests using AWS hosted test API backend:
# Before starting the development server, you must first run the One-time setup steps above # The development server must be running to execute the E2E tests. # For interactive users, you can run the server and tests in separate terminals. # For automation, the server can be run as a background process. nohup npm run serve > serve.log 2>&1 & sleep 35s # Allow the server time to start npm run test:e2e pkill npm; pkill ng # Stop the development server and ng process
npm run serve. The server will listen on all IP addresses on that system.hosts file to set the name of the primary IP address where the development server is running to t1.quickcrypt.org. Ensure you can ping t1.quickcrypt.org../localssl directory relative to where you ran the npm run serve command. Import this certificate into your system's or browser's trusted certificate store. This process is dependent on your operating system.https://t1.quickcrypt.org:4200. The test front-end uses a test back-end API server running in AWS with a URL of https://test.quickcrypt.org. The test API server is intended only for those contributing to the Quick Crypt project. Unnecessary or excessive usage that drives up AWS costs will be blocked. Do not run invasive tests against the production API server.npm run build
The output will be placed in the
dist/ directory.
Before submitting any changes, run the following test suites to ensure that the application is working correctly.
npm run test
npm run test:e2e
src/assets/protocol6.pdf, including the use of strong cryptographic primitives and secure coding practices.https://test.quickcrypt.org is intended only for those contributing to the Quick Crypt project. Unnecessary or excessive usage that drives up AWS costs will be blocked.