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

feat(keep): new PWA! #1052

Merged
merged 37 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
4f7e23b
feat(keep): base pwa
njfamirm Apr 17, 2023
41a86a2
feat(ui/theme): 20 palette
njfamirm Apr 18, 2023
3f83c78
feat(keep): config
njfamirm Apr 18, 2023
7cf958a
feat(keep): theme
njfamirm Apr 18, 2023
377cca6
feat(keep): manifest icon
njfamirm Apr 18, 2023
bff053d
feat(keep): app footer
njfamirm Apr 18, 2023
e8f8d7e
fix(keep): config.js
njfamirm May 5, 2023
6c67558
fix(keep): remove buttons file
njfamirm May 5, 2023
ed27bad
deps(keep): update
njfamirm May 5, 2023
1141714
feat(keep-pwa): update config
njfamirm May 9, 2023
334578a
deps(keep-pwa): update dependencies
njfamirm May 9, 2023
fb95f07
feat(keep-pwa): add svg logo
njfamirm May 10, 2023
85c82c3
fix(keep-pwa): color
njfamirm May 10, 2023
e37cd99
feat(keep-pwa): content
njfamirm May 10, 2023
d55ec91
feat(keep-pwa): change language
njfamirm May 10, 2023
523b329
feat(keep-pwa): home page
njfamirm May 10, 2023
a13dbe8
feat(keep-pwa): deploy
njfamirm May 10, 2023
fddf279
chore(keep): remove unnecessary code
njfamirm May 10, 2023
9bc4984
fix(keep): import issue
njfamirm May 10, 2023
63c830c
feat(keep): update home content
njfamirm May 10, 2023
149591d
feat(keep-pwa): l18e
njfamirm May 12, 2023
6c49126
feat(keep-pwa): submit-form-command-handler
njfamirm May 12, 2023
7f941be
feat(keep-pwa): collaboration form
njfamirm May 12, 2023
72a8afe
fix(keep-pwa): use LocalizeMixin for app-footer
njfamirm May 12, 2023
817345f
fix(keep-pwa): home page content type
njfamirm May 12, 2023
22e5130
fix(keep-pwa): i18n key
njfamirm May 12, 2023
25d7ef5
feat(cloud/keep): add form-registration
njfamirm May 12, 2023
54686a2
fix(keep-pwa): pwa name, description on html and manifest
njfamirm May 12, 2023
097125b
fix(keep-pwa): review issue
njfamirm May 12, 2023
8371e95
feat(keep-pwa): update social media link
njfamirm May 12, 2023
88dafd9
feat(keep-pwa): token
njfamirm May 12, 2023
cbdda1e
feat(cloud/keep): api access token
njfamirm May 12, 2023
6b96004
fix(keep-pwa): add media print to style
njfamirm May 13, 2023
e01aafd
chore(cloud/keep): remove canary env
njfamirm May 13, 2023
958b336
feat(workflow.publish-alwatr-container): add keep-pwa
njfamirm May 17, 2023
e782763
deps(keep-pwa): update to 0.32
njfamirm Jun 14, 2023
3cc5566
fix(keep): color palette
alimd Jun 14, 2023
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
5 changes: 5 additions & 0 deletions .github/workflows/publish-alwatr-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ jobs:
dockerfile: cloud/container/alwatr-pwa.dockerfile
description: Customer Order Management PWA.

- image: keep-pwa
source: uniquely/keep-pwa
dockerfile: cloud/container/alwatr-pwa.dockerfile
description: Keep PWA.

- image: com-api
source: uniquely/com-api
dockerfile: cloud/container/alwatr-services.dockerfile
Expand Down
106 changes: 106 additions & 0 deletions cloud/alwatr/keep/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
networks:
internal:
alwatr-public-network:
name: alwatr-public-network
external: true

services:
pwa:
image: ghcr.io/alimd/keep-pwa:${PWA_VERSION}

cpu_count: 1
cpu_shares: 1024
mem_limit: 256m

restart: unless-stopped

networks:
alwatr-public-network:

logging:
driver: json-file
options:
max-size: '10m'
max-file: '2'

environment:
- NGINX_ACCESS_LOG=${PWA_ACCESS_LOG:-off}
- API_ACCESS_TOKEN=${API_ACCESS_TOKEN}

labels:
traefik.enable: true
traefik.port: 80
traefik.frontend.rule: Host:${DOMAIN}; PathPrefix:/
traefik.frontend.entryPoints: http, https
traefik.frontend.redirect.entryPoint: https

storage-server:
image: ghcr.io/alimd/storage-server:${STORAGE_SERVER_VERSION}

cpu_count: 1
cpu_shares: 1024
mem_limit: 256m

stop_grace_period: 30s

restart: unless-stopped

networks:
internal:
aliases:
- '${APP_ID}-storage-server'

environment:
- STORAGE_PATH=/storage
- ACCESS_TOKEN=${STORAGE_TOKEN}
- ALWATR_DEBUG=${STORAGE_SERVER_DEBUG:-}

volumes:
- type: bind
source: ./_data/storage
target: /storage
bind:
create_host_path: true

logging:
driver: json-file
options:
max-size: '10m'
max-file: '2'

form-registration:
njfamirm marked this conversation as resolved.
Show resolved Hide resolved
image: ghcr.io/alimd/form-registration:${FORM_REGISTRATION_VERSION}

cpu_count: 1
cpu_shares: 1024
mem_limit: 256m

restart: unless-stopped

networks:
internal:
alwatr-public-network:

depends_on:
- storage-server

environment:
- STORAGE_HOST=${APP_ID}-storage-server
- STORAGE_PORT=80
- STORAGE_TOKEN=${STORAGE_TOKEN}
- ACCESS_TOKEN=${API_ACCESS_TOKEN}
- FORM_LIST=${FORM_REGISTRATION_LIST}
- ALWATR_DEBUG=${FORM_REGISTRATION_DEBUG:-}

logging:
driver: json-file
options:
max-size: '10m'
max-file: '2'

labels:
traefik.enable: true
traefik.port: 80
traefik.frontend.rule: Host:${DOMAIN}; PathPrefix:/api/v0/form/
traefik.frontend.entryPoints: http, https
traefik.frontend.redirect.entryPoint: https
3 changes: 3 additions & 0 deletions cloud/alwatr/keep/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

source ../../classic/lib/deploy.sh
11 changes: 11 additions & 0 deletions cloud/alwatr/keep/env/keep-beta.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
U2FsdGVkX185BxaW3WchKkEJMHXAhXV4Z12U+dvZOvD3JYeMf7wgfi2cekkFWq6H
nMFD/dSciHQ1dDkIVpjoOlkr+vlU0+TxFX13hCjZqwov8lrYLlHG4X8pLaELriBH
SR1vwuw7j5VMHRfgrh7FKgyI0xDZydq0XPStICdFuh5orNgjDOZc8nyoTxq7iWV9
waJxKqRe+yPT5pHX3fpB4N0DwY9xfBQ6VztOaP6MB3BEQKV5n4Um6YalF8GSOULV
lNbMxwA2laQTltJzN1KSCEtlTCbZkr5epUGM0AlB/aN9fcWV+x299gj29KaJkHgo
O8x7nhvAsFYhmEUVpIorUNcEu4jGxKHkUDOZY6k8KKjrX6ieI9tdj/waPqd+AGv1
3CxPnXB843Zvp7cQ7J/fLvfXXnO6PkXUyAhpr10TveUdx8+OIkvzp3pj9pW3ATJm
/ox3KKbXvAUzAkFAnCERuoh6x5HWARoFUV2wzZA4TJXCqT7nnA6Wz17LY5SD+aHF
wDZFqyfwSmxVKEq+i/uu0+21NgDUoC+WXG+NBfTTznq5ZxHRpZ1YOTOJFtwQLqDv
FQ3rCwgJ18ATB6jeLsJ8VbR3gdiu2hb0XdvCijLRxgADQ2hKiMKYEAAT/piz3rFH
tWFqbZ+9ZWfJDaIRYBDWduKZ6bituXjtzKW6Gr12PQiyC30JVxBvdq8X82e+oJ+H
11 changes: 11 additions & 0 deletions cloud/alwatr/keep/env/keep.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
U2FsdGVkX1/pduxljtvI8MU7n7p576dWYQhoisET5kWl7s+YS4Xny4xhxtX8VAGl
3EhJ9r/3fzZ5MdC+OoTy+6eq/QHpk/JLiwr7JrTaBLvl5sOQQs2shBJ1XDgrQfim
Cn+vDvP/KHlnMBz67LpnptxYsWK0kXhSm5doj3ZsbwL7YDeH5zYZgslpkA+dpUlw
INA995Ssx7CfJXqslHcR0Pktywu6vkznvz1md6GW3foZ7GR+VEsE1y8F3ovQRW9+
RVQuJY2y6tOz1LYsL1nzBg+RtYF3z4xdlDGMrKLTsph/jz2iAU+SZgbpGMc6tH39
/astVIiDvlnip/t1OYupLDH8puWvoNmdx3/rSYh6/SayBk2EHdXWFvcuYp04t+lo
1kBozcuQdP5ERpc7Kb5cJgn4daQlaE/OMSrPElUNqp8O9fMrMelTVW0LIeq+eZ/2
ncAgcZjDG8KyNniPKwi/4hYXMMF6BAWU8Wj7uMkSQQEFIuATHh62OmkONSahPaKn
dMBOY9JVerinduRnC7RkFtAbBsuLC7RqoGcr68ZgyZaCxwoAf3Vdkb61q4sLzgUb
7Rydk6by+CqYvdL6cxYUDji/UTfTgHN5yEqmDrMDlIyeNxLpTDOmfaQjlXsRklkU
V7OPlYG2f498HkYPWyDU4dcI5Hoj/Hwl5p3rGF9u5b4=
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
{"path": "./uniquely/soffit-pwa"},
{"path": "./uniquely/com-api"},
{"path": "./uniquely/com-pwa"},
{"path": "./uniquely/keep-pwa"},

// labs
{"path": "./labs/zx-example"}
Expand Down
111 changes: 111 additions & 0 deletions ui/ui-kit/style/theme/palette-40.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
:root {
/* HCT 40 (keep #f06627) */

/* primary */
--ref-palette-primary0: 0, 0%, 0%;
--ref-palette-primary10: 15.3, 100%, 10.8%;
--ref-palette-primary20: 18.7, 100%, 17.6%;
--ref-palette-primary25: 19.4, 100%, 21.2%;
--ref-palette-primary30: 20.3, 100%, 24.9%;
--ref-palette-primary35: 20.8, 100%, 28.8%;
--ref-palette-primary40: 21.3, 100%, 32.5%;
--ref-palette-primary50: 20.4, 89.8%, 42.4%;
--ref-palette-primary60: 18.8, 87%, 54.7%;
--ref-palette-primary70: 17.4, 100%, 68.2%;
--ref-palette-primary80: 16.5, 100%, 80%;
--ref-palette-primary90: 15.9, 100%, 90.4%;
--ref-palette-primary95: 15, 100%, 95.3%;
--ref-palette-primary98: 13.3, 100%, 98.2%;
--ref-palette-primary99: 300, 100%, 99.2%;
--ref-palette-primary100: 0, 0%, 100%;

/* secondary */
--ref-palette-secondary0: 0, 0%, 0%;
--ref-palette-secondary10: 17.4, 54.4%, 11.2%;
--ref-palette-secondary20: 16.7, 36%, 19.6%;
--ref-palette-secondary25: 17.4, 31.1%, 23.9%;
--ref-palette-secondary30: 16.5, 27.4%, 28.6%;
--ref-palette-secondary35: 15.7, 24.7%, 33.3%;
--ref-palette-secondary40: 16.4, 22.7%, 38%;
--ref-palette-secondary50: 15.3, 19.2%, 48%;
--ref-palette-secondary60: 16.8, 23.4%, 58%;
--ref-palette-secondary70: 16.7, 33.7%, 68.6%;
--ref-palette-secondary80: 16.1, 53.8%, 79.6%;
--ref-palette-secondary90: 15.9, 100%, 90.4%;
--ref-palette-secondary95: 15, 100%, 95.3%;
--ref-palette-secondary98: 13.3, 100%, 98.2%;
--ref-palette-secondary99: 300, 100%, 99.2%;
--ref-palette-secondary100: 0, 0%, 100%;

/* tertiary */
--ref-palette-tertiary0: 0, 0%, 0%;
--ref-palette-tertiary10: 49.1, 100%, 6.5%;
--ref-palette-tertiary20: 50.4, 80.6%, 12.2%;
--ref-palette-tertiary25: 49.6, 61.9%, 16.5%;
--ref-palette-tertiary30: 50.9, 50.5%, 20.6%;
--ref-palette-tertiary35: 49.1, 42.6%, 25.3%;
--ref-palette-tertiary40: 49.3, 36.8%, 29.8%;
--ref-palette-tertiary50: 49, 30%, 39.2%;
--ref-palette-tertiary60: 49.5, 25.3%, 48.8%;
--ref-palette-tertiary70: 48.4, 32.1%, 59%;
--ref-palette-tertiary80: 48.9, 44.9%, 69.4%;
--ref-palette-tertiary90: 48.5, 72.3%, 80.2%;
--ref-palette-tertiary95: 48.2, 100%, 86.1%;
--ref-palette-tertiary98: 41.1, 100%, 96.3%;
--ref-palette-tertiary99: 300, 100%, 99.2%;
--ref-palette-tertiary100: 0, 0%, 100%;

/* neutral */
--ref-palette-neutral0: 0, 0%, 0%;
--ref-palette-neutral10: 15, 14.3%, 11%;
--ref-palette-neutral20: 18, 10.2%, 19.2%;
--ref-palette-neutral25: 18, 8.3%, 23.5%;
--ref-palette-neutral30: 16.4, 7.7%, 28%;
--ref-palette-neutral35: 16.4, 6.6%, 32.7%;
--ref-palette-neutral40: 10.9, 5.8%, 37.5%;
--ref-palette-neutral50: 13.8, 5.4%, 47.3%;
--ref-palette-neutral60: 12.9, 6.4%, 57.3%;
--ref-palette-neutral70: 16, 9.1%, 67.6%;
--ref-palette-neutral80: 15, 14.5%, 78.4%;
--ref-palette-neutral90: 14.1, 32.1%, 89.6%;
--ref-palette-neutral95: 14.1, 68%, 95.1%;
--ref-palette-neutral98: 13.3, 100%, 98.2%;
--ref-palette-neutral99: 300, 100%, 99.2%;
--ref-palette-neutral100: 0, 0%, 100%;

/* neutral-variant */
--ref-palette-neutral-variant0: 0, 0%, 0%;
--ref-palette-neutral-variant10: 17.6, 29.8%, 11.2%;
--ref-palette-neutral-variant20: 15.8, 19.2%, 19.4%;
--ref-palette-neutral-variant25: 15, 16.4%, 23.9%;
--ref-palette-neutral-variant30: 14.3, 14.5%, 28.4%;
--ref-palette-neutral-variant35: 16.4, 13.1%, 32.9%;
--ref-palette-neutral-variant40: 16.4, 11.5%, 37.6%;
--ref-palette-neutral-variant50: 15, 9.9%, 47.5%;
--ref-palette-neutral-variant60: 16.2, 12%, 57.6%;
--ref-palette-neutral-variant70: 15.6, 16.6%, 68%;
--ref-palette-neutral-variant80: 14.5, 27.1%, 79%;
--ref-palette-neutral-variant90: 15.5, 60.8%, 90%;
--ref-palette-neutral-variant95: 15, 100%, 95.3%;
--ref-palette-neutral-variant98: 13.3, 100%, 98.2%;
--ref-palette-neutral-variant99: 300, 100%, 99.2%;
--ref-palette-neutral-variant100: 0, 0%, 100%;

/* error */
--ref-palette-error0: 0, 0%, 0%;
--ref-palette-error10: 358.2, 100%, 12.7%;
--ref-palette-error20: 357.1, 100%, 20.6%;
--ref-palette-error25: 356.7, 100%, 24.7%;
--ref-palette-error30: 355.9, 100%, 28.8%;
--ref-palette-error35: 356.6, 92%, 34.3%;
--ref-palette-error40: 0, 75.5%, 41.6%;
--ref-palette-error50: 2.4, 72.5%, 52.9%;
--ref-palette-error60: 3.6, 100%, 64.3%;
--ref-palette-error70: 5.5, 100%, 74.5%;
--ref-palette-error80: 6.4, 100%, 83.5%;
--ref-palette-error90: 5.9, 100%, 92%;
--ref-palette-error95: 8.6, 100%, 95.9%;
--ref-palette-error98: 7.5, 100%, 98.4%;
--ref-palette-error99: 300, 100%, 99.2%;
--ref-palette-error100: 0, 0%, 100%;
}
1 change: 1 addition & 0 deletions uniquely/keep-pwa/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Keep PWA
2 changes: 2 additions & 0 deletions uniquely/keep-pwa/esbuild.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
import '@alwatr/pwa-helper/esbuild.mjs';
60 changes: 60 additions & 0 deletions uniquely/keep-pwa/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "@alwatr/keep-pwa",
"version": "0.32.0",
"description": "Alwatr Keep PWA.",
"type": "module",
"author": "S. Ali Mihandoost <[email protected]> (https://ali.mihandoost.com)",
"contributors": [
"S. Amir Mohammad Najafi <[email protected]> (https://njfamirm.ir)"
],
"private": true,
"engines": {
"node": ">=18.13.0",
"npm": ">=8.0.0",
"yarn": ">=1.22.0"
},
"browserslist": "> 0.1%, not dead",
"repository": {
"type": "git",
"url": "https://github.com/AliMD/alwatr",
"directory": "uniquely/keep-pwa"
},
"scripts": {
"b": "yarn build-dev",
"cb": "run-s clean build-dev",
"s": "yarn start",
"w": "yarn watch",
"start": "NODE_OPTIONS=--enable-source-maps run-s clean build serve",
"clean": "rm -rf dist build .tsbuildinfo",
"build": "yarn build:es",
"build-dev": "run-s build:root build:tsc \"build:es --debug\"",
"build:es": "./esbuild.mjs",
"build:tsc": "tsc --build",
"build:root": "cd ../../ && yarn build:ts",
"serve": "wds",
"watch": "run-p watch:root watch:es serve",
"watch:es": "yarn build:es --clean --watch --debug",
"watch:root": "cd ../../ && yarn watch:ts"
},
"devDependencies": {
"@alwatr/element": "^0.32.0",
"@alwatr/fetch": "^0.32.0",
"@alwatr/fsm": "^0.32.0",
"@alwatr/context": "^0.32.0",
"@alwatr/i18n": "^0.32.0",
"@alwatr/math": "^0.32.0",
"@alwatr/pwa-helper": "^0.32.0",
"@alwatr/router": "^0.32.0",
"@alwatr/signal": "^0.32.0",
"@alwatr/type": "^0.32.0",
"@alwatr/ui-kit": "^0.32.0",
"@web/dev-server": "^0.2.1",
"@webcomponents/webcomponentsjs": "^2.8.0",
"esbuild": "^0.17.18",
"lit-analyzer": "^1.2.1",
"npm-run-all": "^4.1.5",
"ts-lit-plugin": "^1.2.1",
"tslib": "^2.5.0",
"typescript": "^5.0.4"
}
}
3 changes: 3 additions & 0 deletions uniquely/keep-pwa/res/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
window.appConfig = {
token: '$API_ACCESS_TOKEN',
}
Binary file added uniquely/keep-pwa/res/image/favicon.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uniquely/keep-pwa/res/image/icon-192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added uniquely/keep-pwa/res/image/icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions uniquely/keep-pwa/res/image/keep.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading