Volver a proyectos

PROYECTO

SCode

Hand-coding tools for classic ciphers — as an app, an API, and a library.

ReactNext.jsTailwind

Este contenido editorial está disponible en su idioma original.

SCode

Hand-coding tools for classic ciphers — as an app, an API, and a library.

Encode and decode messages with Enigma, Morse, Polybius, Vigenère, Bacon, and more. Built for cryptography enthusiasts, learners, and developers who want to embed ciphers into their own projects.

License: MIT PRs Welcome npm

Web app · API · Docs · npm


What is SCode

SCode is a monorepo with four pieces that share one core:

PieceWhat it isWho it's for
web/A React app for encoding/decoding in the browser.Anyone curious about ciphers.
npm/@zyther/scode-core — the cipher engine as a TypeScript library.Developers embedding ciphers in JS/TS projects.
api/A Next.js HTTP API wrapping the core.Apps in any language that need ciphers over HTTP.
cli/@zyther/scode-cli — the scd command-line tool.Terminal users, shell scripts, CI pipelines.

Every cipher runs entirely client-side in the web app, and statelessly in the API. No accounts, no tracking, no data stored between requests.

Try it

Encode via API

curl -X POST https://api.scode.zyther.dev/api/encode \
  -H "Content-Type: application/json" \
  -d '{"message": "hello world", "pattern": "¬"}'

Encode via library

import { encode, decode, format_str } from "@zyther/scode-core"

const { encrypted, config, pattern } = encode({
  message: format_str("hello world"),
  pattern: "¬",       // Morse
})

const { message } = decode({ encrypted, pattern, config })
// → "HELLOWORLD"

Encode via CLI

scd encode "hello world" --pattern "¬"
# → -.-. .... . .-.. .-.. ---

The pattern system

What makes SCode different from "just another cipher library": ciphers compose.

A pattern is a string of cipher symbols applied in sequence. Chain them to layer encryption:

encode({ message: "meet me at dawn", pattern: "?|" })
//                                             ││
//                              Enigma ────────┘│
//                              Vigenère ───────┘

Patterns are applied right-to-left (last symbol = innermost encoding), so decoding reverses the order automatically. The response includes a config string with whatever parameters are needed to decode — pass it back verbatim.

SymbolCipherSymbolCipher
$SCSimply (key)|Vigenère
¢SCSimply (key_m)§Frama
@SCSimply (a_num)₢Bacon
¬Morse&Mutation — reciprocity
£Binary~Mutation — decalation
#Polybius:Order — reverse
*Navajo°Order — random
?Enigma

Symbols @, *, # are restricted — they only work at the end of a pattern.

The core is the source of truth for every cipher. The web app and the API both consume it — no duplicated logic.

Tech stack

WebCoreAPICLI
FrameworkReact 18 + ViteTypeScriptNext.js 15commander
StylingTailwind—Tailwindpicocolors
Validation——Zod—
BuildVitetsupNexttsup
Docs——Scalar (OpenAPI)--help

Contributing

Contributions are welcome — new ciphers, docs, bug reports, anything.

  1. Fork the repo
  2. Create a branch (git checkout -b feat/my-cipher)
  3. Commit your changes (git commit -m 'feat: add X cipher')
  4. Push (git push origin feat/my-cipher)
  5. Open a Pull Request

Please follow Conventional Commits.

License

MIT © Zyther Dev


Built with ♥ for cryptography.

TU PRÓXIMO CAPÍTULO

¿Una idea que merece hacerse realidad?
Hagámosla realidad.

Cuéntanos qué tienes en mente. Te ayudaremos a encontrar la dirección técnica adecuada.