Skip to content

Cap-go/capgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Capgo - Instant updates for capacitor

Bugs Security Rating Maintainability Rating Code Smells Lines of Code Technical Debt Reliability Rating Duplicated Lines (%) Vulnerabilities Known Vulnerabilities GitHub license Bump version Build source code and send to Capgo udd-update-dependencies Netlify Status semantic-release Commitizen friendly



Features

  • ⚡️ Test the web app directly on your phone using the native API

  • 😃 Share your new features with your teammates

  • ↕️ Manage your channels for auto-update system


Documentation

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

Plugins

All the following official plugins are already installed and pre-configured:

  • Action Sheet - Provides access to native Action Sheets.
  • App - Handles high level App state and events.
  • App Launcher - Allows to check if an app can be opened and open it.
  • Browser - Provides the ability to open an in-app browser and subscribe to browser events.
  • Camera - Provides the ability to take a photo with the camera or choose an existing one from the photo album.
  • Clipboard - Enables copy and pasting to/from the system clipboard.
  • Device - Exposes internal information about the device, such as the model and operating system version, along with user information such as unique ids.
  • Dialog - Provides methods for triggering native dialog windows for alerts, confirmations, and input prompts.
  • Filesystem - Provides a NodeJS-like API for working with files on the device.
  • 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 - Provides physical feedback to the user through touch or vibration.
  • Keyboard - Provides keyboard display and visibility control, along with event tracking when the keyboard shows and hides.
  • Local Notifications - Provides a way to schedule device notifications locally (i.e. without a server sending push notifications).
  • Motion - Tracks accelerometer and device orientation (compass heading, etc.).
  • Network - Provides network and connectivity information.
  • Push Notifications - Provides access to native push notifications.
  • Screen Reader - Provides access to TalkBack/VoiceOver/etc. and Provides simple text-to-speech capabilities for visual accessibility.
  • Share - Provides methods for sharing content in any sharing-enabled apps the user may have installed.
  • Splash Screen - Provides methods for showing or hiding a Splash image.
  • Status Bar - Provides methods for configuring the style of the Status Bar, along with showing or hiding it.
  • Storage - Provides a simple key/value persistent store for lightweight data.
  • Text Zoom - Provides the ability to change Web View text size for visual accessibility.
  • Toast - Provides a notification pop up for displaying important information to a user. Just like real toast!

Dev contribution

Coding Style

Dev tools

Usage

Capgo is deployed to production on Cloudflare workers, Netlify and Supabase.

Cloudflare workers take 99% of the traffic. Supabase is used for internal calls, for internal tasks such as CRON jobs that call functions. Netlify is used only as a backup for Cloudflare.

When self-hosted, installing only Supabase is sufficient.

Deploy on Cloudflare Pages

Use the CLI to deploy to preprod

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

or Prod

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

Development

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

Before continuing, ensure you have the following installed:

You can install the supabase CLI globally with bun install supabase -g and you'll be able to invoke supabase from anywhere.

Alternatively, you can install the supabase CLI locally with bun install supabase --save-dev but, to invoke it, you have to use: ./node_modules/supabase/bin/supabase.

In the following guideline, we will assume that you have installed the supabase CLI globally.

Start Supabase DB Locally

Start the Supabase DB:

supabase start

If the command is completed successfully, your console should output:

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

Seed Supabase DB locally

[!WARNING] ⚠️ Ensure Docker is running.

supabase db reset

Start Frontend locally

bun install
bun serve:dev

Login

Visit http://localhost:5173

There are two login credentials you can use:

Account Username Password
Demo User test@capgo.app testtest
Admin User admin@capgo.app 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 a way that ensures the data is always fresh.

The admin user account has administration rights so the user can impersonate other users. You can find the interface for that in the "Account" section.

Supabase DB Reset

[!WARNING] ⚠️ Ensure Docker is running.

This will seed the DB with demo data.

supabase db reset

Deploy Supabase self hosted

To deploy the supabase instance in self-hosted, use the Supabase official guide.

Deploy Supabase cloud

To deploy the Supabase instance on cloud, you need a paid account, which costs $25/month.

Link the project to the cloud with the following command:

supabase link

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

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

supabase db push --linked

https://supabase.com/docs/reference/cli/supabase-migration-up

And seed the DB with demo data:

supabase seed buckets

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

Seed the secret for functions:

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

Push the functions to the cloud:

supabase functions deploy

Build

To build the web app in mobile, in order to push to mobile stores, run:

bun install
bun mobile

And you will see the generated files in the dist directory, ready to be served on stores.

About

Instant update for capacitor apps

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Contributors 26