Follow these steps to set up this template after cloning it.
yarn installThis project uses environment-specific configuration files for development and production.
Environment files are already created in apps/next/:
.env.development- Development environment variables (auto-loaded whenNODE_ENV=development).env.production- Production environment variables (auto-loaded whenNODE_ENV=production).env.local- Local overrides (gitignored, create this if you need local-only overrides)
-
Update development values in
apps/next/.env.development:- Set
NEXT_PUBLIC_SUPABASE_URLtohttp://127.0.0.1:54321(local Supabase) - Get your local Supabase anon key by running
yarn supabase:statusand setNEXT_PUBLIC_SUPABASE_ANON_KEY
- Set
-
Update production values in
apps/next/.env.production(for later):- Replace placeholder values with your actual production Supabase credentials
-
Create
.env.local(optional, for local-only overrides):touch apps/next/.env.local
Environment files are already created in apps/expo/:
.env.development- Development environment variables.env.production- Production environment variables.env.local- Local overrides (gitignored, create this if you need local-only overrides)
-
Update development values in
apps/expo/.env.development:- Set
EXPO_PUBLIC_SUPABASE_URLtohttp://127.0.0.1:54321(local Supabase) - Get your local Supabase anon key by running
yarn supabase:statusand setEXPO_PUBLIC_SUPABASE_ANON_KEY - Set
EXPO_PUBLIC_API_URLtohttp://localhost:3000/api/trpc(or your machine's IP for physical devices)
- Set
-
Update production values in
apps/expo/.env.production(for later):- Replace placeholder values with your actual production credentials
-
Create
.env.local(optional, for local-only overrides):touch apps/expo/.env.local
Edit supabase/config.toml and change:
project_id = "my-project"to your desired project name.
yarn supabase:startWait for all services to start, then run:
yarn supabase:statusCopy the local environment variables and add them to your .env.development files (or .env.local for overrides) if you want to use local Supabase.
yarn webVisit http://localhost:3000
cd apps/expo
yarn ios
# or
yarn androidnpm install -g eas-clieas loginThe eas.json configuration file is already set up with build profiles:
- development: For development client builds
- preview: For internal distribution builds
- production: For production app store builds
You can customize it if needed:
cd apps/expo
npm run eas:configureSet up your production environment variables in EAS:
cd apps/expo
eas secret:create --scope project --name EXPO_PUBLIC_SUPABASE_URL --value "https://your-project.supabase.co"
eas secret:create --scope project --name EXPO_PUBLIC_SUPABASE_ANON_KEY --value "your-production-anon-key"
eas secret:create --scope project --name EXPO_PUBLIC_API_URL --value "https://your-domain.com/api/trpc"Or configure them in the EAS dashboard.
The project includes several EAS-related scripts in apps/expo/package.json:
Build:
npm run eas:build:android- Build for Androidnpm run eas:build:ios- Build for iOSnpm run eas:build:all- Build for both platformsnpm run eas:build:android:profile- Build Android with production profilenpm run eas:build:ios:profile- Build iOS with production profile
Submit:
npm run eas:submit:android- Submit Android build to Play Storenpm run eas:submit:ios- Submit iOS build to App Store
Update:
npm run eas:update- Publish OTA update (interactive)npm run eas:update:republish- Publish update to production branch
Configuration:
npm run eas:configure- Configure EAS Build
- Push your code to GitHub
- Import your repository in Vercel
- Set root directory to
apps/next - Add environment variables in Vercel dashboard
- Deploy!
If you get port conflicts, you can:
- Change the port in
apps/next/package.json(Next.js) - Use
yarn supabase:stopto stop Supabase services
Make sure Supabase is running:
yarn supabase:statusIf it's not running:
yarn supabase:startClear caches:
rm -rf .turbo
rm -rf apps/next/.next
rm -rf node_modules
yarn install