Login kit project being built using Vue3, Supabase and Quasar framework, based on the application developed in the tutorial available on the Patrick Monteiro's channel.
All authentication functionality used in this project is isolated in the following repository kit-auth-supabase-quasar.
Quasar Store uses a number of open source projects to work properly:
- VueJS 3
- Vue Router
- Quasar Framework
- Supabase
yarn
# or
npm install
quasar dev
After generate your electron app with the following command
quasar dev -m electron
Go to your src-electron\electron-main.js
and add the specified line below
mainWindow = new BrowserWindow({
/*
some code here
*/
autoHideMenuBar: true /* <-- add this line */,
webPreferences: {
/*
some code here too
*/
},
});
Add the variables through the netlify UI at Site settings > Build & deploy > Environment > Environment variables
. In my case there are two, SUPABASE_KEY
and SUPABASE_URL
.
In the quasar.config.js
file, in the build settings, modify the env
from: env: envparser()
best for working with multiple .env files to something like.
build :{
// ...
env: {
SUPABASE_URL: process.env.SUPABASE_URL,
SUPABASE_KEY: process.env.SUPABASE_KEY,
},
// ...
}
So that the netlify deploy build can inject the inserted variables through its UI.
If you are using netlify-cli (optional), after configuring it, just run the command 'netlify link' to link your local repository with the online project, if you haven't created it, use the documentation to create and proceed.
To test locally use: quasar build && netlify dev
, to deploy use: netlify build -prod
(in this case netlify will use the local environment variables, so beware. It works best if used in conjunction with the env: envparser()
configuration in the quasar.config.js
file).
To test locally use: quasar build && netlify dev
, to deploy use: netlify build --prod
(in this case netlify will use the local environment variables, so beware. It works best if used in conjunction with the env: envparser()
configuration in the quasar.config.js
file.
To better use the netlify deploy, create a netlify.toml file containing the following content:
[build]
# functions = "functions"
base = ""
publish = "dist/spa"
command = "quasar build"
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
Netlify uses netlify.toml data primarily at deploy time. The [[redirects]]
part has the same role as the _redirects
file created in the public/
folder.
After successful deployment on Netlify, go to your project on supabase.io, then under authentication, in the site url settings and additional redirect urls, add, after a comma, the link of your application in Netlify.
According to Antonio Ufano here and the Netlify documentation here, if the vue-router is configured as history mode, it is necessary to create a plain text file with the following lines
/* /index.html 200
and add it to your project's public
folder as netlify will automatically recognize it.
quasar dev -m electron
yarn lint
# or
npm run lint
yarn format
# or
npm run format
First of all, it is necessary to enable the devTool in the quasar.config.js
file, inside the build like this:
build: {
//...
devtool: "source-map",
//..
}
Once this is done, a launch.json file must be created inside the .vscode folder containing the following content:
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Quasar App: chrome",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}/src",
"sourceMapPathOverrides": {
"webpack://<project_name>/./src/*": "${webRoot}/*"
}
}
]
}
In "sourceMapPathOverrides"
key, change <project_name>
to your project name (accessible in name
property in your quasar project's package.json
file), after these settings, run your project with 'quasar dev' and launch the debugger, in my case I installed Debugger for Chrome.
To start the debugger, click on the Run and Debug option in the side menu of your vscode and click on the play button, while your project is already running, a new instance of google chrome will be opened in the link that was configured in the property "url"
from the launch.json file you created earlier, so by marking break points in your project, the debugger should follow them normally.
quasar build -m electron
quasar build