Skip to content

Commit 931dd10

Browse files
Added Zillabase Studio in Vue.js with Quasar (#147)
* Studio UI Code Added * Studio Sub Directory Added * Websocket Connection Added * Function and Views Update * Validations Added, Auth Page APIs Added * Update app.js
1 parent 7e10003 commit 931dd10

File tree

111 files changed

+14381
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+14381
-0
lines changed

studio/.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

studio/.eslintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/dist
2+
/src-capacitor
3+
/src-cordova
4+
/.quasar
5+
/node_modules
6+
.eslintrc.cjs
7+
/quasar.config.*.temporary.compiled*

studio/.eslintrc.cjs

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
module.exports = {
2+
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
3+
// This option interrupts the configuration hierarchy at this file
4+
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
5+
root: true,
6+
7+
parserOptions: {
8+
ecmaVersion: 2021, // Allows for the parsing of modern ECMAScript features
9+
},
10+
11+
env: {
12+
node: true,
13+
browser: true
14+
},
15+
16+
// Rules order is important, please avoid shuffling them
17+
extends: [
18+
// Base ESLint recommended rules
19+
// 'eslint:recommended',
20+
21+
// Uncomment any of the lines below to choose desired strictness,
22+
// but leave only one uncommented!
23+
// See https://eslint.vuejs.org/rules/#available-rules
24+
'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
25+
// 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
26+
// 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
27+
28+
// https://github.com/prettier/eslint-config-prettier#installation
29+
// usage with Prettier, provided by 'eslint-config-prettier'.
30+
'prettier'
31+
],
32+
33+
plugins: [
34+
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
35+
// required to lint *.vue files
36+
'vue',
37+
38+
// https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
39+
// Prettier has not been included as plugin to avoid performance impact
40+
// add it as an extension for your IDE
41+
42+
],
43+
44+
globals: {
45+
ga: 'readonly', // Google Analytics
46+
cordova: 'readonly',
47+
__statics: 'readonly',
48+
__QUASAR_SSR__: 'readonly',
49+
__QUASAR_SSR_SERVER__: 'readonly',
50+
__QUASAR_SSR_CLIENT__: 'readonly',
51+
__QUASAR_SSR_PWA__: 'readonly',
52+
process: 'readonly',
53+
Capacitor: 'readonly',
54+
chrome: 'readonly'
55+
},
56+
57+
// add your custom rules here
58+
rules: {
59+
60+
'prefer-promise-reject-errors': 'off',
61+
62+
// allow debugger during development only
63+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
64+
}
65+
}

studio/.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.DS_Store
2+
.thumbs.db
3+
node_modules
4+
5+
# Quasar core related directories
6+
.quasar
7+
/dist
8+
/quasar.config.*.temporary.compiled*
9+
10+
# Cordova related directories and files
11+
/src-cordova/node_modules
12+
/src-cordova/platforms
13+
/src-cordova/plugins
14+
/src-cordova/www
15+
16+
# Capacitor related directories and files
17+
/src-capacitor/www
18+
/src-capacitor/node_modules
19+
20+
# Log files
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
# Editor directories and files
26+
.idea
27+
*.suo
28+
*.ntvs*
29+
*.njsproj
30+
*.sln
31+
32+
# local .env files
33+
.env.local*

studio/.npmrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# pnpm-related options
2+
shamefully-hoist=true
3+
strict-peer-dependencies=false
4+
# to get the latest compatible packages when creating the project https://github.com/pnpm/pnpm/issues/6463
5+
resolution-mode=highest

studio/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Quasar App (zillabase-portal-quasar)
2+
3+
A Quasar Project
4+
5+
## Install the dependencies
6+
7+
```bash
8+
yarn
9+
# or
10+
npm install
11+
```
12+
13+
### Start the app in development mode (hot-code reloading, error reporting, etc.)
14+
15+
```bash
16+
quasar dev
17+
```
18+
19+
### Lint the files
20+
21+
```bash
22+
yarn lint
23+
# or
24+
npm run lint
25+
```
26+
27+
### Format the files
28+
29+
```bash
30+
yarn format
31+
# or
32+
npm run format
33+
```
34+
35+
### Build the app for production
36+
37+
```bash
38+
quasar build
39+
```
40+
41+
### Customize the configuration
42+
43+
See [Configuring quasar.config.js](https://v2.quasar.dev/quasar-cli-vite/quasar-config-js).

studio/connect-ws.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
const express = require('express');
2+
const WebSocket = require('ws');
3+
const { Client } = require('pg');
4+
5+
const app = express();
6+
const port = 8080;
7+
8+
const client = new Client({
9+
user: 'postgres',
10+
host: 'localhost',
11+
database: 'zillabase',
12+
password: 'Shaikh',
13+
port: 5432,
14+
});
15+
16+
client.connect();
17+
18+
const wss = new WebSocket.Server({ noServer: true });
19+
20+
wss.on('connection', (ws) => {
21+
console.log('New WebSocket connection');
22+
23+
ws.on('message', async (message) => {
24+
const { query, type } = JSON.parse(message);
25+
26+
try {
27+
const res = await client.query(query);
28+
ws.send(JSON.stringify({
29+
data: res.rows,
30+
type
31+
}));
32+
} catch (error) {
33+
ws.send(JSON.stringify({ error: 'Query failed' }));
34+
}
35+
});
36+
});
37+
38+
app.server = app.listen(port, () => {
39+
console.log(`Server running at http://localhost:${port}`);
40+
});
41+
42+
app.server.on('upgrade', (request, socket, head) => {
43+
wss.handleUpgrade(request, socket, head, (ws) => {
44+
wss.emit('connection', ws, request);
45+
});
46+
});

studio/index.html

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title><%= productName %></title>
5+
6+
<meta charset="utf-8" />
7+
<meta name="description" content="<%= productDescription %>" />
8+
<meta name="format-detection" content="telephone=no" />
9+
<meta name="msapplication-tap-highlight" content="no" />
10+
<meta
11+
name="viewport"
12+
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>"
13+
/>
14+
15+
<link
16+
rel="icon"
17+
type="image/png"
18+
sizes="128x128"
19+
href="icons/favicon-128x128.png"
20+
/>
21+
<link
22+
rel="icon"
23+
type="image/png"
24+
sizes="96x96"
25+
href="icons/favicon-96x96.png"
26+
/>
27+
<link
28+
rel="icon"
29+
type="image/png"
30+
sizes="32x32"
31+
href="icons/favicon-32x32.png"
32+
/>
33+
<link
34+
rel="icon"
35+
type="image/png"
36+
sizes="16x16"
37+
href="icons/favicon-16x16.png"
38+
/>
39+
<link rel="icon" type="image/ico" href="favicon.ico" />
40+
</head>
41+
<body>
42+
<!-- quasar:entry-point -->
43+
</body>
44+
</html>

studio/jsconfig.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": ".",
4+
"paths": {
5+
"src/*": ["src/*"],
6+
"app/*": ["*"],
7+
"components/*": ["src/components/*"],
8+
"layouts/*": ["src/layouts/*"],
9+
"pages/*": ["src/pages/*"],
10+
"assets/*": ["src/assets/*"],
11+
"boot/*": ["src/boot/*"],
12+
"stores/*": ["src/stores/*"],
13+
"vue$": ["node_modules/vue/dist/vue.runtime.esm-bundler.js"]
14+
}
15+
},
16+
"exclude": ["dist", ".quasar", "node_modules"]
17+
}

0 commit comments

Comments
 (0)