Skip to content

Dosbodoke/chooselife

Repository files navigation

Chooselife

Mobile and WEB apps made for Highliners

Project structure

.
├── expo # Mobile app, most of the development is going her
├── next # Web app where all started
├── supabase # Local supabase instance
├── packages # Shared packages between projects

For informations on how to run each project check their respectives README.md

Environment Setup

These instructions cover the setup for the Supabase backend. After setting up Supabase, follow the instructions to setup the clients

  • 📱 expo in the expo/README.md
  • 🌐 NextJS in the next/README.md

Supabase Configuration

First of all, install the CLI

  • Supabase CLI (npm install -g supabase)

Supabase serves as the project's backend, handling database and authentication.

  1. Create a Supabase Project:

Database Setup

  1. Link to Your Project:

    • Use the following command, replacing <project-id> with your project's ID (found in the dashboard URL):

      npx supabase link --project-ref <project-id>
  2. Push Migrations:

    • Apply database migrations from supabase/migrations to your remote database:

      npx supabase db push

Deploying Edge Functions

Some Edge Functions (like create-abacate-pay-charge) require specific configurations (e.g., --no-verify-jwt) that are critical for their operation. To ensure all functions are deployed correctly with their required flags, always use the provided deployment script instead of running supabase functions deploy manually.

  • Deploy all functions:
    npm run deploy:functions

Cron Jobs Secrets

Some migrations schedule cron jobs that require secrets to run. You need to set them up in the Supabase Vault. You can do this by settling it up trough the dashboard or by running the following commands in the Supabase SQL Editor.

Replace the placeholder values with your actual project reference and service role key.

-- Run this in your Supabase SQL Editor:
select vault.create_secret('https://<your-project-ref>.supabase.co', 'project_url', 'URL for the Supabase project');
select vault.create_secret('<your-secret-key>', 'secret_key', 'Supabase Secret key');

OAuth Configuration

  1. Configure URL Redirects:
    • In the Supabase dashboard (Auth > URL Configuration), add a Site URL matching your app's scheme (defined in app.config.ts).
    • Example: com.bodok.chooselife://*
  2. Enable Social Auth:

Contributing

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Commit your changes.
  4. Push to your branch.
  5. Open a pull request.

Authors

About

An open source web and mobile app made for Highliners

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •