Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x #116

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

2.x #116

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 22 additions & 23 deletions .firebase/hosting.ZGlzdA.cache
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
favicon.ico,1621638991335,4e534a8d9430ad741635507abaf2113129d81a04b6dc8590bade9f9a64fffb80
zen.jpg,1621638991338,21643bcb967c25d6495621489c7351df8e6a681ea2d79755f0d77e77a8f0d810
zenboard.png,1621638991338,2e8e30c2795f86224cd7cf0e028ce5abfe1b51a2fff63671f56a9475a229340f
audio/alarmwatch.mp3,1621638991335,6e8f40eeaa4c4ea61114c71b93c627ae41fc18cb2b1abb54a98ccc5922696e67
index.html,1629918105057,8b26bc8edd314dfd7d814ad68ba2310d19e34d583c83560e17a474f85b2555e8
assets/btn_google_light.3c80e78e.svg,1629918105049,14becdb3a961ea1a4f229d13b8e415a49e2110d67449285b75fd75fe7632cd65
assets/jira-software-blue.21126888.svg,1629918105049,135b7fc2aa6c0d00511ab579df1c6ec1f4e72e0604d3da5f7be594ed9cdc240e
assets/nested.f425b056.js,1629918105050,79b5adffe03ca5fa42190139e50336910f67c5316bc38db69473e728b3b4696f
assets/privacyPolicy.f3578439.js,1629918105050,79b5adffe03ca5fa42190139e50336910f67c5316bc38db69473e728b3b4696f
assets/terms.81e4e850.js,1629918105050,79b5adffe03ca5fa42190139e50336910f67c5316bc38db69473e728b3b4696f
assets/undraw_prioritise_tgdh.75192e1b.svg,1629918105050,f5ff68a76505a91cc08333c0e4422d785ee2ecbf7fc435fdf7fb800f36a83d93
assets/undraw_project_completed_w0oq.09e35d3c.svg,1629918105049,3ef6d8e73a353e99d42b743ad5b9e631578eebdd024736911b143b93f84b7c3a
assets/undraw_time_management_30iu.0c04690c.svg,1629918105050,8320017b04f88fbdff72b57a41796fbe16893af831f7695ccd55d2dc0c8d2ca2
pages/privacy-policy.html,1629918105057,fcccae476721fc266283388a080b4ed5bfdeb64ed0faebd05d63caac036c31f0
pages/terms.html,1629918105057,7054eccbe41cc3c1d44e724dfea4a197ee9b6eda643d97900f1c283bd2d8b5ee
pages/user-satisfaction.html,1629918105057,7c054029ee806bc6516b6ebfbf3dedbe4faf9b73be1feb78c582f8532c0beeed
assets/element-icons.9c88a535.woff,1629918105050,beaa10d23f33dd17e03309fd43bd5aa2a5f429b6c847c9e4ada8de7ffbece872
assets/element-icons.de5eb258.ttf,1629918105050,a5146772f7395013fbaf7682033ab5301fbbafd85ec092956676d52231152c62
assets/undraw_following.7b4c288c.svg,1629918105049,cb14a59c6f56822e42059f7027fe8e9b5b085ecf93c9ff2293cdda71085e5dfb
assets/main.78dd9494.js,1629918105050,54fd67e8b5a70c33796b04ac3c658d99899286cb4580f2ad68eeb53686c03c0f
assets/main.506c2cce.css,1629918105057,c7f15d7fe0fe2a2f110e3589387e086fc55d196bf0e0de80a50e4cf1c941ec0c
assets/zen-photo.dd6f90e8.jpg,1629918105051,45bfef3503826fd5eaa813630d49003a1a4c14ae8e53d1901233b9b2e389e3fa
assets/vendor.7d30ce83.js,1629918105057,dc79bd367bc4aa7ede7d8ac670dcf16d3629f0db52e0889dad12a3c0cb73f035
index.html,1666151125624,6484545cdc1c85e9017bb66c1125045b2b64dacfdd7309e0e676af16bfd986c6
zenboard.png,1645730734569,2e8e30c2795f86224cd7cf0e028ce5abfe1b51a2fff63671f56a9475a229340f
favicon.ico,1645730734565,4e534a8d9430ad741635507abaf2113129d81a04b6dc8590bade9f9a64fffb80
assets/jira-software-blue.21126888.svg,1666151125624,135b7fc2aa6c0d00511ab579df1c6ec1f4e72e0604d3da5f7be594ed9cdc240e
assets/Pricing.7b3f2b13.css,1666151125624,3dbc0d2cb5658baf7fe3ae574866961e936a40e68cc92ca728f3040c29df3b95
assets/Pricing.e44f7729.js,1666151125624,7fc65c9ea5c2fb2d358d3bfb9018bdddb9574dd76620e2d7104f18523f94c446
assets/Timer.382d9b53.css,1666151125624,b623812da23f67cd0cb7d631791c35628f704eb40bf1766f531db19a8bc1fbdb
assets/Timer.ae0d724a.js,1666151125624,f9b21ed2b3e189d8645e825feb0717b3fb5cc0e5287383d836792e46d525d0d1
assets/undraw_prioritise_tgdh.75192e1b.svg,1666151125624,f5ff68a76505a91cc08333c0e4422d785ee2ecbf7fc435fdf7fb800f36a83d93
assets/undraw_project_completed_w0oq.09e35d3c.svg,1666151125624,3ef6d8e73a353e99d42b743ad5b9e631578eebdd024736911b143b93f84b7c3a
assets/undraw_time_management_30iu.0c04690c.svg,1666151125624,8320017b04f88fbdff72b57a41796fbe16893af831f7695ccd55d2dc0c8d2ca2
pages/privacy-policy.html,1666151125623,096da98d7b2491eebe0641ea73a386f47bc9befa2a5b2927964dedf103c7fff5
pages/user-satisfaction.html,1666151125624,c3b0764ec809d8c5858b1cbf928f616f55239bc937e120b9712f8deb1e3afcd8
pages/terms.html,1666151125624,096da98d7b2491eebe0641ea73a386f47bc9befa2a5b2927964dedf103c7fff5
assets/element-icons.9c88a535.woff,1666151125622,beaa10d23f33dd17e03309fd43bd5aa2a5f429b6c847c9e4ada8de7ffbece872
assets/element-icons.de5eb258.ttf,1666151125623,a5146772f7395013fbaf7682033ab5301fbbafd85ec092956676d52231152c62
assets/undraw_following.7b4c288c.svg,1666151125624,cb14a59c6f56822e42059f7027fe8e9b5b085ecf93c9ff2293cdda71085e5dfb
audio/alarmwatch.mp3,1645730734564,6e8f40eeaa4c4ea61114c71b93c627ae41fc18cb2b1abb54a98ccc5922696e67
assets/zen-photo.dd6f90e8.jpg,1666151125626,45bfef3503826fd5eaa813630d49003a1a4c14ae8e53d1901233b9b2e389e3fa
assets/index.b61f9b4c.css,1666151125626,16c8097915f501579fc4321ff75092c17b5fdcaa8f4713fea0955214965d21da
zen.jpg,1645730734568,21643bcb967c25d6495621489c7351df8e6a681ea2d79755f0d77e77a8f0d810
assets/main.924c0c44.js,1666151125632,765c51ab2a8c147e0c828768a7aba6375976550135e62670d69248bf7ae34e08
20 changes: 20 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
'on':
push:
branches:
- staging
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_APPZEN_367E1 }}'
channelId: live
projectId: appzen-367e1
17 changes: 17 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
'on': pull_request
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_APPZEN_367E1 }}'
projectId: appzen-367e1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ functions/.**
*.local
.vercel
firebase-messaging-sw.js
.turbo
**/node_modules
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"vue3snippets.enable-compile-vue-file-on-did-save-code": false,
"volar.tsPlugin": false,
"cSpell.words": [
"composables",
"Firestore",
"Pomodoro"
]
Expand Down
22 changes: 21 additions & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,26 @@
},
"ui": {
"enabled": true
},
"storage": {
"port": 9199
},
"singleProjectMode": true
},
"functions": [
{
"source": "functions",
"codebase": "default",
"ignore": [
"node_modules",
".git",
"firebase-debug.log",
"firebase-debug.*.log"
],
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint",
"npm --prefix \"$RESOURCE_DIR\" run build"
]
}
}
]
}
178 changes: 178 additions & 0 deletions firestore.indexes.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,79 @@
{
"indexes": [
{
"collectionGroup": "connections",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "user_uid",
"order": "ASCENDING"
},
{
"fieldPath": "created_at",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "connections",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "user_uid",
"order": "ASCENDING"
},
{
"fieldPath": "created_at",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "notifications",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "read_at",
"order": "ASCENDING"
},
{
"fieldPath": "user_uid",
"order": "ASCENDING"
},
{
"fieldPath": "created_at",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "notifications",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "user_uid",
"order": "ASCENDING"
},
{
"fieldPath": "created_at",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "reminders",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "status",
"order": "ASCENDING"
},
{
"fieldPath": "due_time",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "tasks",
"queryScope": "COLLECTION",
Expand Down Expand Up @@ -39,6 +113,110 @@
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "tasks",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "matrix",
"order": "ASCENDING"
},
{
"fieldPath": "user_uid",
"order": "ASCENDING"
},
{
"fieldPath": "created_at",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "tasks",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "matrix",
"order": "ASCENDING"
},
{
"fieldPath": "user_uid",
"order": "ASCENDING"
},
{
"fieldPath": "created_at",
"order": "DESCENDING"
},
{
"fieldPath": "order",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "tasks",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "type",
"order": "ASCENDING"
},
{
"fieldPath": "user_uid",
"order": "ASCENDING"
},
{
"fieldPath": "order",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "tracks",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "ended_at",
"order": "ASCENDING"
},
{
"fieldPath": "user_uid",
"order": "ASCENDING"
},
{
"fieldPath": "started_at",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "tracks",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "task_uid",
"order": "ASCENDING"
},
{
"fieldPath": "uid",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "tracks",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "user_uid",
"order": "ASCENDING"
},
{
"fieldPath": "started_at",
"order": "ASCENDING"
}
]
}
],
"fieldOverrides": []
Expand Down
49 changes: 48 additions & 1 deletion firestore.rules
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,59 @@ service cloud.firestore {
match /tasks/{taskId} {
allow create: if request.auth != null && request.resource.data.user_uid == request.auth.uid;
allow delete, update: if request.auth != null && resource.data.user_uid == request.auth.uid;
allow read: if request.auth != null && resource.data.user_uid == request.auth.uid;
allow read: if (request.auth != null && resource.data.user_uid == request.auth.uid) || (exists(/databases/$(database)/documents/shared/$(request.auth.uid)/accounts/$(resource.data.user_uid)));
}
match /tracks/{trackId} {
allow create: if request.auth != null && request.resource.data.user_uid == request.auth.uid;
allow delete, update: if request.auth != null && resource.data.user_uid == request.auth.uid;
allow read: if request.auth != null && resource.data.user_uid == request.auth.uid;
}
match /tags/{tagId} {
allow create: if request.auth != null && request.resource.data.user_uid == request.auth.uid;
allow delete, update: if request.auth != null && resource.data.user_uid == request.auth.uid;
allow read: if request.auth != null && resource.data.user_uid == request.auth.uid;
}
match /contacts/{contactId} {
allow create: if request.auth != null && request.resource.data.user_uid == request.auth.uid;
allow delete, update: if request.auth != null && resource.data.user_uid == request.auth.uid;
allow read: if request.auth != null && resource.data.user_uid == request.auth.uid;
}
match /projects/{projectId} {
allow create: if request.auth != null && request.resource.data.user_uid == request.auth.uid;
allow delete, update: if request.auth != null && resource.data.user_uid == request.auth.uid;
allow read: if request.auth != null && resource.data.user_uid == request.auth.uid;
}
match /shared/{sharedId}/accounts/{accountId} {
allow read: if request.auth != null && sharedId == request.auth.uid;
}
match /sharing/{sharedId}/accounts/{accountId} {
allow read: if request.auth != null && sharedId == request.auth.uid;
allow delete: if sharedId == request.auth.uid;
}
match /connections/{connectionId} {
allow create: if request.auth != null && request.resource.data.user_uid == request.auth.uid;
allow delete, update: if request.auth != null && resource.data.user_uid == request.auth.uid;
allow read: if request.auth != null && resource.data.user_uid == request.auth.uid;
match /refreshToken {
allow read: if false;
}
}
match /applications/{applicationId} {
allow create: if request.auth != null && request.resource.data.user_uid == request.auth.uid;
allow delete, update: if request.auth != null && resource.data.user_uid == request.auth.uid;
allow read: if request.auth != null && resource.data.user_uid == request.auth.uid;
match /client_secret {
allow read: if false;
}
}
match /onetimecode/{onetimecodeId} {
allow create: if request.auth != null && request.resource.data.user_uid == request.auth.uid;
allow read: if true;
}
match /notifications/{notificationId} {
allow create: if request.auth != null && request.resource.data.user_uid == request.auth.uid;
allow delete, update: if request.auth != null && resource.data.user_uid == request.auth.uid;
allow read: if request.auth != null && resource.data.user_uid == request.auth.uid;
}
}
}
3 changes: 0 additions & 3 deletions functions/.gitignore

This file was deleted.

Loading