This is a simple web application where you are challenged to decrypt substitution ciphers. You will be given random quotes to decrypt, where each letter has been replaced with a random substitute letter.
The application presents you with an encrypted quote where:
- Each letter of the alphabet has been randomly substituted with another letter
- You can see the encrypted text with each letter displayed in its own input field
- Your goal is to figure out the correct letter substitutions to reveal the original quote
- Interactive Decryption: Click on any letter input field to start decrypting
- Keyboard Navigation: Use arrow keys to move between letters
←/→- Move between letters within a wordCtrl + ←/Ctrl + →- Jump between wordsHome/↑- Jump to the first letterEnd/↓- Jump to the last letter
- Visual Feedback:
- Selected letters are highlighted in cyan for easy tracking
- Focused input fields have purple borders and background
- Conflicting substitutions (same letter used twice) are highlighted in red/orange
- Successfully solved quotes turn all letters green
- Used Letters Tracker: Visual indicator showing which letters you've already used and which are still available
- Real-time Validation: Automatic detection when you've successfully decrypted the entire quote
- Real-time Updates: All input fields update automatically when you make substitutions
- Built with Vue 3 and TypeScript
- Uses Tailwind CSS for styling
- Powered by Vite for fast development
- Package management with Bun
- Features a collection of inspirational quotes for decryption practice
- Bun package manager
bun installbun devbun run buildThe application can be easily deployed using Docker for consistent environments across different systems.
Build and start the application
docker compose up --buildThe application will be available at http://localhost:3000
Build the Docker image and run the container
docker build -t decrypt-quote .
docker run -p 3000:3000 decrypt-quoteThe application includes a Python script (parse_quotes.py) for fetching and managing quote data from the FavQs API.
- Automated Quote Fetching: Retrieves quotes from the FavQs API
- Smart Validation: Filters quotes based on word count (15-50 words)
- Data Processing: Converts API responses to the required format
- Progress Tracking: Shows real-time progress during fetching
- Get API Token: Sign up at FavQs to get your API token
- Create Environment File: Create a
.envfile in the project root:FAVQS_TOKEN=your_api_token_here
- Install Dependencies: The script uses
requestsandpython-dotenv:pip install requests python-dotenv
uv run parse_quotes.pyThe script will:
- Fetch quotes from multiple pages of the FavQs API
- Validate each quote for appropriate length
- Save valid quotes to
src/data/quotes.json - Display progress information during the process
You can modify these constants in parse_quotes.py:
QUOTES_TO_FETCH: Total number of quotes to collect (default: 1000)QUOTE_MAX_WORDS: Maximum words per quote (default: 50)QUOTE_MIN_WORDS: Minimum words per quote (default: 15)
- Start: Launch the application and you'll see an encrypted quote with substituted letters
- Select: Click on any letter input field to begin decrypting
- Type: Enter the letter you think it should be
- Navigate: Use arrow keys to move between letters quickly
- Track Progress:
- Watch the "Used Letters" section to see which letters are still available
- Red/orange highlights warn you about conflicting substitutions
- Solve: Continue until all letters turn green - you've successfully decrypted the quote!
- Next Challenge: Click "Get Next Quote" to try a new puzzle (you'll be asked to confirm)
- Start with patterns: Look for common letter patterns (like "the", "and", "or")
- Single letters: Pay attention to single-letter words (usually "a" or "i")
- Letter frequency: Consider the frequency of letters in English (e, t, a, o, i, n are most common)
- Use the tracker: Check the "Used Letters" section to see which letters are still available
- Watch for conflicts: Red/orange highlights indicate you've used the same letter twice - fix these first
- Context clues: Use the quote's meaning and grammar to guide your substitutions
- Systematic approach: Try to solve common words first, then use those letters to solve other words
Enjoy decrypting and improving your cipher-solving skills while discovering inspiring quotes and wisdom from various authors!