This is a SvelteKit-based mobile application template with Supabase authentication, designed for iOS deployment using Capacitor. The app uses SPA mode with static adapter for mobile compatibility.
This template is not designed for web use.
Install dependencies with npm install
(or pnpm install
or yarn
)
CMD + F "AuthMe" and "com.authme.test" and change those to your app name.
# Build and sync with Capacitor
npm run build && npx cap sync ios
# Open iOS project in Xcode
npx cap open ios
# Run on iOS simulator
npx cap run ios
# Add iOS platform (if needed)
npx cap add ios
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
To deploy your app, you may need to install an adapter for your target environment.
src/lib/stores/auth.svelte.js
as the main auth storesrc/lib/supabase.js
handles native mobile storage vs. web localStoragesrc/routes/protected/+layout.svelte
redirect unauthenticated userssrc/hooks.server.js
and src/lib/server/security.js
) due to mobile deployment constraintsfallback: 'index.html'
in svelte.config.js for mobile compatibilityRequired environment variables in .env
:
PUBLIC_SUPABASE_URL=your-supabase-url
PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
src/lib/supabase.js
src/lib/stores/auth.svelte.js
src/routes/protected/+layout.svelte
src/routes/+layout.svelte
capacitor.config.ts
detectSessionInUrl: false
) for mobile reliabilityios/
directory and managed by Capacitor