ialexies / caesarcipher

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Caesar Cipher Mobile App

In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher, Caesar's code or Caesar shift, is one of the simplest and most widely known encryption techniques.

Watch the video

Purpose & Goal

This project will serve as demo app for assestment and portfolio of the developer. Future updates will be applied and will be hosted in playstore. The goal is create an app that processes two flows in two different pages, using APIs.

  • Generates random words, then encodes them using the caesar cipher
  • Generates an encoded sentence showing the shift, an asks the user to decode i

Mockup

Flow Chart

How to Use the App

Step 1: Enter the number of words that you want to be encoded. The words is automatically generated together with a random shift alt text

Step 2: Click the button Checker below to go to the checker feature then click the button Generate Code

Step 3: Type the your answer to the textbox at the right side then click Validate

alt text

The result will be shown below alt text

Up-Coming Features:

  • Separate App for Generating Code and Checking
  • Custom Words to encrypt
  • Encoded phrases will be saved in a local storage

Libraries & Tools Used

API

Project Management Tool

Folder Structure

Here is the core folder structure which flutter provides.

flutter-app/
|- android
|- build
|- ios
|- lib
|- test

Here is the folder structure we have been using in this project

lib/
|- app/
|- main.dart
|- locator.dart
|- cipher_notifier.dart

lib/app/
|- components/
|- constants/
|- data/
|- modules/
|- routes/

Now, lets dive into the lib folder which has the main code for the application.

1- constants - All the application level constants are defined in this directory with-in their respective files. This directory contains the constants for `theme`, `dimentions`, `api endpoints`, `preferences` and `strings`.
2- data - Contains the data layer of your project, includes directories for local, network and shared pref/cache.
3- stores - Contains store(s) for state-management of your application, to connect the reactive data of your application with the UI. 
4- ui — Contains all the ui of your project, contains sub directory for each screen.
5- util — Contains the utilities/common functions of your application.
6- widgets — Contains the common widgets for your applications. For example, Button, TextField etc.
7- routes.dart — This file contains all the routes for your application.
8- main.dart - This is the starting point of the application. All the application level configurations are defined in this file i.e, theme, routes, title, orientation etc.

Constants

This directory contains all the application level constants. A separate file is created for each type as shown in example below:

constants/
|- app_theme.dart
|- dimens.dart
|- endpoints.dart
|- preferences.dart
|- strings.dart

Data

All the business logic of your application will go into this directory, it represents the data layer of your application. It is sub-divided into three directories local, network and sharedperf, each containing the domain specific logic. Since each layer exists independently, that makes it easier to unit test. The communication between UI and data layer is handled by using central repository.

data/
|- local/
    |- constants/
    |- datasources/
    |- app_database.dart
   
|- network/
    |- constants/
    |- exceptions/
    |- rest_client.dart
    
|- sharedpref
    |- constants/
    |- shared_preference_helper.dart
    
|- repository.dart

About


Languages

Language:Dart 89.1%Language:HTML 9.5%Language:Swift 1.0%Language:Kotlin 0.3%Language:Objective-C 0.1%