ac-storage 0.16.2 → 0.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/afron/.vscode/launch.json +43 -0
- package/afron/.vscode/tasks.json +56 -0
- package/afron/LICENSE +674 -0
- package/afron/README.md +23 -0
- package/afron/_img/01.png +0 -0
- package/afron/_img/02.png +0 -0
- package/afron/package.json +40 -0
- package/afron/packages/chatai-models/package.json +34 -0
- package/afron/packages/core/package.json +65 -0
- package/afron/packages/core/vite.config.ts +17 -0
- package/afron/packages/electron/build/entitlements.mac.plist +33 -0
- package/afron/packages/electron/forge.config.js +66 -0
- package/afron/packages/electron/import-static.ps1 +14 -0
- package/afron/packages/electron/package.json +147 -0
- package/afron/packages/electron/rebuild.bat +1 -0
- package/afron/packages/front/.env.development +1 -0
- package/afron/packages/front/.github/copilot-instructions.md +88 -0
- package/afron/packages/front/eslint.config.js +33 -0
- package/afron/packages/front/index.html +13 -0
- package/afron/packages/front/package.json +74 -0
- package/afron/packages/front/public/favicon.icns +0 -0
- package/afron/packages/front/public/favicon.ico +0 -0
- package/afron/packages/front/public/favicon.png +0 -0
- package/afron/packages/front/public/robots.txt +3 -0
- package/afron/packages/front/public/vite.svg +1 -0
- package/afron/packages/front/tsconfig.app.json +44 -0
- package/afron/packages/front/tsconfig.node.json +24 -0
- package/afron/packages/front/vite.config.ts +53 -0
- package/afron/packages/locale/package.json +65 -0
- package/afron/packages/locale/vite.config.ts +17 -0
- package/afron/packages/types/index.js +3 -0
- package/afron/packages/types/package.json +6 -0
- package/afron/packages/types/types/chatai/chatai-model.d.ts +73 -0
- package/afron/packages/types/types/chatai/gemini-safety-setting.d.ts +15 -0
- package/afron/packages/types/types/chatai/index.d.ts +3 -0
- package/afron/packages/types/types/chatai/thinking-efforts.d.ts +4 -0
- package/afron/packages/types/types/event-pipe/global-event.d.ts +43 -0
- package/afron/packages/types/types/event-pipe/index.d.ts +1 -0
- package/afron/packages/types/types/index.d.ts +8 -0
- package/afron/packages/types/types/ipc/data.ts +114 -0
- package/afron/packages/types/types/ipc/declared.d.ts +1 -0
- package/afron/packages/types/types/ipc/index.ts +6 -0
- package/afron/packages/types/types/ipc/interface.d.ts +46 -0
- package/afron/packages/types/types/ipc/invokers.d.ts +181 -0
- package/afron/packages/types/types/ipc/listeners.d.ts +7 -0
- package/afron/packages/types/types/ipc/result.d.ts +3 -0
- package/afron/packages/types/types/ipc-invokers.d.ts +111 -0
- package/afron/packages/types/types/ipc-listeners.d.ts +6 -0
- package/afron/packages/types/types/prompt-form.d.ts +65 -0
- package/afron/packages/types/types/rt/event.d.ts +71 -0
- package/afron/packages/types/types/rt/flow.d.ts +63 -0
- package/afron/packages/types/types/rt/form.d.ts +41 -0
- package/afron/packages/types/types/rt/index.d.ts +4 -0
- package/afron/packages/types/types/rt/rt.d.ts +61 -0
- package/afron/packages/types/types/rt-var/index.ts +5 -0
- package/afron/packages/types/types/rt-var/rt-var-create.ts +39 -0
- package/afron/packages/types/types/rt-var/rt-var-stored.ts +30 -0
- package/afron/packages/types/types/rt-var/rt-var-update.ts +45 -0
- package/afron/packages/types/types/rt-var/rt-var.ts +36 -0
- package/afron/packages/types/types/rt-var/var-data.d.ts +108 -0
- package/afron/packages/types/types/storage-schema/ProfileStorageSchema.d.ts +2 -0
- package/afron/packages/types/types/storage-schema/RT/Flow.d.ts +20 -0
- package/afron/packages/types/types/storage-schema/RT/Metadata.d.ts +16 -0
- package/afron/packages/types/types/storage-schema/RT/Prompts.d.ts +39 -0
- package/afron/packages/types/types/storage-schema/RT/RT.d.ts +4 -0
- package/afron/packages/types/types/storage-schema/RT/index.d.ts +1 -0
- package/afron/packages/types/types/storage-schema/Session/Cache.d.ts +18 -0
- package/afron/packages/types/types/storage-schema/Session/Config.d.ts +7 -0
- package/afron/packages/types/types/storage-schema/Session/Data.d.ts +19 -0
- package/afron/packages/types/types/storage-schema/Session/Session.d.ts +3 -0
- package/afron/packages/types/types/storage-schema/Session/index.d.ts +1 -0
- package/afron/packages/types/types/storage-schema/index.d.ts +116 -0
- package/afron/packages/types/types/utils/index.ts +1 -0
- package/afron/packages/types/types.d.ts +3 -0
- package/afron/scripts/remove-dist.ps1 +10 -0
- package/afron/scripts/remove-install.ps1 +9 -0
- package/afron/scripts/win-vscode.ps1 +17 -0
- package/dist/bundle.cjs +43 -2
- package/dist/bundle.cjs.map +1 -1
- package/dist/bundle.mjs +43 -2
- package/dist/bundle.mjs.map +1 -1
- package/package.json +2 -2
package/afron/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Afron
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
챗봇 클라이언트
|
|
6
|
+
|
|
7
|
+
## 설치
|
|
8
|
+
|
|
9
|
+
- [Relase](https://github.com/hve4638/ai-front/releases)
|
|
10
|
+
|
|
11
|
+
## 사용
|
|
12
|
+
|
|
13
|
+
### 모델 API 설정
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
`우측 상단 버튼 > 설정 > API`에서 필요한 API 키를 추가할 수 있습니다
|
|
18
|
+
|
|
19
|
+
**API를 얻기위한 각 공급자 별 콘솔**
|
|
20
|
+
|
|
21
|
+
- *Google (Gemini)* : [https://console.cloud.google.com](https://console.cloud.google.com/)
|
|
22
|
+
- *Anthropic (Claude)* : [https://console.anthropic.com](https://console.anthropic.com/)
|
|
23
|
+
- *OpenAI (GPT)* : [https://platform.openai.com](https://platform.openai.com/)
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "afron-workspace",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"repository": "https://github.com/hve4638/ai-front.git",
|
|
5
|
+
"author": "Hve <hve4638@gmail.com>",
|
|
6
|
+
"license": "GPL-3.0-only",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "yarn app:start",
|
|
9
|
+
"app:start": "concurrently \"yarn electron:start\" \"yarn front:start\"",
|
|
10
|
+
"front:start": "cd packages/front && yarn start",
|
|
11
|
+
"electron:start": "cd packages/electron && wait-on http://localhost:3600 && yarn start",
|
|
12
|
+
|
|
13
|
+
"build": "yarn chatai:build && yarn core:build && yarn electron:build && yarn front:build",
|
|
14
|
+
"chatai:build": "cd packages/chatai-models && yarn build",
|
|
15
|
+
"core:build": "cd packages/core && yarn build",
|
|
16
|
+
"electron:build": "cd packages/electron && yarn build",
|
|
17
|
+
"front:build": "cd packages/front && yarn build",
|
|
18
|
+
|
|
19
|
+
"dist": "yarn build && yarn electron:load_static && yarn electron:dist",
|
|
20
|
+
"electron:load_static": "cd packages/electron && powershell -ExecutionPolicy Bypass -File ./import-static.ps1",
|
|
21
|
+
"electron:dist": "cd packages/electron && yarn dist:win",
|
|
22
|
+
|
|
23
|
+
"clean": "powershell -ExecutionPolicy Bypass -File ./scripts/remove-dist.ps1",
|
|
24
|
+
|
|
25
|
+
"postinstall": "cd packages/electron && yarn electron-rebuild",
|
|
26
|
+
"uninstall": "powershell -ExecutionPolicy Bypass -File ./scripts/remove-install.ps1"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"concurrently": "^9.0.1",
|
|
30
|
+
"cross-env": "^7.0.3",
|
|
31
|
+
"wait-on": "^8.0.1"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {},
|
|
34
|
+
"private": true,
|
|
35
|
+
"workspaces": {
|
|
36
|
+
"packages": [
|
|
37
|
+
"packages/*"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@afron/chatai-models",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"author": "Hve",
|
|
5
|
+
"main": "./dist/bundle.cjs",
|
|
6
|
+
"module": "./dist/bundle.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"license": "GPL-3.0-only",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "rollup -c"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
|
15
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
16
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
17
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
|
18
|
+
"@types/jest": "^29.5.14",
|
|
19
|
+
"@types/node": "^22.10.2",
|
|
20
|
+
"dotenv": "^16.5.0",
|
|
21
|
+
"jest": "^29.7.0",
|
|
22
|
+
"rollup": "^2.79.2",
|
|
23
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
24
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
25
|
+
"rollup-plugin-ts": "^3.4.5",
|
|
26
|
+
"ts-jest": "^29.2.5",
|
|
27
|
+
"ts-node": "^10.9.2",
|
|
28
|
+
"typescript": "^5.7.2"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@afron/types": "1.0.0",
|
|
32
|
+
"tslib": "^2.8.1"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@afron/core",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "./dist/bundle.cjs",
|
|
5
|
+
"module": "./dist/bundle.mjs",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/bundle.mjs",
|
|
11
|
+
"require": "./dist/bundle.cjs"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "rollup -c",
|
|
16
|
+
"test": "vitest run",
|
|
17
|
+
"coverage": "jest --coverage"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@afron/types": "1.0.0",
|
|
22
|
+
"@hve/channel": "^1.0.1",
|
|
23
|
+
"@hve/chatai": "^0.16.0",
|
|
24
|
+
"@hve/mime": "^1.0.0",
|
|
25
|
+
"ac-storage": "^0.16.2",
|
|
26
|
+
"advanced-prompt-template-lang": "^0.10.4",
|
|
27
|
+
"archiver": "^7.0.1",
|
|
28
|
+
"better-sqlite3": "^12.2.0",
|
|
29
|
+
"file-type": "^21.0.0",
|
|
30
|
+
"istextorbinary": "^9.5.0",
|
|
31
|
+
"js-tiktoken": "^1.0.20",
|
|
32
|
+
"sharp": "^0.34.2",
|
|
33
|
+
"systeminformation": "^5.23.23",
|
|
34
|
+
"tiktoken": "^1.0.21",
|
|
35
|
+
"tslib": "^2.8.1",
|
|
36
|
+
"unzipper": "^0.12.3",
|
|
37
|
+
"uuid": "^11.0.3",
|
|
38
|
+
"win-known-folders": "^1.0.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@babel/core": "^7.28.0",
|
|
42
|
+
"@babel/preset-env": "^7.28.0",
|
|
43
|
+
"@babel/preset-react": "^7.27.1",
|
|
44
|
+
"@electron/rebuild": "^4.0.1",
|
|
45
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
|
46
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
47
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
48
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
|
49
|
+
"@types/archiver": "^6.0.3",
|
|
50
|
+
"@types/jest": "^29.5.14",
|
|
51
|
+
"@types/node": "^22.10.2",
|
|
52
|
+
"@types/unzipper": "^0.10.11",
|
|
53
|
+
"babel-jest": "^30.0.4",
|
|
54
|
+
"dotenv": "^16.5.0",
|
|
55
|
+
"jest": "^29.7.0",
|
|
56
|
+
"rollup": "^2.79.2",
|
|
57
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
58
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
59
|
+
"rollup-plugin-ts": "^3.4.5",
|
|
60
|
+
"ts-jest": "^29.2.5",
|
|
61
|
+
"ts-node": "^10.9.2",
|
|
62
|
+
"typescript": "^5.7.2",
|
|
63
|
+
"vitest": "^3.2.4"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="vitest" />
|
|
2
|
+
import { defineConfig } from 'vite';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
resolve: {
|
|
7
|
+
alias: {
|
|
8
|
+
'@': path.resolve(__dirname, 'src'), // src 경로 alias
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
test: {
|
|
12
|
+
globals: true,
|
|
13
|
+
environment: 'node',
|
|
14
|
+
include: ['src/**/*.test.ts'], // 테스트 경로
|
|
15
|
+
exclude: ['node_modules', 'dist'],
|
|
16
|
+
},
|
|
17
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<!-- Enable hardened runtime -->
|
|
6
|
+
<key>com.apple.security.cs.allow-jit</key>
|
|
7
|
+
<true/>
|
|
8
|
+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
|
9
|
+
<true/>
|
|
10
|
+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
|
11
|
+
<true/>
|
|
12
|
+
|
|
13
|
+
<!-- Network access for AI API calls -->
|
|
14
|
+
<key>com.apple.security.network.client</key>
|
|
15
|
+
<true/>
|
|
16
|
+
<key>com.apple.security.network.server</key>
|
|
17
|
+
<true/>
|
|
18
|
+
|
|
19
|
+
<!-- File system access -->
|
|
20
|
+
<key>com.apple.security.files.user-selected.read-write</key>
|
|
21
|
+
<true/>
|
|
22
|
+
<key>com.apple.security.files.downloads.read-write</key>
|
|
23
|
+
<true/>
|
|
24
|
+
|
|
25
|
+
<!-- Allow loading of unsigned libraries (for native modules) -->
|
|
26
|
+
<key>com.apple.security.cs.disable-library-validation</key>
|
|
27
|
+
<true/>
|
|
28
|
+
|
|
29
|
+
<!-- SQLite and database access -->
|
|
30
|
+
<key>com.apple.security.files.bookmarks.app-scope</key>
|
|
31
|
+
<true/>
|
|
32
|
+
</dict>
|
|
33
|
+
</plist>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const { FusesPlugin } = require('@electron-forge/plugin-fuses');
|
|
2
|
+
const { FuseV1Options, FuseVersion } = require('@electron/fuses');
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
packagerConfig: {
|
|
6
|
+
asar: true,
|
|
7
|
+
icon: './static/favicon',
|
|
8
|
+
appBundleId: 'com.hve.afron',
|
|
9
|
+
appCategoryType: 'public.app-category.productivity',
|
|
10
|
+
},
|
|
11
|
+
rebuildConfig: {},
|
|
12
|
+
makers: [
|
|
13
|
+
{
|
|
14
|
+
name: '@electron-forge/maker-squirrel',
|
|
15
|
+
config: {
|
|
16
|
+
outputDirectory: 'out',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: '@electron-forge/maker-zip',
|
|
21
|
+
platforms: ['darwin'],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: '@electron-forge/maker-dmg',
|
|
25
|
+
config: {
|
|
26
|
+
format: 'ULFO',
|
|
27
|
+
'icon-size': 100,
|
|
28
|
+
contents: (opts) => {
|
|
29
|
+
return [
|
|
30
|
+
{ x: 130, y: 220, type: 'file', path: opts.appPath },
|
|
31
|
+
{ x: 410, y: 220, type: 'link', path: '/Applications' }
|
|
32
|
+
];
|
|
33
|
+
},
|
|
34
|
+
'window': {
|
|
35
|
+
'position': { x: 400, y: 100 },
|
|
36
|
+
'size': { width: 600, height: 420 }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
platforms: ['darwin']
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: '@electron-forge/maker-deb',
|
|
43
|
+
config: {},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: '@electron-forge/maker-rpm',
|
|
47
|
+
config: {},
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
plugins: [
|
|
51
|
+
{
|
|
52
|
+
name: '@electron-forge/plugin-auto-unpack-natives',
|
|
53
|
+
config: {},
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
new FusesPlugin({
|
|
57
|
+
version: FuseVersion.V1,
|
|
58
|
+
[FuseV1Options.RunAsNode]: false,
|
|
59
|
+
[FuseV1Options.EnableCookieEncryption]: true,
|
|
60
|
+
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
|
|
61
|
+
[FuseV1Options.EnableNodeCliInspectArguments]: false,
|
|
62
|
+
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
|
|
63
|
+
[FuseV1Options.OnlyLoadAppFromAsar]: true,
|
|
64
|
+
}),
|
|
65
|
+
],
|
|
66
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Check if static directory exists and delete it if found
|
|
2
|
+
if (Test-Path -Path "static") {
|
|
3
|
+
Write-Host "Removing existing static directory..."
|
|
4
|
+
Remove-Item -Path "static" -Recurse -Force
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
# Check if source directory exists
|
|
8
|
+
if (-not (Test-Path -Path "../front/dist")) {
|
|
9
|
+
Write-Host "Error: ../front/dist directory not found."
|
|
10
|
+
exit 1
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
Copy-Item -Path "../front/dist" -Destination "static" -Recurse
|
|
14
|
+
Write-Host "Files copied successfully."
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@afron/electron",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.11.0",
|
|
5
|
+
"description": "ChatAI Frontend",
|
|
6
|
+
"repository": "https://github.com/hve4638/ai-front.git",
|
|
7
|
+
"author": "Hve",
|
|
8
|
+
"license": "GPL-3.0-only",
|
|
9
|
+
"main": "dist/main.js",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"start": "yarn build && electron-forge start",
|
|
12
|
+
"start:fast": "electron-forge start",
|
|
13
|
+
"start:dev": "yarn build && cross-env ELECTRON_DEV=TRUE electron .",
|
|
14
|
+
"start:dev:mem": "yarn build && cross-env ELECTRON_DEV=TRUE ELECTRON_IN_MEMORY=TRUE electron .",
|
|
15
|
+
"start:release": "yarn build && cross-env ELECTRON_DEV=FALSE electron .",
|
|
16
|
+
"build": "rollup -c",
|
|
17
|
+
"dist": "yarn dist:win",
|
|
18
|
+
"dist:win": "electron-builder -c.extraMetadata.main=./dist/main.js",
|
|
19
|
+
"dist:mac": "electron-builder -c.extraMetadata.main=./dist/main.js --mac",
|
|
20
|
+
"make:mac": "electron-forge make --platform=darwin",
|
|
21
|
+
"playground": "tsx ./src/playground",
|
|
22
|
+
"test": "jest",
|
|
23
|
+
"compile": "tsc",
|
|
24
|
+
"package": "electron-forge package",
|
|
25
|
+
"make": "electron-forge make",
|
|
26
|
+
"electron-rebuild": "electron-rebuild --force --module-dir ../core -w better-sqlite3"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
30
|
+
"@electron-forge/cli": "^7.5.0",
|
|
31
|
+
"@electron-forge/maker-deb": "^7.5.0",
|
|
32
|
+
"@electron-forge/maker-dmg": "^7.5.0",
|
|
33
|
+
"@electron-forge/maker-rpm": "^7.5.0",
|
|
34
|
+
"@electron-forge/maker-squirrel": "^7.5.0",
|
|
35
|
+
"@electron-forge/maker-zip": "^7.5.0",
|
|
36
|
+
"@electron-forge/plugin-auto-unpack-natives": "^7.5.0",
|
|
37
|
+
"@electron-forge/plugin-fuses": "^7.5.0",
|
|
38
|
+
"@electron/fuses": "^1.8.0",
|
|
39
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
|
40
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
41
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
42
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
43
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
44
|
+
"@types/jest": "^29.5.14",
|
|
45
|
+
"better-sqlite3": "^12.2.0",
|
|
46
|
+
"cross-env": "^7.0.3",
|
|
47
|
+
"electron": "37.2.3",
|
|
48
|
+
"electron-builder": "^26.0.12",
|
|
49
|
+
"electron-rebuild": "^3.2.9",
|
|
50
|
+
"jest": "^29.7.0",
|
|
51
|
+
"rollup": "^4.28.1",
|
|
52
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
53
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
54
|
+
"ts-jest": "^29.2.5",
|
|
55
|
+
"ts-node": "^10.9.2",
|
|
56
|
+
"tsx": "^4.19.1",
|
|
57
|
+
"typescript": "^5.6.2"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@afron/chatai-models": "1.0.0",
|
|
61
|
+
"@afron/core": "1.0.0",
|
|
62
|
+
"@afron/types": "1.0.0",
|
|
63
|
+
"balanced-match": "^1.0.2",
|
|
64
|
+
"brace-expansion": "^2.0.1",
|
|
65
|
+
"minimatch": "^9.0.5",
|
|
66
|
+
"@hve/channel": "^1.0.1",
|
|
67
|
+
"@hve/chatai": "^0.12.0",
|
|
68
|
+
"@hve/mime": "^1.0.0",
|
|
69
|
+
"ac-storage": "^0.15.1",
|
|
70
|
+
"date-fns": "^4.1.0",
|
|
71
|
+
"date-fns-tz": "^3.2.0",
|
|
72
|
+
"dotenv": "^16.5.0",
|
|
73
|
+
"electron-localshortcut": "^3.2.1",
|
|
74
|
+
"electron-squirrel-startup": "^1.0.1",
|
|
75
|
+
"js-tiktoken": "^1.0.20",
|
|
76
|
+
"ps-list": "^8.1.1",
|
|
77
|
+
"sanitize-filename": "^1.6.3",
|
|
78
|
+
"sharp": "^0.34.2",
|
|
79
|
+
"systeminformation": "^5.23.23",
|
|
80
|
+
"tiktoken": "^1.0.21",
|
|
81
|
+
"uuid": "^11.0.3",
|
|
82
|
+
"win-known-folders": "^1.0.0"
|
|
83
|
+
},
|
|
84
|
+
"build": {
|
|
85
|
+
"productName": "Afron",
|
|
86
|
+
"appId": "com.hve.afron",
|
|
87
|
+
"extends": null,
|
|
88
|
+
"icon": "./static/favicon.ico",
|
|
89
|
+
"files": [
|
|
90
|
+
".env",
|
|
91
|
+
"dist/**/*",
|
|
92
|
+
"static/**/*",
|
|
93
|
+
"node_modules/**/*",
|
|
94
|
+
"package.json"
|
|
95
|
+
],
|
|
96
|
+
"directories": {
|
|
97
|
+
"buildResources": "static/assets",
|
|
98
|
+
"output": "release"
|
|
99
|
+
},
|
|
100
|
+
"mac": {
|
|
101
|
+
"category": "public.app-category.productivity",
|
|
102
|
+
"icon": "./static/favicon.icns",
|
|
103
|
+
"target": [
|
|
104
|
+
{
|
|
105
|
+
"target": "dmg",
|
|
106
|
+
"arch": [
|
|
107
|
+
"x64",
|
|
108
|
+
"arm64"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"target": "zip",
|
|
113
|
+
"arch": [
|
|
114
|
+
"x64",
|
|
115
|
+
"arm64"
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"artifactName": "${productName}-${version}-mac-${arch}.${ext}",
|
|
120
|
+
"hardenedRuntime": true,
|
|
121
|
+
"gatekeeperAssess": false,
|
|
122
|
+
"entitlements": "./build/entitlements.mac.plist",
|
|
123
|
+
"entitlementsInherit": "./build/entitlements.mac.plist"
|
|
124
|
+
},
|
|
125
|
+
"dmg": {
|
|
126
|
+
"title": "${productName} ${version}",
|
|
127
|
+
"backgroundColor": "#ffffff",
|
|
128
|
+
"window": {
|
|
129
|
+
"width": 600,
|
|
130
|
+
"height": 420
|
|
131
|
+
},
|
|
132
|
+
"contents": [
|
|
133
|
+
{
|
|
134
|
+
"x": 130,
|
|
135
|
+
"y": 220,
|
|
136
|
+
"type": "file"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"x": 410,
|
|
140
|
+
"y": 220,
|
|
141
|
+
"type": "link",
|
|
142
|
+
"path": "/Applications"
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.\node_modules\.bin\electron-rebuild
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VITE_DEV=TRUE
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Frontend Coding Guidelines
|
|
2
|
+
|
|
3
|
+
## Import & Path Alias
|
|
4
|
+
|
|
5
|
+
- `@/` alias 사용 (예: `@/components/atoms/Button`)
|
|
6
|
+
- 같은 도메인(폴더) 내에서는 상대경로 사용 (예: `../types.ts`)
|
|
7
|
+
|
|
8
|
+
## 문자열
|
|
9
|
+
|
|
10
|
+
- 큰따옴표(") 대신 작은따옴표(') 사용
|
|
11
|
+
|
|
12
|
+
## 스타일링
|
|
13
|
+
|
|
14
|
+
- 컴포넌트 스타일: `컴포넌트명.module.scss` 생성 후 import
|
|
15
|
+
- 스타일 관련 참고: `@/assets/style/`
|
|
16
|
+
|
|
17
|
+
## 컴포넌트 사용
|
|
18
|
+
|
|
19
|
+
- 네이티브 `<button>`, `<input>` 대신 커스텀 컴포넌트 사용
|
|
20
|
+
- Button: `@/components/atoms/Button`
|
|
21
|
+
- CheckBox: `@/components/atoms/CheckBox`
|
|
22
|
+
- Dropdown: `@/components/atoms/Dropdown`
|
|
23
|
+
- Slider: `@/components/atoms/Slider`
|
|
24
|
+
- 레이아웃: `@/components/layout` (Row, Column, Grid, Flex, Center, Gap)
|
|
25
|
+
- 조건부 클래스: `classnames` 라이브러리 사용
|
|
26
|
+
|
|
27
|
+
## 디렉토리 구조
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
src/
|
|
31
|
+
├── components/ # 공용 컴포넌트
|
|
32
|
+
│ ├── atoms/ # 원자 컴포넌트 (Button, CheckBox 등)
|
|
33
|
+
│ ├── layout/ # 레이아웃 컴포넌트
|
|
34
|
+
│ └── container/ # 컨테이너 컴포넌트
|
|
35
|
+
├── features/ # 독립적 기능 단위 (modal, workflow 등)
|
|
36
|
+
├── hooks/ # 공용 훅
|
|
37
|
+
├── stores/ # Zustand 스토어
|
|
38
|
+
├── modals/ # 모달 컴포넌트
|
|
39
|
+
├── pages/ # 페이지 컴포넌트
|
|
40
|
+
├── context/ # React Context
|
|
41
|
+
├── types/ # 공용 타입 정의
|
|
42
|
+
├── lib/ # 라이브러리/유틸리티
|
|
43
|
+
├── api/ # API 레이어
|
|
44
|
+
└── constants/ # 상수 정의
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 컴포넌트 파일 구조
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
ComponentName/
|
|
51
|
+
├── index.ts # export 및 스타일 import
|
|
52
|
+
├── ComponentName.tsx # 메인 컴포넌트
|
|
53
|
+
├── ComponentName.module.scss # 스타일
|
|
54
|
+
├── types.ts # 타입 (필요시)
|
|
55
|
+
└── utils.ts # 유틸 (필요시)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## 페이지 구조
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
PageName/
|
|
62
|
+
├── index.ts # export
|
|
63
|
+
├── PageName.tsx # 메인 페이지
|
|
64
|
+
├── layout/ # 페이지 내부 레이아웃
|
|
65
|
+
└── hooks/ # 페이지 전용 훅
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## 모달 시스템
|
|
69
|
+
|
|
70
|
+
- 모달 컴포넌트: `@/features/modal` (Modal, ModalProvider, useModal, useModalInstance)
|
|
71
|
+
- Dialog 패턴: `@/modals/Dialog` (ConfirmDialog, InfoDialog 등)
|
|
72
|
+
- 사용법 참고: `@/modals/SettingModal/`
|
|
73
|
+
|
|
74
|
+
## 타입 정의
|
|
75
|
+
|
|
76
|
+
- 공용 타입: `@/types/`
|
|
77
|
+
- 컴포넌트별 타입: 해당 폴더 내 `types.ts`
|
|
78
|
+
- React 컴포넌트 Props 타입 참고: `@/types/common-props.ts`, `@/types/react-node-props.ts`
|
|
79
|
+
|
|
80
|
+
## 훅 (Hooks)
|
|
81
|
+
|
|
82
|
+
- 공용 훅: `@/hooks/`
|
|
83
|
+
- 도메인 전용 훅: 해당 폴더 내 `hooks/`
|
|
84
|
+
- 훅 파일명: `useXxx.ts`
|
|
85
|
+
|
|
86
|
+
# 출력 가이드
|
|
87
|
+
|
|
88
|
+
최종 응답시 한글로 답변할 것
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
+
import tseslint from 'typescript-eslint'
|
|
6
|
+
|
|
7
|
+
export default tseslint.config(
|
|
8
|
+
{ ignores: ['dist'] },
|
|
9
|
+
{
|
|
10
|
+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
11
|
+
files: ['**/*.{ts,tsx}'],
|
|
12
|
+
languageOptions: {
|
|
13
|
+
ecmaVersion: 2020,
|
|
14
|
+
globals: globals.browser,
|
|
15
|
+
},
|
|
16
|
+
plugins: {
|
|
17
|
+
'react-hooks': reactHooks,
|
|
18
|
+
'react-refresh': reactRefresh,
|
|
19
|
+
},
|
|
20
|
+
rules: {
|
|
21
|
+
...reactHooks.configs.recommended.rules,
|
|
22
|
+
'react-refresh/only-export-components': [
|
|
23
|
+
'warn',
|
|
24
|
+
{ allowConstantExport: true },
|
|
25
|
+
],
|
|
26
|
+
'@typescript-eslint/no-unused-vars': 'warn',
|
|
27
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
28
|
+
'@typescript-eslint/no-unused-expressions': 'error',
|
|
29
|
+
'@typescript-eslint/no-namespace': 'warn',
|
|
30
|
+
'no-unused-private-class-members': 'warn',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Afron</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@afron/frontend",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "GPL-3.0-only",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "vite",
|
|
9
|
+
"start:test": "cross-env VITE_TEST=TRUE vite",
|
|
10
|
+
"build": "tsc -b && vite build",
|
|
11
|
+
"lint": "eslint .",
|
|
12
|
+
"preview": "vite preview"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@afron/types": "1.0.0",
|
|
16
|
+
"@emotion/react": "^11.14.0",
|
|
17
|
+
"@emotion/styled": "^11.14.1",
|
|
18
|
+
"@hve/channel": "^1.0.1",
|
|
19
|
+
"@monaco-editor/react": "^4.6.0",
|
|
20
|
+
"@mui/material": "^7.3.1",
|
|
21
|
+
"@tailwindcss/vite": "^4.1.3",
|
|
22
|
+
"@types/react": "^19.0.0",
|
|
23
|
+
"@types/react-dom": "^19.0.0",
|
|
24
|
+
"@xyflow/react": "^12.8.6",
|
|
25
|
+
"advanced-prompt-template-lang": "^0.10.4",
|
|
26
|
+
"classnames": "^2.5.1",
|
|
27
|
+
"crypto-js": "^4.2.0",
|
|
28
|
+
"i18next": "^24.2.1",
|
|
29
|
+
"install": "^0.13.0",
|
|
30
|
+
"jest": "^29.7.0",
|
|
31
|
+
"js-tiktoken": "^1.0.20",
|
|
32
|
+
"npm": "^11.6.1",
|
|
33
|
+
"rc-slider": "^11.1.8",
|
|
34
|
+
"rc-tooltip": "^6.4.0",
|
|
35
|
+
"react": "^19.0.0",
|
|
36
|
+
"react-cookie": "^7.2.2",
|
|
37
|
+
"react-dom": "^19.0.0",
|
|
38
|
+
"react-focus-lock": "^2.13.6",
|
|
39
|
+
"react-i18next": "^15.4.0",
|
|
40
|
+
"react-intersection-observer": "^9.16.0",
|
|
41
|
+
"react-loading": "^2.0.3",
|
|
42
|
+
"react-markdown": "^9.0.1",
|
|
43
|
+
"react-router": "^7.1.5",
|
|
44
|
+
"react-router-dom": "^7.1.5",
|
|
45
|
+
"react-tooltip": "^5.29.0",
|
|
46
|
+
"rehype-highlight": "^7.0.2",
|
|
47
|
+
"rehype-raw": "^7.0.0",
|
|
48
|
+
"remark-breaks": "^4.0.0",
|
|
49
|
+
"remark-gfm": "^4.0.1",
|
|
50
|
+
"sass": "^1.80.6",
|
|
51
|
+
"spinners-react": "^1.0.10",
|
|
52
|
+
"tailwindcss": "^4.1.3",
|
|
53
|
+
"uuid": "^11.1.0",
|
|
54
|
+
"wicg-inert": "^3.1.3",
|
|
55
|
+
"zustand": "^5.0.3"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@eslint/js": "^9.13.0",
|
|
59
|
+
"@types/jest": "^29.5.14",
|
|
60
|
+
"@types/node": "^24.1.0",
|
|
61
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
62
|
+
"babel-plugin-react-compiler": "^19.1.0-rc.3",
|
|
63
|
+
"cross-env": "^7.0.3",
|
|
64
|
+
"eslint": "^9.13.0",
|
|
65
|
+
"eslint-plugin-react-hooks": "^6.0.0-rc.1",
|
|
66
|
+
"eslint-plugin-react-refresh": "^0.4.14",
|
|
67
|
+
"globals": "^15.11.0",
|
|
68
|
+
"ts-jest": "^29.3.1",
|
|
69
|
+
"ts-node": "^10.9.2",
|
|
70
|
+
"typescript": "~5.6.2",
|
|
71
|
+
"typescript-eslint": "^8.11.0",
|
|
72
|
+
"vite": "^5.4.10"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
Binary file
|
|
Binary file
|