├── .browserslistrc
├── .eslintrc.js
├── .gitignore
├── README.md
├── babel.config.js
├── capacitor.config.ts
├── cypress.json
├── ionic.config.json
├── jest.config.js
├── package-lock.json
├── package.json
├── public
├── assets
│ ├── icon
│ │ ├── favicon.png
│ │ └── icon.png
│ └── shapes.svg
└── index.html
├── src
├── App.vue
├── components
│ └── Avatar.vue
├── main.ts
├── router
│ └── index.ts
├── shims-vue.d.ts
├── store
│ └── index.ts
├── supabase.ts
├── theme
│ └── variables.css
└── views
│ ├── Account.vue
│ ├── HomePage.vue
│ └── Login.vue
├── tests
├── e2e
│ ├── .eslintrc.js
│ ├── plugins
│ │ └── index.js
│ ├── specs
│ │ └── test.js
│ └── support
│ │ ├── commands.js
│ │ └── index.js
└── unit
│ └── example.spec.ts
└── tsconfig.json
/.browserslistrc:
--------------------------------------------------------------------------------
1 | > 1%
2 | last 2 versions
3 | not dead
4 | not ie 11
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | node: true
5 | },
6 | 'extends': [
7 | 'plugin:vue/vue3-essential',
8 | 'eslint:recommended',
9 | '@vue/typescript/recommended'
10 | ],
11 | parserOptions: {
12 | ecmaVersion: 2020
13 | },
14 | rules: {
15 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
16 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
17 | 'vue/no-deprecated-slot-attribute': 'off',
18 | '@typescript-eslint/no-explicit-any': 'off',
19 | },
20 | overrides: [
21 | {
22 | files: [
23 | '**/__tests__/*.{j,t}s?(x)',
24 | '**/tests/unit/**/*.spec.{j,t}s?(x)'
25 | ],
26 | env: {
27 | jest: true
28 | }
29 | }
30 | ]
31 | }
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Specifies intentionally untracked files to ignore when using Git
2 | # http://git-scm.com/docs/gitignore
3 |
4 | *~
5 | *.sw[mnpcod]
6 | .tmp
7 | *.tmp
8 | *.tmp.*
9 | *.sublime-project
10 | *.sublime-workspace
11 | .DS_Store
12 | Thumbs.db
13 | UserInterfaceState.xcuserstate
14 | $RECYCLE.BIN/
15 | .env.local
16 | *.log
17 | log.txt
18 | npm-debug.log*
19 |
20 | /.idea
21 | /.ionic
22 | /.sass-cache
23 | /.sourcemaps
24 | /.versions
25 | /.vscode
26 | /coverage
27 | /dist
28 | /node_modules
29 | /platforms
30 | /plugins
31 | /www
32 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Supabase Ionic Vue User Management
2 |
3 | > This project is based on the Supabase Ionic Vue user management [Quickstart](https://supabase.io/docs/guides/with-ionic-vue)
4 | > To keep it in sync with this Quickstart, architecture choices have been made to facilitate the comparison
5 | >
6 |
7 | This example will set you up for a very common situation: users can sign up with a magic link and then update their account with profile information, including a profile image.
8 |
9 | This demonstrates how to use:
10 |
11 | - User signups using Supabase [Auth](https://supabase.io/auth).
12 | - User avatar images using Supabase [Storage](https://supabase.io/storage).
13 | - Frontend using [Vue](https://vuejs.org).
14 |
15 | ## Technologies used
16 |
17 | - Frontend:
18 | - [Ionic](https://ionicframework.com)
19 | - [Capacitor](https://capacitorjs.com)
20 | - [Vue](https://vuejs.org)
21 | - [Supabase.js](https://supabase.io/docs/library/getting-started) for user management and realtime data syncing.
22 | - Backend:
23 | - [app.supabase.io](https://app.supabase.io/): hosted Postgres database with restful API for usage with Supabase.js.
24 |
25 | ## Instant deploy
26 |
27 | The Vercel deployment will guide you through creating a Supabase account and project. After installation of the Supabase integration, all relevant environment variables will be set up so that the project is usable immediately after deployment 🚀.
28 |
29 | [](https://vercel.com/new/clone?project-name=supabase-ionic-vue&repo-name=supabase-ionic-vue&envDescription=Find%20the%20Supabase%20URL%20and%20key%20in%20the%20your%20auto-generated%20docs%20at%20app.supabase.io&repository-url=https%3A%2F%2Fgithub.com%2Fmhartington%2Fsupabase-ionic-vue%2Ftree%2Fmain&env=VUE_APP_SUPABASE_URL%2CVUE_APP_SUPABASE_KEY)
30 |
31 | ## Build from scratch
32 |
33 | ### 1. Create new project
34 |
35 | Sign up to Supabase - [https://app.supabase.io](https://app.supabase.io) and create a new project. Wait for your database to start.
36 |
37 | ### 2. Run "User Management" Quickstart
38 |
39 | Once your database has started, run the "User Management Starter" quickstart. Inside of your project, enter the `SQL editor` tab and scroll down until you see `User Management Starter: Set up a Public Profiles table which you can access with your API`.
40 |
41 | ### 3. Get the URL and Key
42 |
43 | Go to the Project Settings (the cog icon), open the API tab, and find your API URL and `anon` key, you'll need these in the next step.
44 |
45 | The `anon` key is your client-side API key. It allows "anonymous access" to your database, until the user has logged in. Once they have logged in, the keys will switch to the user's own login token. This enables row level security for your data. Read more about this [below](#postgres-row-level-security).
46 |
47 | 
48 |
49 | **_NOTE_**: The `service_role` key has full access to your data, bypassing any security policies. These keys have to be kept secret and are meant to be used in server environments and never on a client or browser.
50 |
51 | ### 4. Env vars
52 |
53 | Update your environment file `environment.ts`
54 |
55 | ```
56 | export const environment = {
57 | // ...
58 | supabaseUrl: "YOUR_SUPBASE_URL",
59 | supbaseKey: "YOUR_SUPABASE_KEY"
60 | };
61 | ```
62 |
63 | Populate this file with your URL and Key.
64 |
65 | ### 5. Run the application
66 |
67 | Run the application: `ionic serve` and the browser will open to `https://localhost:8100/` and you are ready to go 🚀.
68 |
69 | ## Supabase details
70 |
71 | ### Postgres Row level security
72 |
73 | This project uses very high-level Authorization using Postgres' Role Level Security.
74 | When you start a Postgres database on Supabase, we populate it with an `auth` schema, and some helper functions.
75 | When a user logs in, they are issued a JWT with the role `authenticated` and thier UUID.
76 | We can use these details to provide fine-grained control over what each user can and cannot do.
77 |
78 | This is a trimmed-down schema, with the policies:
79 |
80 | ```sql
81 | -- Create a table for Public Profiles
82 | create table profiles (
83 | id uuid references auth.users not null,
84 | updated_at timestamp with time zone,
85 | username text unique,
86 | avatar_url text,
87 | website text,
88 |
89 | primary key (id),
90 | unique(username),
91 | constraint username_length check (char_length(username) >= 3)
92 | );
93 |
94 | alter table profiles enable row level security;
95 |
96 | create policy "Public profiles are viewable by everyone."
97 | on profiles for select
98 | using ( true );
99 |
100 | create policy "Users can insert their own profile."
101 | on profiles for insert
102 | with check ( auth.uid() = id );
103 |
104 | create policy "Users can update own profile."
105 | on profiles for update
106 | using ( auth.uid() = id );
107 |
108 | -- Set up Realtime!
109 | begin;
110 | drop publication if exists supabase_realtime;
111 | create publication supabase_realtime;
112 | commit;
113 | alter publication supabase_realtime add table profiles;
114 |
115 | -- Set up Storage!
116 | insert into storage.buckets (id, name)
117 | values ('avatars', 'avatars');
118 |
119 | create policy "Avatar images are publicly accessible."
120 | on storage.objects for select
121 | using ( bucket_id = 'avatars' );
122 |
123 | create policy "Anyone can upload an avatar."
124 | on storage.objects for insert
125 | with check ( bucket_id = 'avatars' );
126 | ```
127 |
128 | ## Authors
129 |
130 | - [Supabase](https://supabase.io)
131 | - [Mike Hartington](https://github.com/mhartington)
132 |
133 | Supabase is open source. We'd love for you to follow along and get involved at https://github.com/supabase/supabase
134 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/capacitor.config.ts:
--------------------------------------------------------------------------------
1 | import { CapacitorConfig } from '@capacitor/cli';
2 |
3 | const config: CapacitorConfig = {
4 | appId: 'io.ionic.starter',
5 | appName: 'supabase-ionic-vue',
6 | webDir: 'dist',
7 | bundledWebRuntime: false
8 | };
9 |
10 | export default config;
11 |
--------------------------------------------------------------------------------
/cypress.json:
--------------------------------------------------------------------------------
1 | {
2 | "pluginsFile": "tests/e2e/plugins/index.js"
3 | }
4 |
--------------------------------------------------------------------------------
/ionic.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "supabase-ionic-vue",
3 | "integrations": {
4 | "capacitor": {}
5 | },
6 | "type": "vue"
7 | }
8 |
--------------------------------------------------------------------------------
/jest.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',
3 | transformIgnorePatterns: ['/node_modules/(?!@ionic/vue|@ionic/vue-router|@ionic/core|@stencil/core|ionicons)']
4 | }
5 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "supabase-ionic-vue",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "test:unit": "vue-cli-service test:unit",
9 | "test:e2e": "vue-cli-service test:e2e",
10 | "lint": "vue-cli-service lint"
11 | },
12 | "dependencies": {
13 | "@capacitor/app": "1.1.1",
14 | "@capacitor/camera": "^1.3.1",
15 | "@capacitor/core": "3.4.3",
16 | "@capacitor/haptics": "1.1.4",
17 | "@capacitor/keyboard": "1.2.2",
18 | "@capacitor/status-bar": "1.0.8",
19 | "@ionic/pwa-elements": "^3.1.1",
20 | "@ionic/vue": "^6.0.0",
21 | "@ionic/vue-router": "^6.0.0",
22 | "@supabase/supabase-js": "^1.31.1",
23 | "core-js": "^3.6.5",
24 | "vue": "^3.2.21",
25 | "vue-router": "^4.0.12"
26 | },
27 | "devDependencies": {
28 | "@capacitor/cli": "3.4.3",
29 | "@types/jest": "^27.0.2",
30 | "@typescript-eslint/eslint-plugin": "^5.6.0",
31 | "@typescript-eslint/parser": "^5.6.0",
32 | "@vue/cli-plugin-babel": "~5.0.0-rc.1",
33 | "@vue/cli-plugin-e2e-cypress": "~5.0.0-rc.1",
34 | "@vue/cli-plugin-eslint": "~5.0.0-rc.1",
35 | "@vue/cli-plugin-router": "~5.0.0-rc.1",
36 | "@vue/cli-plugin-typescript": "~5.0.0-rc.1",
37 | "@vue/cli-plugin-unit-jest": "~5.0.0-rc.1",
38 | "@vue/cli-service": "~5.0.0-rc.1",
39 | "@vue/eslint-config-typescript": "^9.1.0",
40 | "@vue/test-utils": "^2.0.0-rc.16",
41 | "@vue/vue3-jest": "^27.0.0-alpha.3",
42 | "babel-jest": "^27.3.1",
43 | "cypress": "^8.7.0",
44 | "eslint": "^8.4.1",
45 | "eslint-plugin-vue": "^8.2.0",
46 | "jest": "^27.3.1",
47 | "ts-jest": "^27.0.7",
48 | "typescript": "^4.3.5"
49 | },
50 | "description": "An Ionic project"
51 | }
52 |
--------------------------------------------------------------------------------
/public/assets/icon/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhartington/supabase-ionic-vue/c2f9b2e669b7837a3ce6c0ff67f2808a54a4c506/public/assets/icon/favicon.png
--------------------------------------------------------------------------------
/public/assets/icon/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mhartington/supabase-ionic-vue/c2f9b2e669b7837a3ce6c0ff67f2808a54a4c506/public/assets/icon/icon.png
--------------------------------------------------------------------------------
/public/assets/shapes.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Ionic App
6 |
7 |
8 |
9 |
10 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
32 |
--------------------------------------------------------------------------------
/src/components/Avatar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
![]()
5 |
6 |
7 |
8 |
9 |
10 |
76 |
105 |
--------------------------------------------------------------------------------
/src/main.ts:
--------------------------------------------------------------------------------
1 | import { createApp } from 'vue'
2 | import App from './App.vue'
3 | import router from './router';
4 |
5 | import { IonicVue } from '@ionic/vue';
6 | /* Core CSS required for Ionic components to work properly */
7 | import '@ionic/vue/css/ionic.bundle.css';
8 |
9 | /* Theme variables */
10 | import './theme/variables.css';
11 |
12 | import { defineCustomElements } from '@ionic/pwa-elements/loader';
13 | defineCustomElements(window);
14 | const app = createApp(App)
15 | .use(IonicVue)
16 | .use(router);
17 |
18 | router.isReady().then(() => {
19 | app.mount('#app');
20 | });
21 |
--------------------------------------------------------------------------------
/src/router/index.ts:
--------------------------------------------------------------------------------
1 | import { createRouter, createWebHistory } from '@ionic/vue-router';
2 | import { RouteRecordRaw } from 'vue-router';
3 | import LoginPage from '../views/Login.vue';
4 | import AccountPage from '../views/Account.vue';
5 | const routes: Array = [
6 | {
7 | path: '/',
8 | name: 'Login',
9 | component: LoginPage
10 | },
11 | {
12 | path: '/account',
13 | name: 'Account',
14 | component: AccountPage
15 | }
16 | ]
17 |
18 | const router = createRouter({
19 | history: createWebHistory(process.env.BASE_URL),
20 | routes
21 | })
22 |
23 | export default router
24 |
--------------------------------------------------------------------------------
/src/shims-vue.d.ts:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 | declare module '*.vue' {
3 | import type { DefineComponent } from 'vue'
4 | const component: DefineComponent<{}, {}, any>
5 | export default component
6 | }
7 |
--------------------------------------------------------------------------------
/src/store/index.ts:
--------------------------------------------------------------------------------
1 | import { User } from "@supabase/supabase-js"
2 | import { reactive } from "vue"
3 |
4 | export const store = reactive<{user: User | Record}>({
5 | user: {},
6 | })
7 |
--------------------------------------------------------------------------------
/src/supabase.ts:
--------------------------------------------------------------------------------
1 | import { createClient } from '@supabase/supabase-js';
2 |
3 | const supabaseUrl = process.env.VUE_APP_SUPABASE_URL as string;
4 | const supabaseAnonKey = process.env.VUE_APP_SUPABASE_ANON_KEY as string;
5 |
6 | export const supabase = createClient(supabaseUrl, supabaseAnonKey);
7 |
--------------------------------------------------------------------------------
/src/theme/variables.css:
--------------------------------------------------------------------------------
1 | /* Ionic Variables and Theming. For more info, please see:
2 | http://ionicframework.com/docs/theming/ */
3 |
4 | /** Ionic CSS Variables **/
5 | :root {
6 | /** primary **/
7 | --ion-color-primary: #3880ff;
8 | --ion-color-primary-rgb: 56, 128, 255;
9 | --ion-color-primary-contrast: #ffffff;
10 | --ion-color-primary-contrast-rgb: 255, 255, 255;
11 | --ion-color-primary-shade: #3171e0;
12 | --ion-color-primary-tint: #4c8dff;
13 |
14 | /** secondary **/
15 | --ion-color-secondary: #3dc2ff;
16 | --ion-color-secondary-rgb: 61, 194, 255;
17 | --ion-color-secondary-contrast: #ffffff;
18 | --ion-color-secondary-contrast-rgb: 255, 255, 255;
19 | --ion-color-secondary-shade: #36abe0;
20 | --ion-color-secondary-tint: #50c8ff;
21 |
22 | /** tertiary **/
23 | --ion-color-tertiary: #5260ff;
24 | --ion-color-tertiary-rgb: 82, 96, 255;
25 | --ion-color-tertiary-contrast: #ffffff;
26 | --ion-color-tertiary-contrast-rgb: 255, 255, 255;
27 | --ion-color-tertiary-shade: #4854e0;
28 | --ion-color-tertiary-tint: #6370ff;
29 |
30 | /** success **/
31 | --ion-color-success: #2dd36f;
32 | --ion-color-success-rgb: 45, 211, 111;
33 | --ion-color-success-contrast: #ffffff;
34 | --ion-color-success-contrast-rgb: 255, 255, 255;
35 | --ion-color-success-shade: #28ba62;
36 | --ion-color-success-tint: #42d77d;
37 |
38 | /** warning **/
39 | --ion-color-warning: #ffc409;
40 | --ion-color-warning-rgb: 255, 196, 9;
41 | --ion-color-warning-contrast: #000000;
42 | --ion-color-warning-contrast-rgb: 0, 0, 0;
43 | --ion-color-warning-shade: #e0ac08;
44 | --ion-color-warning-tint: #ffca22;
45 |
46 | /** danger **/
47 | --ion-color-danger: #eb445a;
48 | --ion-color-danger-rgb: 235, 68, 90;
49 | --ion-color-danger-contrast: #ffffff;
50 | --ion-color-danger-contrast-rgb: 255, 255, 255;
51 | --ion-color-danger-shade: #cf3c4f;
52 | --ion-color-danger-tint: #ed576b;
53 |
54 | /** dark **/
55 | --ion-color-dark: #222428;
56 | --ion-color-dark-rgb: 34, 36, 40;
57 | --ion-color-dark-contrast: #ffffff;
58 | --ion-color-dark-contrast-rgb: 255, 255, 255;
59 | --ion-color-dark-shade: #1e2023;
60 | --ion-color-dark-tint: #383a3e;
61 |
62 | /** medium **/
63 | --ion-color-medium: #92949c;
64 | --ion-color-medium-rgb: 146, 148, 156;
65 | --ion-color-medium-contrast: #ffffff;
66 | --ion-color-medium-contrast-rgb: 255, 255, 255;
67 | --ion-color-medium-shade: #808289;
68 | --ion-color-medium-tint: #9d9fa6;
69 |
70 | /** light **/
71 | --ion-color-light: #f4f5f8;
72 | --ion-color-light-rgb: 244, 245, 248;
73 | --ion-color-light-contrast: #000000;
74 | --ion-color-light-contrast-rgb: 0, 0, 0;
75 | --ion-color-light-shade: #d7d8da;
76 | --ion-color-light-tint: #f5f6f9;
77 | }
78 |
79 | @media (prefers-color-scheme: dark) {
80 | /*
81 | * Dark Colors
82 | * -------------------------------------------
83 | */
84 |
85 | body {
86 | --ion-color-primary: #428cff;
87 | --ion-color-primary-rgb: 66,140,255;
88 | --ion-color-primary-contrast: #ffffff;
89 | --ion-color-primary-contrast-rgb: 255,255,255;
90 | --ion-color-primary-shade: #3a7be0;
91 | --ion-color-primary-tint: #5598ff;
92 |
93 | --ion-color-secondary: #50c8ff;
94 | --ion-color-secondary-rgb: 80,200,255;
95 | --ion-color-secondary-contrast: #ffffff;
96 | --ion-color-secondary-contrast-rgb: 255,255,255;
97 | --ion-color-secondary-shade: #46b0e0;
98 | --ion-color-secondary-tint: #62ceff;
99 |
100 | --ion-color-tertiary: #6a64ff;
101 | --ion-color-tertiary-rgb: 106,100,255;
102 | --ion-color-tertiary-contrast: #ffffff;
103 | --ion-color-tertiary-contrast-rgb: 255,255,255;
104 | --ion-color-tertiary-shade: #5d58e0;
105 | --ion-color-tertiary-tint: #7974ff;
106 |
107 | --ion-color-success: #2fdf75;
108 | --ion-color-success-rgb: 47,223,117;
109 | --ion-color-success-contrast: #000000;
110 | --ion-color-success-contrast-rgb: 0,0,0;
111 | --ion-color-success-shade: #29c467;
112 | --ion-color-success-tint: #44e283;
113 |
114 | --ion-color-warning: #ffd534;
115 | --ion-color-warning-rgb: 255,213,52;
116 | --ion-color-warning-contrast: #000000;
117 | --ion-color-warning-contrast-rgb: 0,0,0;
118 | --ion-color-warning-shade: #e0bb2e;
119 | --ion-color-warning-tint: #ffd948;
120 |
121 | --ion-color-danger: #ff4961;
122 | --ion-color-danger-rgb: 255,73,97;
123 | --ion-color-danger-contrast: #ffffff;
124 | --ion-color-danger-contrast-rgb: 255,255,255;
125 | --ion-color-danger-shade: #e04055;
126 | --ion-color-danger-tint: #ff5b71;
127 |
128 | --ion-color-dark: #f4f5f8;
129 | --ion-color-dark-rgb: 244,245,248;
130 | --ion-color-dark-contrast: #000000;
131 | --ion-color-dark-contrast-rgb: 0,0,0;
132 | --ion-color-dark-shade: #d7d8da;
133 | --ion-color-dark-tint: #f5f6f9;
134 |
135 | --ion-color-medium: #989aa2;
136 | --ion-color-medium-rgb: 152,154,162;
137 | --ion-color-medium-contrast: #000000;
138 | --ion-color-medium-contrast-rgb: 0,0,0;
139 | --ion-color-medium-shade: #86888f;
140 | --ion-color-medium-tint: #a2a4ab;
141 |
142 | --ion-color-light: #222428;
143 | --ion-color-light-rgb: 34,36,40;
144 | --ion-color-light-contrast: #ffffff;
145 | --ion-color-light-contrast-rgb: 255,255,255;
146 | --ion-color-light-shade: #1e2023;
147 | --ion-color-light-tint: #383a3e;
148 | }
149 |
150 | /*
151 | * iOS Dark Theme
152 | * -------------------------------------------
153 | */
154 |
155 | .ios body {
156 | --ion-background-color: #000000;
157 | --ion-background-color-rgb: 0,0,0;
158 |
159 | --ion-text-color: #ffffff;
160 | --ion-text-color-rgb: 255,255,255;
161 |
162 | --ion-color-step-50: #0d0d0d;
163 | --ion-color-step-100: #1a1a1a;
164 | --ion-color-step-150: #262626;
165 | --ion-color-step-200: #333333;
166 | --ion-color-step-250: #404040;
167 | --ion-color-step-300: #4d4d4d;
168 | --ion-color-step-350: #595959;
169 | --ion-color-step-400: #666666;
170 | --ion-color-step-450: #737373;
171 | --ion-color-step-500: #808080;
172 | --ion-color-step-550: #8c8c8c;
173 | --ion-color-step-600: #999999;
174 | --ion-color-step-650: #a6a6a6;
175 | --ion-color-step-700: #b3b3b3;
176 | --ion-color-step-750: #bfbfbf;
177 | --ion-color-step-800: #cccccc;
178 | --ion-color-step-850: #d9d9d9;
179 | --ion-color-step-900: #e6e6e6;
180 | --ion-color-step-950: #f2f2f2;
181 |
182 | --ion-item-background: #000000;
183 |
184 | --ion-card-background: #1c1c1d;
185 | }
186 |
187 | .ios ion-modal {
188 | --ion-background-color: var(--ion-color-step-100);
189 | --ion-toolbar-background: var(--ion-color-step-150);
190 | --ion-toolbar-border-color: var(--ion-color-step-250);
191 | }
192 |
193 |
194 | /*
195 | * Material Design Dark Theme
196 | * -------------------------------------------
197 | */
198 |
199 | .md body {
200 | --ion-background-color: #121212;
201 | --ion-background-color-rgb: 18,18,18;
202 |
203 | --ion-text-color: #ffffff;
204 | --ion-text-color-rgb: 255,255,255;
205 |
206 | --ion-border-color: #222222;
207 |
208 | --ion-color-step-50: #1e1e1e;
209 | --ion-color-step-100: #2a2a2a;
210 | --ion-color-step-150: #363636;
211 | --ion-color-step-200: #414141;
212 | --ion-color-step-250: #4d4d4d;
213 | --ion-color-step-300: #595959;
214 | --ion-color-step-350: #656565;
215 | --ion-color-step-400: #717171;
216 | --ion-color-step-450: #7d7d7d;
217 | --ion-color-step-500: #898989;
218 | --ion-color-step-550: #949494;
219 | --ion-color-step-600: #a0a0a0;
220 | --ion-color-step-650: #acacac;
221 | --ion-color-step-700: #b8b8b8;
222 | --ion-color-step-750: #c4c4c4;
223 | --ion-color-step-800: #d0d0d0;
224 | --ion-color-step-850: #dbdbdb;
225 | --ion-color-step-900: #e7e7e7;
226 | --ion-color-step-950: #f3f3f3;
227 |
228 | --ion-item-background: #1e1e1e;
229 |
230 | --ion-toolbar-background: #1f1f1f;
231 |
232 | --ion-tab-bar-background: #1f1f1f;
233 |
234 | --ion-card-background: #1e1e1e;
235 | }
236 | }
--------------------------------------------------------------------------------
/src/views/Account.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Account
6 |
7 |
8 |
9 |
10 |
11 |
40 |
41 |
42 | Log Out
43 |
44 |
45 |
46 |
47 |
48 |
164 |
--------------------------------------------------------------------------------
/src/views/HomePage.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Blank
6 |
7 |
8 |
9 |
10 |
11 |
12 | Blank
13 |
14 |
15 |
16 |
17 |
Ready to create an app?
18 |
Start with Ionic UI Components
19 |
20 |
21 |
22 |
23 |
24 |
39 |
40 |
69 |
--------------------------------------------------------------------------------
/src/views/Login.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Login
6 |
7 |
8 |
9 |
10 |
11 |
Supabase + Ionic Vue
12 |
Sign in via magic link with your email below
13 |
14 |
15 |
29 |
30 | {{email}}
31 |
32 |
33 |
34 |
35 |
36 |
99 |
--------------------------------------------------------------------------------
/tests/e2e/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: [
3 | 'cypress'
4 | ],
5 | env: {
6 | mocha: true,
7 | 'cypress/globals': true
8 | },
9 | rules: {
10 | strict: 'off'
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/tests/e2e/plugins/index.js:
--------------------------------------------------------------------------------
1 | /* eslint-disable arrow-body-style */
2 | // https://docs.cypress.io/guides/guides/plugins-guide.html
3 |
4 | // if you need a custom webpack configuration you can uncomment the following import
5 | // and then use the `file:preprocessor` event
6 | // as explained in the cypress docs
7 | // https://docs.cypress.io/api/plugins/preprocessors-api.html#Examples
8 |
9 | // /* eslint-disable import/no-extraneous-dependencies, global-require */
10 | // const webpack = require('@cypress/webpack-preprocessor')
11 |
12 | module.exports = (on, config) => {
13 | // on('file:preprocessor', webpack({
14 | // webpackOptions: require('@vue/cli-service/webpack.config'),
15 | // watchOptions: {}
16 | // }))
17 |
18 | return Object.assign({}, config, {
19 | fixturesFolder: 'tests/e2e/fixtures',
20 | integrationFolder: 'tests/e2e/specs',
21 | screenshotsFolder: 'tests/e2e/screenshots',
22 | videosFolder: 'tests/e2e/videos',
23 | supportFile: 'tests/e2e/support/index.js'
24 | })
25 | }
26 |
--------------------------------------------------------------------------------
/tests/e2e/specs/test.js:
--------------------------------------------------------------------------------
1 | // https://docs.cypress.io/api/introduction/api.html
2 |
3 | describe('My First Test', () => {
4 | it('Visits the app root url', () => {
5 | cy.visit('/')
6 | cy.contains('#container', 'Ready to create an app?')
7 | })
8 | })
9 |
--------------------------------------------------------------------------------
/tests/e2e/support/commands.js:
--------------------------------------------------------------------------------
1 | // ***********************************************
2 | // This example commands.js shows you how to
3 | // create various custom commands and overwrite
4 | // existing commands.
5 | //
6 | // For more comprehensive examples of custom
7 | // commands please read more here:
8 | // https://on.cypress.io/custom-commands
9 | // ***********************************************
10 | //
11 | //
12 | // -- This is a parent command --
13 | // Cypress.Commands.add("login", (email, password) => { ... })
14 | //
15 | //
16 | // -- This is a child command --
17 | // Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
18 | //
19 | //
20 | // -- This is a dual command --
21 | // Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
22 | //
23 | //
24 | // -- This is will overwrite an existing command --
25 | // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
26 |
--------------------------------------------------------------------------------
/tests/e2e/support/index.js:
--------------------------------------------------------------------------------
1 | // ***********************************************************
2 | // This example support/index.js is processed and
3 | // loaded automatically before your test files.
4 | //
5 | // This is a great place to put global configuration and
6 | // behavior that modifies Cypress.
7 | //
8 | // You can change the location of this file or turn off
9 | // automatically serving support files with the
10 | // 'supportFile' configuration option.
11 | //
12 | // You can read more here:
13 | // https://on.cypress.io/configuration
14 | // ***********************************************************
15 |
16 | // Import commands.js using ES2015 syntax:
17 | import './commands'
18 |
19 | // Alternatively you can use CommonJS syntax:
20 | // require('./commands')
21 |
--------------------------------------------------------------------------------
/tests/unit/example.spec.ts:
--------------------------------------------------------------------------------
1 | import { mount } from '@vue/test-utils'
2 | import HomePage from '@/views/HomePage.vue'
3 |
4 | describe('HomePage.vue', () => {
5 | it('renders home vue', () => {
6 | const wrapper = mount(HomePage)
7 | expect(wrapper.text()).toMatch('Ready to create an app?')
8 | })
9 | })
10 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "esnext",
4 | "module": "esnext",
5 | "strict": true,
6 | "jsx": "preserve",
7 | "importHelpers": true,
8 | "moduleResolution": "node",
9 | "skipLibCheck": true,
10 | "esModuleInterop": true,
11 | "allowSyntheticDefaultImports": true,
12 | "sourceMap": true,
13 | "baseUrl": ".",
14 | "types": [
15 | "webpack-env",
16 | "jest"
17 | ],
18 | "paths": {
19 | "@/*": [
20 | "src/*"
21 | ]
22 | },
23 | "lib": [
24 | "esnext",
25 | "dom",
26 | "dom.iterable",
27 | "scripthost"
28 | ]
29 | },
30 | "include": [
31 | "src/**/*.ts",
32 | "src/**/*.tsx",
33 | "src/**/*.vue",
34 | "tests/**/*.ts",
35 | "tests/**/*.tsx"
36 | ],
37 | "exclude": [
38 | "node_modules"
39 | ]
40 | }
41 |
--------------------------------------------------------------------------------