_frontend-dev:
	cd ui && pnpm run dev
	
test-frontend:
	cd ui && pnpm run test
	
test-frontend-watch:
	cd ui && pnpm run test:watch

typecheck:
	cd ui && pnpm run typecheck

build-frontend:
        cd ui && pnpm run build

_api-dev:
	cd api && npm run dev

test-api:
	cd api && npm run test

# Daily workflows

dev:
	just _api-dev & (just _frontend-dev)

push-and-create-pr:
	git push && gh pr create --fill && gh pr checks

view-checks:
	gh pr checks

merge-to-main:
	gh pr merge -m
	
# Types recipes
	
update-types:
	supabase gen types typescript --project-id "mhcafqvzbrrwvahpvvzd" --schema public >  packages/shared-types/src/database.types.ts && cp packages/shared-types/src/database.types.ts xtablo-expo/lib/database.types.ts
	
# Expo recipes
	
expo-install-all:
	cd xtablo-expo && npx expo install

expo-install +package:
	cd xtablo-expo && npx expo install {{package}}

expo-start *args:
	cd xtablo-expo && npx expo start {{args}}

build-expo:
	cd xtablo-expo && eas build --platform all
