cheers-li / cheers-li-app

If Beer With Me and BeReal had a child

Home Page:https://www.cheers.li

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cheers.li

Installation

Requirements

  • Node >= 14
  • PNPM
  • IOS or Android development tools, see here for more info.
git clone https://github.com/cheers-li/cheers-li-app
cd https://github.com/cheers-li/cheers-li-app
pnpm install # npm i -g pnpm (if you don't have it)
cp .env .env.local # See below for more info
pnpm dev

Env values

Here are some explanation about the different values you need to set in your .env.local file:

  • VITE_SUPABASE_URL: On app.supabase.com, go to your project -> Settings tab -> API and copy the Project URL
  • VITE_SUPABASE_KEY: On app.supabase.com, go to your project -> Settings tab -> API and copy the public one in your Project API keys
  • VITE_SUPABASE_FUNCTIONS_URL: On app.supabase.com, go to your project -> Settings tab -> API and copy the Reference ID and add it to the base setting https://<PROJECT_ID>.functions.supabase.co
  • VITE_MAPBOX_TOKEN: On mapbox.com, go to your account -> Tokens -> Create a token
  • VITE_ENVIRONMENT: Development for all the dev environments and Production for the releases.

Native app

Everytime you change the code, you have to run these commands to update the app:

pnpm build
pnpm cap sync
pnpm cap run ios/android # choose one of them

If you want to go faster, you can just run this helper, it will do the same as the commands above:

pnpm deploy:ios # or deploy:android

If you want to open the project in the native IDE (Xcode or Android Studio), you can run:

pnpm cap open ios/android # choose one of them

Live Reload

To enable live reload in the Native App, follow these instructions:

Before starting, you need your phone and your computer connected to the same network.

Start the app in development mode with the --host flag to expose it:

pnpm dev --host

Remember your URL, it should be something like http://192.168.11.3:5173

Now, sync the native app (replace the value of the URL with yours):

SERVER_URL=http://192.168.11.3:5173 pnpm cap sync

To finish, open the native IDE, and press the Run button to launch the app.

pnpm cap open ios/android # choose one of them

Code style

We are using ESLint and Prettier to lint and format the code. An husky pre-commit hook is also configured to run the linter and the formatter before each commit on the staged files.

If you want to lint the entire codebase manually, you can run the following command:

pnpm lint

And If you want to fix the whole codebase code style, you can run:

pnpm format

About

If Beer With Me and BeReal had a child

https://www.cheers.li


Languages

Language:TypeScript 89.8%Language:Ruby 3.7%Language:Swift 1.9%Language:CSS 1.8%Language:Java 1.3%Language:JavaScript 1.0%Language:HTML 0.4%Language:Shell 0.1%