Giter Site home page Giter Site logo

numbersprotocol / capture-lite Goto Github PK

View Code? Open in Web Editor NEW
25.0 8.0 8.0 32.47 MB

A photo-sharing app with only verifiable photos and videos.

Home Page: https://numbersprotocol.github.io/

License: GNU General Public License v3.0

JavaScript 0.35% TypeScript 81.51% HTML 9.97% Java 0.34% Swift 0.50% Ruby 0.29% SCSS 7.04% Shell 0.01%

capture-lite's Introduction

Capture Lite

Get it on Google Play Get it on Google Play

branch build coverage quality
master build Codacy Badge Codacy Badge
develop build Codacy Badge Codacy Badge

Getting Started

Node 16.2.0+ and NPM 7.13.0+ is required.

Install the dependencies.

npm i

Set the system environment variables NUMBERS_STORAGE_BASE_URL, NUMBERS_STORAGE_TRUSTED_CLIENT_KEY, NUMBERS_BUBBLE_DB_URL, BUBBLE_API_URL and APPS_FLYER_DEV_KEY before building the app by appending the following string in ~/.profile:

export NUMBERS_STORAGE_BASE_URL="THE PRIVATE BASE URL"
export NUMBERS_STORAGE_TRUSTED_CLIENT_KEY="THE TRUSTED CLIENT KEY"
export NUMBERS_BUBBLE_DB_URL="THE BUBBLE DB URL"
export BUBBLE_API_URL="BUBBLE API URL"
export APPS_FLYER_DEV_KEY="APPS FLYER DEV KEY

Preview the app in web browser.

npm run serve

Development

Start a local dev server for app dev/testing.

npm run serve

Run tests.

npm run test

Run tests in headless mode.

npm run test.ci

Lint the projects.

npm run lint

Update cordova-res (splash screens and launcher icons).

cordova-res android --skip-config --copy

Contribution

  • Run npm run lint before each commit.
  • The committed codes should pass all GitHub checks.
  • Use Visual Studio Code with workspace settings for consistent coding style.
  • Use Prettier extension to auto format on save.
  • Prefer Promise than Observable when only emitting one value. See issue #233.
  • Avoid using toPromise() to convert Observable to Promise as it is an anti-pattern.

Platform

Android

If your operating system is Linux, set the environment variable CAPACITOR_ANDROID_STUDIO_PATH for your Android Studio. The default value is /usr/local/android-studio/bin/studio.sh.

export CAPACITOR_ANDROID_STUDIO_PATH="/home/username/android-studio/bin/studio.sh"

Before running the app with Android Studio, build and sync the dependencies and web assets.

npm run build
npx cap sync android

Open the project in Android Studio.

npx cap open android

The script does the same thing for you.

npm run build.android

Caveat

  • This app is still in the experimental stage.
  • This app uses raw file system to save proofs, and thus the performance is not optimized.

Release

See the Capture App release flow (Miro).

Some nodes below:

Bump version in package.json.

{
  "version": "a.b.c"
}

Bump version in android/app/build.gradle.

android {
    defaultConfig {
        versionCode <versionCode++>
        versionName "a.b.c"
    }
}

Run npm i to update package-lock.json.

Write the changelog in CHANGELOG.md.

When push to the master branch with new version tag, GitHub Action would automatically do the following jobs:

  1. Create release GitHub page with debug APK.
  2. Publish the app to Play Console on alpha track and Apple Store.
  3. Send notification to the private reminder-releases slack channel.

capture-lite's People

Contributors

b07902011 avatar bafu avatar cs6 avatar dependabot-preview[bot] avatar dependabot[bot] avatar ethanwu155 avatar olgahaha avatar ruizehung avatar seanwu1105 avatar shc261392 avatar sultanmyrza avatar sultanmyrza-numbersprotocol avatar tammyyang avatar vincent10400094 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

capture-lite's Issues

Improve Coverage

Improve the test coverage to 60%.

  • Add tests for app/utils- The utils should be purely functional without side-effects, and thus it would be easy to write tests.
  • Add tests for app/services- Need to mock Capacitor Plugins (e.g. Filesystem and Storage) and Networking services.
  • (Optional) Add tests for app/pages- Test the methods of the page component only to save time.

Update metadata dialogue view

Concept
If we make the metadata dialogue view more user friendly

Reason/Hypothesis

We can help users understand what these metadata mean

Refactor Architecture to Follow Numbers Protocol

The variable and data flow should completely follow the definitions from the Numbers Protocol spec. It might be helpful to extract the data flow into a separate and independent library. Thus, the implementation will NOT be coupled with the GUI framework.

This requires a relatively long time to resolve.

Generate Coverage

Currently, Karma does not generate the coverage reports in the /coverage folder but I do not know why. After we enable the creation of the reports, we should upload it to the Codacy.

Capture Wall

Implement the UI for Capture/Post Capture Wall.

Screenshot from 2020-10-29 12-15-18

Screenshot from 2020-10-29 12-26-34

Add privacy settings

Concept

! Need feature clarification

If we provide [feature]

Reason/Hypothesis

We can help [who] to [benefit] or solve [problem] because we know [who] are [faced about our target].

More Description (if any)

Put more description here to support the concept.

Suggested Implementation (if any)

Put some suggested implementation here if you already have some ideas in mind.

Categorize photos by creation date

(WIP)

Update Purpose

Write the purpose of UI update here.

UI Suggestion

Put images or link to the contents of suggestions.

More Description (if any)

Put more description here to help developers understand.

Can upload data to dashboard

Concept

If we allow users to upload data to dashboard.

Reason/Hypothesis

We can help users manage their own data and get the certificate.

More Description (if any)

Put more description here to support the concept.

Suggested Implementation (if any)

Put some suggested implementation here if you already have some ideas in mind.

繁體中文尚未完成

Description

語系設定調整成中文點選後還顯示英文

Steps to Reproduce

  1. Go to 'setting' page
  2. Click on 'languages'
  3. Click on ' 繁體中文 '
    依然顯示英文

Expected Behavior

  • Expected: 語系設定調整成中文點選後還顯示中文
  • Actual: 語系設定調整成中文點選後還顯示英文

Environment

  • Version: 0.3.0
  • OS: Android 8
  • Device: HTC Exodus 1s

Discuss with designer and get UI update

Update Purpose

Make the app more beautiful

UI Suggestion

Not yet, the objective of this issue is to get the suggestion.

More Description (if any)

Put more description here to help developers understand.

UI Components Library

  • Replace Ionic UI components with Angular-Material UI component library.
  • Maintain only one and non-native style.
  • Maintain only light theme.
  • Rebuild storage page.
  • Rebuild settings page.
  • Rebuild proof page.
  • Rebuild login page.
  • Rebuild signup page.
  • Rebuild information page.

UX for privacy settings

(WIP)

Update Purpose

Write the purpose of UI update here.

css

UI Suggestion

Put images or link to the contents of suggestions.

More Description (if any)

Put more description here to help developers understand.

Google Play Console warns about obfuscated code and suggests uploading a file for deobfuscation

Description

It's not a bug of the App functionality, but a warning from Play Console indicates that retrieving information for debugging from the App might be difficult if no action taken to fix this issue. I'm not sure about where and how could the stack trace be viewed from a released App, so the importance of this issue is still to be determined.

When uploading a release-build signed bundle to Google Play Console, it presents the following warning:

這個 App Bundle 含有可能經過模糊處理的 Java/Kotlin 程式碼。為了方便系統分析並找出您的當機和 ANR 問題,我們建議您上傳去模糊化檔案。

And a reference to the doc: https://developer.android.com/studio/build/shrink-code#decode-stack-trace

However, Android Studio doesn't generate a mapping.txt file in <module- name>/build/outputs/mapping/<build-type>/ as the document says when generating a signed bundle.

Steps to Reproduce

  1. Generate Signed Bundle/APK
  2. Choose Bundle
  3. Choose release build
  4. Upload the app-release.aab file to Play Console

Expected Behavior

  • Expected: There should be no warning in the Play Console
  • Actual: The warning appears in the Play Console

Logs

See above

Environment

  • Android Studio version: 4.0.1
  • Android SDK version: Android 10.0 (API level 29)
  • Gradle version: 6.1.1
  • Capture Lite source code version: v0.4.1

┆Issue is synchronized with this Asana task by Unito

[bug] 使用0.4.1& 0.3.0 兩個版本的app 皆無法正常於dashboard 上正常顯示相片

Description

使用0.4.1& 0.3.0 兩個版本的app 皆無法正常於dashboard 上正常顯示相片

Steps to Reproduce

  1. 安裝app (0.3.0 or 0.4.1)
  2. 登入 "[email protected]" 帳號
    3.Click on '相機' 拍照
    4.. 點選相片 並按下上傳按鍵
  3. https://numbersprotocol.io/version-test/dia-service 登入"[email protected]" 帳號
    6.會顯示剛剛上傳的資訊但並不會顯示圖片

image
image

Environment

  • Version: 0.3.0 &0.4.1
  • OS: Android 8
  • Device: HTC Exodus 1s

Create data schema

Concept

If we create data schema for the App

Reason/Hypothesis

We can help dashboard and backend developers know how to develop API or database better.

Add certificate viewer

Concept

If we provide a way to view the media certificate on the App, the user could view the certificate without using the dashboard from an external browser.

Reason/Hypothesis

We can help [who] to [benefit] or solve [problem] because we know [who] are [faced about our target].

More Description (if any)

  1. Can view and download certified_media (image with QR code embedded)
  2. Can get certificate (dashboard) link

Suggested Implementation (if any)

Put some suggested implementation here if you already have some ideas in mind.

┆Issue is synchronized with this Asana task by Unito

Add Login & Signup pages

(WIP)

Concept

If we provide [feature]

Reason/Hypothesis

We can help [who] to [benefit] or solve [problem] because we know [who] are [faced about our target].

More Description (if any)

Put more description here to support the concept.

Suggested Implementation (if any)

Put some suggested implementation here if you already have some ideas in mind.

Launch open beta of Capture Lite in iOS

  • Build in iOS
  • Require an Apple (Numbers) official account
  • Require an environment to build iOS
  • Require an iPhone registered under the (Numbers) official account
  • Implement the license page

[bug]can't login numbers storage

Description

can't login numbers storage .

Steps to Reproduce

  1. Go to 'setting page'
  2. Scroll down to 'publisher'
  3. Click on 'numbers storage'
  4. Go to 'login page'
  5. 狀況一 : no show email & password input box (操作10次6次會發生 )
  6. 狀況二 : show error {"non_field_errors":["unable to log in with provided credentials."}

Expected Behavior

  • Expected: can login
  • Actual:狀況一 : no show email & password input box (操作10次6次會發生 )
    狀況二 : show error {"non_field_errors":["unable to log in with provided credentials."}

Logs

Screenshot_20200820-110801
Screenshot_20200820-122423

Environment

  • Version: v0.2.0
  • OS: Android 8.1.0
  • Device: HTC Exodus 1_

Add information provider toggle

Concept
If we ass information-provider toggles in the preference

Reason/Hypothesis

User can choose to enable/disable the provider seperately

Add Settings and drawer

(WIP)

Concept

If we provide [feature]

Reason/Hypothesis

We can help [who] to [benefit] or solve [problem] because we know [who] are [faced about our target].

More Description (if any)

Put more description here to support the concept.

Suggested Implementation (if any)

Put some suggested implementation here if you already have some ideas in mind.

Login

Concept

If we provide a feature to login

Reason/Hypothesis

We can help users to use the same account and upload data to dashboard

Poor Performance on Mobile Device

Extremely poor performance on mobile devices. Need time to investigate the root cause.

  • It is highly possible that the Filesystem on the Android device is not fast enough to rapidly query multiple times.
    • Possible fix: merge the information tuples into a large json file.
    • Possible fix: use sqlite instead.
  • Media data use base64 encoding to pass around instead of file object with source URI.

Roadmap

  • Use <img /> instead of <ion-img> for better performance.
  • Merge the information tuples into a large json file. This require new "equal" class to check the equality. Greatly add complexity.
  • Call Storage.refresh$() only on initialization.
    • Remove calling Storage.refresh$() on Storage.add$().
    • Remove calling Storage.refresh$() on Storage.remove$(). This require new "equal" class to check the equality. Greatly add complexity.
  • Generate the thumbnail of the media asset on captured.

Cannot Take New Photos After App Uses Up Android Device Memory

After the app contains multiple proofs, the app will be killed when taking new photos due to insufficient memory. Thus, after the the app recreated by Android, users will find out that the app does not store the new photo. This issue could be mitigate after #46 is resolved but that is not a complete solution.

Update dashboard

Concept

If we update dashboard from intern-camp to a bd version

Reason/Hypothesis

We can help bd have more materials to discuss with customers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.