Skip to content

Post texts which are randomly encrypted, and let others guess the result. Begin the hunt of cracking the ciphers.

Notifications You must be signed in to change notification settings

anikait1/cipher-hunt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cipher Hunt

Begin the hunt of cracking the ciphers. Post text and let others guess it. Characters(only english alphabets are supported as of now) of the text are randomly interchanged, users are provided with hints(character mapping for top 3 frequent characters) and they can make their guess based on it.

Getting Started

It is assumed you have node and npm installed on your machine. For instructions on installing node, visit here.

cd cipher-hunt
npm install
npm run dev

Project Structure

Traditional web apps are organized in MVC pattern, while the project is based on the same pattern, the directory structure is little different.

  ├── resources                                     # Each entity is modeled as a resource
  │   ├── <resource name>                           # Resources have following files associated with them
  │       ├── <resource name>.model.js              # Model
  │       ├── <resource name>.controller.js         # Controller (CRUD operations and middleware)
  |       ├── <resource name>.route.js              # Routes and middleware configuration
  ├── utils                                         # Handful utils such as auth and textEncryption
  |   ├── auth.js                                   # Authentication related middleware and operations
  |   ├── textEncryption.js                         # Character shuffling and hints mapping
  ├── index.js                                      # Starting point of the app

API Endpoints

  GET, POST     /ciphers
  GET           /ciphers/:id
  
  GET, POST     /ciphers/:id/guess
  PATCH         /ciphers/:id/guess/:guessId
  
  POST          /user/sign-up
  POST          /user/sign-in
  GET           /user/:id/ciphers
  GET           /user/me

About

Post texts which are randomly encrypted, and let others guess the result. Begin the hunt of cracking the ciphers.

Resources

Stars

Watchers

Forks