Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/numbersprotocol/capture-lite
A photo-sharing app with only verifiable photos and videos.
https://github.com/numbersprotocol/capture-lite
Last synced: about 9 hours ago
JSON representation
A photo-sharing app with only verifiable photos and videos.
- Host: GitHub
- URL: https://github.com/numbersprotocol/capture-lite
- Owner: numbersprotocol
- License: gpl-3.0
- Created: 2020-06-01T02:57:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-10-28T11:06:45.000Z (10 days ago)
- Last Synced: 2024-10-28T14:28:24.490Z (10 days ago)
- Language: TypeScript
- Homepage: https://numbersprotocol.github.io/
- Size: 31.7 MB
- Stars: 25
- Watchers: 8
- Forks: 6
- Open Issues: 503
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Capture Lite
| branch | build | coverage | quality |
| :-----: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| master | [![build](https://github.com/numbersprotocol/capture-lite/workflows/build/badge.svg)](https://github.com/numbersprotocol/capture-lite/actions?query=workflow%3Abuild) | [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/45ae18aaa6a7474497e0efd818452a46)](https://www.codacy.com/gh/numbersprotocol/capture-lite?utm_source=github.com&utm_medium=referral&utm_content=numbersprotocol/capture-lite&utm_campaign=Badge_Coverage) | [![Codacy Badge](https://app.codacy.com/project/badge/Grade/45ae18aaa6a7474497e0efd818452a46)](https://www.codacy.com/gh/numbersprotocol/capture-lite?utm_source=github.com&utm_medium=referral&utm_content=numbersprotocol/capture-lite&utm_campaign=Badge_Grade) |
| develop | [![build](https://github.com/numbersprotocol/capture-lite/workflows/build/badge.svg?branch=develop)](https://github.com/numbersprotocol/capture-lite/actions?query=workflow%3Abuild) | [![Codacy Badge](https://app.codacy.com/project/badge/Coverage/45ae18aaa6a7474497e0efd818452a46?branch=develop)](https://www.codacy.com/gh/numbersprotocol/capture-lite?utm_source=github.com&utm_medium=referral&utm_content=numbersprotocol/capture-lite&utm_campaign=Badge_Coverage) | [![Codacy Badge](https://app.codacy.com/project/badge/Grade/45ae18aaa6a7474497e0efd818452a46?branch=develop)](https://www.codacy.com/gh/numbersprotocol/capture-lite?utm_source=github.com&utm_medium=referral&utm_content=numbersprotocol/capture-lite&utm_campaign=Badge_Grade) |## Getting Started
Node 16.2.0+ and NPM 7.13.0+ is required.
Install the dependencies.
```bash
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`:
```txt
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.
```bash
npm run serve
```## Development
Start a local dev server for app dev/testing.
```bash
npm run serve
```Run tests.
```bash
npm run test
```Run tests in headless mode.
```bash
npm run test.ci
```Lint the projects.
```bash
npm run lint
```[Update `cordova-res` (splash screens and launcher icons)](https://capacitorjs.com/docs/guides/splash-screens-and-icons).
```bash
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](https://code.visualstudio.com/) with workspace settings for consistent coding style.
- Use [Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) to auto format on save.
- Prefer `Promise` than `Observable` when only emitting one value. See [issue #233](https://github.com/numbersprotocol/capture-lite/issues/233).
- Avoid using `toPromise()` to convert `Observable` to `Promise` as [it is an anti-pattern](https://stackoverflow.com/a/49596716/8789738).### 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`.
```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.
```bash
npm run build
npx cap sync android
```Open the project in Android Studio.
```bash
npx cap open android
```The script does the same thing for you.
```bash
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)](https://miro.com/app/board/o9J_knEiIYo=/?moveToWidget=3458764542656055086&cot=14).
Some nodes below:
Bump version in `package.json`.
```json
{
"version": "a.b.c"
}
```Bump version in `android/app/build.gradle`.
```gradle
android {
defaultConfig {
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.
1. Publish the app to Play Console on alpha track and Apple Store.
1. Send notification to the private `reminder-releases` slack channel.