Skip to content

samdaw13/EnigmaProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

186 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enigma Machine

A React Native TypeScript app simulating a historical Enigma cipher machine. Users configure rotors and a plugboard, then type on a keyboard to encrypt and decrypt messages.

Prerequisites

  • Node.js (v16 or later recommended)
  • React Native CLI environment set up for your target platform (Android and/or iOS)
  • For Android: Android Studio with an emulator or a connected device
  • For iOS (macOS only): Xcode with CocoaPods installed

Setup

  1. Clone the repository:

    git clone https://github.com/<your-username>/EnigmaProject.git
    cd EnigmaProject
  2. Install dependencies:

    npm install
  3. For iOS, install CocoaPods:

    cd ios && pod install && cd ..

Running the App

Start the Metro bundler:

npm run start

Then, in a separate terminal, build and run on your target platform:

# Android
npm run android

# iOS
npm run ios

Testing

Run all tests:

npm test

Run a specific test file:

npm test -- --testPathPattern=<pattern>

Linting and Formatting

Type-check and lint:

npm run lint

Auto-fix lint issues:

npm run lint:fix

Format with Prettier and fix lint issues:

npm run format

Project Structure

src/
├── components/pages/machine/   # Main Enigma interface (keyboard + settings)
├── constants/                  # UI strings (labels) and testID selectors
├── features/                   # Redux slices (rotors, plugboard, reflector)
├── store/                      # Redux store configuration
├── styles/                     # Shared StyleSheet definitions
├── types/                      # TypeScript interfaces
└── utils/                      # Test utilities

Architecture

  • Navigation: Drawer navigator with screens for the Enigma Machine, Break Cipher, About, and Settings. The Machine screen uses a nested Stack navigator.
  • State management: Redux Toolkit with slices for rotors, plugboard, and reflector.
  • Keyboard layout: Follows the historical German Enigma layout — QWERTZUIOP / ASDFGHJKL / YXCVBNM.

About

React Native Application simulating an Enigma device

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors