-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from bgpworks/boxhero-electron-2
BoxHero 2.0.0 - initial
- Loading branch information
Showing
84 changed files
with
3,841 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
GITHUB_TOKEN="fill_here" | ||
|
||
# aws | ||
AWS_ACCESS_KEY_ID="fill_here" | ||
AWS_SECRET_ACCESS_KEY="fill_here" | ||
|
||
# for wi32 | ||
WIN_CERT_THUMBPRINT="fill_here" | ||
|
||
# for darwin | ||
APPLE_API_KEY="fill_here" | ||
APPLE_API_KEY_ID="fill_here" | ||
APPLE_API_ISSUER="fill_here" | ||
APPLE_APP_BUNDLE_ID="fill_here" | ||
APPLE_CERTIFICATE_IDENTITY="fill_here" | ||
APPLE_CERTIFICATE="fill_here" | ||
APPLE_CERTIFICATE_PASSWORD="fill_here" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: publish-app | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
deploy-check: | ||
runs-on: macos-latest | ||
steps: | ||
- name: acknowledge deployment request to commenter | ||
id: check | ||
uses: khan/pull-request-comment-trigger@master | ||
with: | ||
trigger: "/publish" | ||
reaction: rocket | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
outputs: | ||
triggered: ${{ steps.check.outputs.triggered }} | ||
|
||
deploy: | ||
runs-on: macos-latest | ||
needs: deploy-check | ||
if: needs.deploy-check.outputs.triggered == 'true' | ||
steps: | ||
- name: Github checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Add osx certs | ||
run: chmod +x ./build/add-osx-cert.sh && ./build/add-osx-cert.sh | ||
env: | ||
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} | ||
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | ||
|
||
- name: Prepare for app notarization (macOS) | ||
run: | | ||
echo '${{ secrets.APPLE_API_KEY }}' > ./AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 | ||
- name: Install Packages | ||
run: yarn install | ||
|
||
- name: Publish app | ||
run: yarn publish-app | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}} | ||
APPLE_APP_BUNDLE_ID: ${{ secrets.APPLE_APP_BUNDLE_ID }} | ||
APPLE_API_KEY_ID: ${{secrets.APPLE_API_KEY_ID}} | ||
APPLE_API_ISSUER: ${{secrets.APPLE_API_ISSUER}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,3 +90,7 @@ typings/ | |
|
||
# Electron-Forge | ||
out/ | ||
|
||
# Top secrets | ||
*.p8 | ||
*.p12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# BoxHero Desktop App | ||
|
||
[박스히어로](https://www.boxhero-app.com) 데스크톱 앱 | ||
|
||
![제품목록](screenshots/item_list.png) | ||
|
||
## NPM Scripts | ||
|
||
### 설치 | ||
|
||
```sh | ||
yarn install | ||
``` | ||
|
||
### 개발 | ||
|
||
```sh | ||
yarn start | ||
``` | ||
|
||
### 패키징 & 배포 | ||
|
||
```sh | ||
yarn package | ||
yarn make | ||
yarn publish | ||
``` | ||
|
||
## 스크린샷 | ||
|
||
![제품 정보](screenshots/item_detail.png) | ||
![대시보드](screenshots/dashboard.png) | ||
![입출고](screenshots/stock_in.png) | ||
![바코드 스캔](screenshots/barcode_scan.png) | ||
![바코드 라벨 디자인](screenshots/label_design.png) | ||
![바코드 라벨 인쇄](screenshots/label_print.png) | ||
![입출고 내역](screenshots/transaction_history.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env sh | ||
|
||
KEY_CHAIN=build.keychain | ||
CERTIFICATE_P12=certificate.p12 | ||
|
||
# Recreate the certificate from the secure environment variable | ||
echo $APPLE_CERTIFICATE | base64 --decode > $CERTIFICATE_P12 | ||
|
||
#create a keychain | ||
security create-keychain -p actions $KEY_CHAIN | ||
|
||
# Make the keychain the default so identities are found | ||
security default-keychain -s $KEY_CHAIN | ||
|
||
# Unlock the keychain | ||
security unlock-keychain -p actions $KEY_CHAIN | ||
|
||
security import $CERTIFICATE_P12 -k $KEY_CHAIN -P $APPLE_CERTIFICATE_PASSWORD -T /usr/bin/codesign; | ||
|
||
security set-key-partition-list -S apple-tool:,apple: -s -k actions $KEY_CHAIN | ||
|
||
# remove certs | ||
rm -fr *.p12 |
Binary file not shown.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** @type {import('lint-staged').Config} */ | ||
module.exports = { | ||
"**/*.(ts|tsx)": () => "npx tsc --noEmit", | ||
"**/*.(ts|tsx|js)": (filenames) => [ | ||
`npx eslint --fix ${filenames.join(" ")}`, | ||
`npx prettier --write ${filenames.join(" ")}`, | ||
], | ||
"**/*.(md|json)": (filenames) => | ||
`npx prettier --write ${filenames.join(" ")}`, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,62 @@ | ||
{ | ||
"name": "boxhero-electron", | ||
"productName": "boxhero-electron", | ||
"productName": "BoxHero", | ||
"version": "2.0.0", | ||
"description": "Simple Inventory Management Solution", | ||
"main": ".vite/build/main.js", | ||
"scripts": { | ||
"start": "electron-forge start", | ||
"package": "electron-forge package", | ||
"make": "electron-forge make", | ||
"publish": "electron-forge publish", | ||
"lint": "eslint --ext .ts,.tsx ." | ||
"publish-app": "electron-forge publish", | ||
"lint": "eslint --ext .ts,.tsx .", | ||
"prepare": "husky install" | ||
}, | ||
"keywords": [], | ||
"author": { | ||
"name": "BitYoungjae", | ||
"email": "bityoungjae@gmail.com" | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/bgpworks/boxhero-electron.git" | ||
}, | ||
"license": "MIT", | ||
"author": "BoxHero, Inc.", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@electron-forge/cli": "^6.4.2", | ||
"@electron-forge/maker-deb": "^6.4.2", | ||
"@electron-forge/maker-dmg": "^6.4.2", | ||
"@electron-forge/maker-rpm": "^6.4.2", | ||
"@electron-forge/maker-squirrel": "^6.4.2", | ||
"@electron-forge/maker-zip": "^6.4.2", | ||
"@electron-forge/plugin-auto-unpack-natives": "^6.4.2", | ||
"@electron-forge/plugin-vite": "^6.4.2", | ||
"@electron-forge/publisher-github": "^6.4.2", | ||
"@electron-forge/publisher-s3": "^6.4.2", | ||
"@types/electron-squirrel-startup": "^1.0.1", | ||
"@types/lodash": "^4.14.200", | ||
"@types/react": "^18.2.29", | ||
"@types/react-dom": "^18.2.14", | ||
"@types/styled-components": "^5.1.29", | ||
"@typescript-eslint/eslint-plugin": "^5.0.0", | ||
"@typescript-eslint/parser": "^5.0.0", | ||
"dotenv": "^16.3.1", | ||
"electron": "27.0.1", | ||
"eslint": "^8.0.1", | ||
"eslint-plugin-import": "^2.25.0", | ||
"ts-node": "^10.0.0", | ||
"husky": "^8.0.0", | ||
"lint-staged": "^15.0.1", | ||
"prettier": "^3.0.3", | ||
"ts-node": "^10.9.1", | ||
"typescript": "~4.5.4" | ||
}, | ||
"dependencies": { | ||
"electron-squirrel-startup": "^1.0.0" | ||
"electron-log": "^5.0.0-rc.1", | ||
"electron-squirrel-startup": "^1.0.0", | ||
"i18next": "^23.6.0", | ||
"i18next-fs-backend": "^2.2.0", | ||
"lodash": "^4.17.21", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-i18next": "^13.3.0", | ||
"styled-components": "^6.1.0", | ||
"update-electron-app": "^3.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** @type {import('prettier').Config} */ | ||
const config = { | ||
trailingComma: "es5", | ||
tabWidth: 2, | ||
semi: true, | ||
singleQuote: false, | ||
bracketSameLine: true, | ||
singleAttributePerLine: true, | ||
}; | ||
|
||
module.exports = config; |
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.
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.
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.
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.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const isWindow = process.platform === "win32"; | ||
export const isMac = process.platform === "darwin"; | ||
export const isDev = process.env.NODE_ENV === "development"; |
Oops, something went wrong.