An interactive web application for encoding and decoding text using classic cryptographic ciphers. Built for educational purposes to demonstrate fundamental encryption algorithms and clean code principles.
This project was created as a learning exercise as a part of the course '1DV610' at Linnaeus University. It features three classic ciphers: Caesar, Vigenère, and Atbash, allowing users to encode and decode messages with adjustable parameters.
-
Three Classic Ciphers
- Caesar Cipher with adjustable shift values
- Vigenère Cipher with custom keywords
- Atbash Cipher (alphabet reversal)
-
Live Encoding/Decoding
- Real-time output as you type
- Toggle between encode and decode modes
- Preserves case, numbers, and punctuation
-
Interactive Controls
- Intuitive cipher selection dropdown
- Parameter controls (shift buttons, keyword input)
- Frontend: React + TypeScript + Vite
- Testing: Deno (102 comprehensive unit tests)
- Styling: CSS with custom component styling
- Node.js (v18 or higher)
- npm or yarn
- Deno (for running tests)
# Clone the repository
git clone https://github.com/MaxLindquistLnu/L3.git
cd L3
# Install dependencies
npm install
# Start development server
npm run devThe app will be available at http://localhost:5173
# Run all unit tests with Deno
deno test
# Run specific test file
deno test src/__tests__/cipherModuletests/caesar_test.tssrc/
├── components/ # React UI components
│ ├── cipherTool/ # Main cipher tool component
│ ├── button/ # Reusable button component
│ ├── dropdown/ # Cipher selection dropdown
│ └── ...
├── cipherModule/ # Cipher algorithm implementations
│ ├── CaesarCipher.ts
│ ├── VigenereCipher.ts
│ └── AtbashCipher.ts
├── __tests__/ # Test suites
│ ├── cipherModuletests/ # Unit tests
│ └── manualTests/ # Manual testing checklist
└── docs/ # Documentation
├── vision.md
├── requirements.md
└── reflection.md
- Enter your text in the input field
- Select a cipher from the dropdown menu
- Adjust parameters (shift value or keyword)
- Toggle encode/decode mode
- View the result in the output field instantly
- Vision - Project goals and roadmap
- Requirements - Functional and non-functional requirements
- Reflection - Clean Code principles applied
- Manual Tests - Testing checklist
- Additional ciphers (Playfair, Hill, etc.)
- Copy-to-clipboard functionality
- Example presets and tutorials
- Built following principles from "Clean Code" by Robert C. Martin
- Cipher algorithms based on classical cryptography