A SvelteKit + Supabase + Capacitor (Android) application template with Google Sign-In and Tailwind CSS v4.
You can easily scaffold a new project from this template using degit:
npx degit TheAnimatrix/calurcap my-new-app
cd my-new-app
npm installRun the setup wizard before installing dependencies to automatically configure your project name, ID, and API keys:
npm run setup
npm installThis interactive script will ask for your:
- App Name & ID
- Supabase URL & Key
- Google Client ID
It will then update package.json, capacitor.config.ts, android/app/build.gradle, and supabaseClient.ts for you.
Even after running the script, you must manually:
- Replace
android/app/google-services.jsonwith your own file from Google Cloud Console (or Firebase Console if you linked them). - Run
npx cap syncto apply the Android configuration changes.
- Framework: SvelteKit v2 (SPA mode) + Svelte v5
- Styling: Tailwind CSS v4 with a custom dark theme
- Authentication: Supabase Auth v2 with Google Sign-In
- Mobile: Capacitor v7 for Android deployment
- Live Reload: Seamless development on Android devices
- Node.js
- Android Studio
- Supabase Project
- Google Cloud Console Project
- Create a new Supabase project.
- Go to Authentication > Providers and enable Google.
- You will need the Client ID and Client Secret from Google Cloud Console (see below).
- Copy your Supabase URL and Anon Key.
- Update
src/lib/supabaseClient.tswith your Supabase URL and Anon Key.
- Go to the Google Cloud Console.
- Create a new project.
- Go to APIs & Services > OAuth consent screen and configure it (External or Internal).
- Go to APIs & Services > Credentials.
- Create an OAuth 2.0 Client ID for Web application.
- Authorized JavaScript origins:
http://localhost:3000(and your production domain). - Authorized redirect URIs:
https://<YOUR_PROJECT_ID>.supabase.co/auth/v1/callback. - Copy the Client ID and Client Secret to your Supabase Google Provider settings.
- Authorized JavaScript origins:
- Create another OAuth 2.0 Client ID for Android.
- You will need the SHA-1 certificate fingerprint.
- To get the SHA-1 for your debug keystore:
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android - Package name:
com.avarnic.calurcap.
- Download the
google-services.jsonfile for the Android client.
- Android:
- Place the
google-services.jsonfile inandroid/app/.
- Place the
- Capacitor:
- Open
capacitor.config.tsand updateserverClientIdin theGoogleAuthplugin configuration with your Web Client ID (not the Android one).
- Open
-
Install dependencies:
npm install
-
Initialize Native Project: This builds the web assets and syncs them to the Android project. You only need to repeat this if you install new native plugins (
npm install @capacitor/...).npm run build npx cap sync
-
Start the Development Server: Open a terminal and run:
npm run dev
This starts the Vite server on port 3000.
-
Run on Android with Live Reload: Open a second terminal and run:
npm run dev:android
Ensure your Android device is connected via USB and USB debugging is enabled.
-
Open Android Studio (optional): If you need to edit native code or debug Java/Kotlin issues:
npx cap open android
- Tailwind CSS: Styles are located in
src/app.css. - Port: The development server runs on port
3000to ensure compatibility with the Android configuration.