https://github.com/thorwebdev/expo-supa-legend-state
Local-first Expo App with LegendState and Supabase sync.
https://github.com/thorwebdev/expo-supa-legend-state
Last synced: 8 months ago
JSON representation
Local-first Expo App with LegendState and Supabase sync.
- Host: GitHub
- URL: https://github.com/thorwebdev/expo-supa-legend-state
- Owner: thorwebdev
- Created: 2024-08-19T08:31:10.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-27T05:02:40.000Z (over 1 year ago)
- Last Synced: 2024-12-19T10:12:29.294Z (over 1 year ago)
- Language: TypeScript
- Size: 1.2 MB
- Stars: 8
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Expo App with Legend-State and Supabase Realtime
Local-first Expo App with [Legend-State](https://legendapp.com/open-source/state/v3/) and [Supabase](https://supabase.com/).
- [Read the detailed tutorial](https://supabase.link/local-first-expo-legend-state)
- [Watch the video guide](https://supabase.link/local-first-expo-legend-state-yt)
## Setup
- Create Supabase account at [database.new](https://database.new).
- Create `.env.local` file by running `cp .env.local.example .env.local`.
- Add your credentials from the [Supabase Dashboard](https://supabase.com/dashboard/project/_/settings/api).
- Run `supabase link` to link your local project to your Supabase project.
- Run `supabase db push` to apply the [init migration](./supabase/migrations/20240902202009_init.sql) to your Supabase database.
## 🚀 How to run locally
- Run `yarn` or `npm install`.
- Run `yarn start` or `npm run start` to try it out.
- Press a │ open Android
- Press i │ open iOS simulator
- Press w │ open web
## How to generate types
```bash
supabase start
supabase gen types --lang=typescript --local > utils/database.types.ts
```