Skip to content

Latest commit

 

History

History
134 lines (115 loc) · 5.14 KB

README.md

File metadata and controls

134 lines (115 loc) · 5.14 KB

Foliage

Foliage

Foliage is a cryptocurrency wallet mobile application developed in Flutter, deployed to Android and iOS, using Firebase tooling.

Purpose

This app was created with the intent of learning:

  • Mobile Application UI Development (transitioning from Web-oriented Development experience)
  • Flutter
  • Solidity
  • Firebase integrations with Flutter
    • Firebase Authentication
    • Firebase Cloud Firestore
  • How cryptocurrency amounts are managed in a wallet
  • How cryptocurrency transactions are recorded by a wallet

Definitions & Usage

  • Cryptocurrency Wallet: Utility to store relevant private keys - keeping user-owned cryptocurrencies safe and accessible - and enable sending, receiving and spending cryptocurrencies such as Bitcoin and Ethereum. These utilities can be hardware wallets such as Ledger to mobile apps such as Coinbase Wallet. (From Coinbase Learn)

  • Smart Contract: A smart contract establishes the terms of an agreement, by executing code running on a blockchain such as Ethereum, removing the typical intermediary of banks or lawyers. They enable developers to build apps utilizing blockchain security, reliability, and accessibility while providing sophisticated peer-to-peer functionality, ranging from offerings like loans, insurance, logistics and gaming. (From Coinbase Learn)

  • ERC-20 Token: ERC-20 is a protocol for Ethereum tokens to follow within the larger Ethereum ecosystem, allowing developers to program how new tokens will function in this ecosystem. It also enables developers to accurately predict interaction between tokens, by including how tokens are transferred between addresses and how data within each token is accessed. (From Coinbase Help)

Folder Structure

The /lib folder has been compartmentalized into the following sections:

  1. api:
  2. assets:
  3. components:
  4. constants:
  5. utils:
  6. views:

Cloud Firestore Database Structure

{
    "users": {
        "_type": "Collection",
        "$uid1": {
            "_type": "Document",
            "displayName": "User 1",
            "email": "uid1@email.com",
            "cryptocurrencies": {
                "_type": "Collection",
                "$coin1": {
                    "_type": "Document",
                    "amount": "0.1"
                },
                "$coin2": {
                    "_type": "Document",
                    "amount": "1.0"
                },
            },
            "stocks": {
                "_type": "Collection",
                "$stock1": {
                    "_type": "Document",
                    "amount": "0.8"
                },
                "$stock2": {
                    "_type": "Document",
                    "amount": "4.0"
                },
            }
        },
        "$uid2": {
            "_type": "Document",
            "displayName": "User 2",
            "email": "uid2@email.com",
            "cryptocurrencies": {
                "_type": "Collection",
                "$coin1": {
                    "_type": "Document",
                    "amount": "0.1"
                },
                "$coin2": {
                    "_type": "Document",
                    "amount": "1.0"
                },
            },
            "stocks": {
                "_type": "Collection",
                "$stock1": {
                    "_type": "Document",
                    "amount": "0.8"
                },
                "$stock2": {
                    "_type": "Document",
                    "amount": "4.0"
                },
            }
        },
    },
}

Theming

Theming for the project has been configured via lib/utils/theme.dart, and complies with the color palette as follows:

Color Name Color Hex Code
trueWhite #FFFFFF
trueBlack #000000
offWhite #F1F0EA
charadeBlack #272838
foliageGreen #64B746
errorRed #D10000
materialBlue #448AFF
cadetGrey #5D737E

This color palette is used with the following theme configuration:

Property Light Mode Dark Mode
brightness light dark
background offWhite charadeBlack
onBackground charadeBlack offWhite
error errorRed errorRed
onError trueWhite trueWhite
primary foliageGreen foliageGreen
onPrimary trueWhite trueWhite
secondary materialBlue materialBlue
onSecondary trueWhite trueWhite
surface foliageGreen foliageGreen
onSurface trueWhite trueWhite