Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cap-go/capgo

Instant update for capacitor apps
https://github.com/cap-go/capgo

android capacitor cordova ios

Last synced: about 8 hours ago
JSON representation

Instant update for capacitor apps

Awesome Lists containing this project

README

        


Capgo - Instant updates for capacitor

[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo&metric=bugs)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)
![Known Vulnerabilities](https://snyk.io/test/github/Cap-go/capgo/badge.svg)
![GitHub license](https://img.shields.io/github/license/Cap-go/capgo)
[![Bump version](https://github.com/Cap-go/capgo/actions/workflows/bump_version.yml/badge.svg)](https://github.com/Cap-go/capgo/actions/workflows/bump_version.yml)
[![Build source code and send to Capgo](https://github.com/Cap-go/capgo/actions/workflows/build.yml/badge.svg)](https://github.com/Cap-go/capgo/actions/workflows/build.yml)
[![udd-update-dependencies](https://github.com/Cap-go/capgo/actions/workflows/udd.yml/badge.svg)](https://github.com/Cap-go/capgo/actions/workflows/udd.yml)
[![Netlify Status](https://api.netlify.com/api/v1/badges/2ebcdd5c-362b-4135-8fac-9ce872309174/deploy-status)](https://app.netlify.com/sites/webcapgo/deploys)

semantic-release

Commitizen friendly



➡️ Get Instant updates for your App with Capgo 🚀


Fix your annoying bug now, Hire a Capacitor expert 💪




## Features

- ⚡️ Test webapp directly in your phone with native API

- 😃 Share your dev with your teamate

- ↕️ Manage your channels for auto update system.


## Documentation

https://github.com/Cap-go/capacitor-updater/wiki/Capgo-Sandbox-App

- [Changing supabase](supabase/migration_guide.md)

## Plugins

All official plugin are install and preconfigured

- [Action Sheet](https://github.com/ionic-team/capacitor-plugins/tree/main/action-sheet) - Provides access to native Action Sheets.
- [App](https://github.com/ionic-team/capacitor-plugins/tree/main/app) - Handles high level App state and events.
- [App Launcher](https://github.com/ionic-team/capacitor-plugins/tree/main/app-launcher) - Allows to check if an app can be opened and open it.
- [Browser](https://github.com/ionic-team/capacitor-plugins/tree/main/browser) - Provides the ability to open an in-app browser and subscribe to browser events.
- [Camera](https://github.com/ionic-team/capacitor-plugins/tree/main/camera) - Provides the ability to take a photo with the camera or choose an existing one from the photo album.
- [Clipboard](https://github.com/ionic-team/capacitor-plugins/tree/main/clipboard) - Enables copy and pasting to/from the system clipboard.
- [Device](https://github.com/ionic-team/capacitor-plugins/tree/main/device) - Exposes internal information about the device, such as the model and operating system version, along with user information such as unique ids.
- [Dialog](https://github.com/ionic-team/capacitor-plugins/tree/main/dialog) - Provides methods for triggering native dialog windows for alerts, confirmations, and input prompts.
- [Filesystem](https://github.com/ionic-team/capacitor-plugins/tree/main/filesystem) - Provides a NodeJS-like API for working with files on the device.
- [Geolocation](https://github.com/ionic-team/capacitor-plugins/tree/main/geolocation) - Provides simple methods for getting and tracking the current position of the device using GPS, along with altitude, heading, and speed information if available.
- [Haptics](https://github.com/ionic-team/capacitor-plugins/tree/main/haptics) - Provides physical feedback to the user through touch or vibration.
- [Keyboard](https://github.com/ionic-team/capacitor-plugins/tree/main/keyboard) - Provides keyboard display and visibility control, along with event tracking when the keyboard shows and hides.
- [Local Notifications](https://github.com/ionic-team/capacitor-plugins/tree/main/local-notifications) - Provides a way to schedule device notifications locally (i.e. without a server sending push notifications).
- [Motion](https://github.com/ionic-team/capacitor-plugins/tree/main/motion) - Tracks accelerometer and device orientation (compass heading, etc.).
- [Network](https://github.com/ionic-team/capacitor-plugins/tree/main/network) - Provides network and connectivity information.
- [Push Notifications](https://github.com/ionic-team/capacitor-plugins/tree/main/push-notifications) - Provides access to native push notifications.
- [Screen Reader](https://github.com/ionic-team/capacitor-plugins/tree/main/screen-reader) - Provides access to TalkBack/VoiceOver/etc. and Provides simple text-to-speech capabilities for visual accessibility.
- [Share](https://github.com/ionic-team/capacitor-plugins/tree/main/share) - Provides methods for sharing content in any sharing-enabled apps the user may have installed.
- [Splash Screen](https://github.com/ionic-team/capacitor-plugins/tree/main/splash-screen) - Provides methods for showing or hiding a Splash image.
- [Status Bar](https://github.com/ionic-team/capacitor-plugins/tree/main/status-bar) - Provides methods for configuring the style of the Status Bar, along with showing or hiding it.
- [Storage](https://github.com/ionic-team/capacitor-plugins/tree/main/storage) - Provides a simple key/value persistent store for lightweight data.
- [Text Zoom](https://github.com/ionic-team/capacitor-plugins/tree/main/text-zoom) - Provides the ability to change Web View text size for visual accessibility.
- [Toast](https://github.com/ionic-team/capacitor-plugins/tree/main/toast) - Provides a notification pop up for displaying important information to a user. Just like real toast!

## Dev contribution

### Coding Style

- Use Composition API with [`` SFC syntax](https://github.com/vuejs/rfcs/pull/227)
- [ESLint](https://eslint.org/) with [@antfu/eslint-config](https://github.com/antfu/eslint-config), single quotes, no semi.

### Dev tools

- [TypeScript](https://www.typescriptlang.org/)
- [bun](https://bun.sh/) - fast javascipt runtime, package manager, bundler, test runner an all-in-one toolkit
- [critters](https://github.com/GoogleChromeLabs/critters) - Critical CSS
- [Cloudflare](https://www.cloudflare.com/) - zero-config deployment
- [VS Code Extensions](./.vscode/extensions.json)
- [Vite](https://marketplace.visualstudio.com/items?itemName=antfu.vite) - Fire up Vite server automatically
- [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) - Vue 3 `<script setup>` IDE support
- [Iconify IntelliSense](https://marketplace.visualstudio.com/items?itemName=antfu.iconify) - Icon inline display and autocomplete
- [i18n Ally](https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally) - All in one i18n support
- [Windi CSS Intellisense](https://marketplace.visualstudio.com/items?itemName=voorjaar.windicss-intellisense) - IDE support for Windi CSS
- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)

## Usage

### Deploy on Cloudflare Pages

use the CLI to deploy preprod

```bash
bun run dev-build
# then deploy
bun run deploy:cloudflare_frontend:preprod
```

or Prod

```bash
bun run build
# then deploy
bun run deploy:cloudflare_frontend:prod
```

### Development

You will need to start each local server in separate terminals.

Before you continue, you need to have these installed:
- [Docker](https://www.docker.com/)
- [bun](https://bun.sh/)
- [Supabase CLI](https://supabase.com/docs/guides/cli)

You can install the `supabase` CLI globally with `bun install supabase -g` and you can invoke `supabase` from anywhere.

Alternatively, you can install the CLI inside this repo with `bun install supabase --save-dev` but to invoke it use: `./node_modules/supabase/bin/supabase`.

The rest of this guide assumes that you installed the `supabase` CLI globally.

#### Start Supabase DB Locally

Start the Supabase DB:
```bash
supabase start
```

If the command completed successfully, your console output should be similar to the output below:
```bash
Started supabase local development setup.

API URL: http://localhost:54321
GraphQL URL: http://localhost:54321/graphql/v1
DB URL: postgresql://postgres:postgres@localhost:54322/postgres
Studio URL: http://localhost:54323
Inbucket URL: http://localhost:54324
JWT secret: super-secret-jwt-token-with-at-least-32-characters-long
anon key: xxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXx.xxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXx
service_role key: xxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXx.xxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxXxxxxxXxxxxxX
```

#### Start Supabase DB and Functions Locally

You need make sure Docker is running.
```bash
bun install
bun backend
```

#### Start Frontend Locally

Before starting the frontend, make sure you replace the value of `supa_anon.local` inside the file `configs.json` with the value of `anon key`. If `supabase` is already running, you can also obtain `anon key` from the output of `supabase status`.

In another terminal, run the server with the necessary Netlify functions:

```bash
bun serve
```

#### Login

Visit http://localhost:5173

There are two login credentials you can use:

| Account | Username | Password |
|---------|----------|----------|
| Demo User | [email protected] | testtest |
| Admin User | [email protected] | adminadmin |

The *demo user* account has some demo data in it.
If the data is not fresh just reset the db with `supabase db reset`. The seed has been made in the way the data is always fresh.

The *admin user* has admininstrative rights so he can impersonate other users.
You can find the menu for that in the account section.

#### Supabase DB Reset

Make sure you have Docker running.

This will seed the DB with demo data again.
```bash
supabase db reset
```

### Deploy Supabase self hosted

To deploy the supabase instance self hosted, use the [Supabase offical guide](https://supabase.com/docs/guides/self-hosting).

### Deploy Supabase cloud

To deploy the supabase instance on cloud, you need a paid account at $25/month.

Link the project to the cloud with the following command:

```bash
supabase link
```
https://supabase.com/docs/reference/cli/supabase-link

Then you need to push the migrations to the cloud with the following command:

```bash
supabase db push --linked
```
https://supabase.com/docs/reference/cli/supabase-migration-up

And seed the DB with demo data:

```bash
supabase seed buckets
```
https://supabase.com/docs/reference/cli/supabase-seed-buckets

Seed the secret for functions:

```bash
supabase secrets set --env-file supabase/functions/.env
```

Push the functions to the cloud:

```bash
supabase functions deploy
```

### Build

To build the webApp in mobile, to push to store, run

```bash
bun install
bun mobile
```

And you will see the generated file in `dist` that ready to be served.