Skip to content

Commit 1d2c0e0

Browse files
Add desktop package.json, license, and shell scripts
1 parent 58f32b2 commit 1d2c0e0

3 files changed

Lines changed: 299 additions & 0 deletions

File tree

apps/desktop/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 CodinIT.dev
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

apps/desktop/bindings.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
bindings=""
4+
5+
# Function to extract variable names from the TypeScript interface
6+
extract_env_vars() {
7+
grep -o '[A-Z_]\+:' worker-configuration.d.ts | sed 's/://'
8+
}
9+
10+
# First try to read from .env.local if it exists
11+
if [ -f ".env.local" ]; then
12+
while IFS= read -r line || [ -n "$line" ]; do
13+
if [[ ! "$line" =~ ^# ]] && [[ -n "$line" ]]; then
14+
name=$(echo "$line" | cut -d '=' -f 1)
15+
value=$(echo "$line" | cut -d '=' -f 2-)
16+
value=$(echo $value | sed 's/^"\(.*\)"$/\1/')
17+
bindings+="--binding ${name}=${value} "
18+
fi
19+
done < .env.local
20+
else
21+
# If .env.local doesn't exist, use environment variables defined in .d.ts
22+
env_vars=($(extract_env_vars))
23+
# Generate bindings for each environment variable if it exists
24+
for var in "${env_vars[@]}"; do
25+
if [ -n "${!var}" ]; then
26+
bindings+="--binding ${var}=${!var} "
27+
fi
28+
done
29+
fi
30+
31+
bindings=$(echo $bindings | sed 's/[[:space:]]*$//')
32+
33+
echo $bindings

apps/desktop/package.json

Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
{
2+
"name": "@codinit/desktop",
3+
"description": "An AI-Powered Development Platform - Desktop App",
4+
"private": true,
5+
"license": "MIT",
6+
"sideEffects": false,
7+
"type": "module",
8+
"version": "1.0.0",
9+
"author": {
10+
"name": "Gerome-Elassaad",
11+
"email": "gerome.e24@gmail.com"
12+
},
13+
"scripts": {
14+
"deploy": "npm run build && wrangler pages deploy",
15+
"build": "NODE_OPTIONS='--max-old-space-size=4096' remix vite:build",
16+
"dev": "node pre-start.mjs && remix vite:dev",
17+
"test": "vitest --run",
18+
"test:watch": "vitest",
19+
"lint": "eslint --cache --cache-location ./node_modules/.cache/eslint app",
20+
"lint:fix": "npm run lint -- --fix && prettier app --write",
21+
"start:windows": "wrangler pages dev ./build/client",
22+
"start:unix": "bindings=$(./bindings.sh) && wrangler pages dev ./build/client $bindings",
23+
"start": "node -e \"const { spawn } = require('child_process'); const isWindows = process.platform === 'win32'; const cmd = isWindows ? 'npm run start:windows' : 'npm run start:unix'; const child = spawn(cmd, { shell: true, stdio: 'inherit' }); child.on('exit', code => process.exit(code));\"",
24+
"dockerstart": "bindings=$(./bindings.sh) && wrangler pages dev ./build/client $bindings --ip 0.0.0.0 --port 5173 --no-show-interactive-dev-session",
25+
"dockerrun": "docker run -it -d --name codinit-ai-live -p 5173:5173 --env-file .env codinit-ai",
26+
"dockerbuild:prod": "docker build -t codinit-ai:production -t codinit-ai:latest --target codinit-ai-production .",
27+
"dockerbuild": "docker build -t codinit-ai:development -t codinit-ai:latest --target codinit-ai-development .",
28+
"typecheck": "tsc",
29+
"typegen": "wrangler types",
30+
"preview": "pnpm run build && pnpm run start",
31+
"clean": "node scripts/clean.js",
32+
"electron:dev": "node scripts/electron-dev.mjs",
33+
"electron:dev:inspect": "NODE_ENV=development electron --inspect=9229 build/electron/main/index.mjs",
34+
"electron:build:deps": "pnpm electron:build:main && pnpm electron:build:preload",
35+
"electron:build:main": "vite build --config ./electron/main/vite.config.ts",
36+
"electron:build:preload": "vite build --config ./electron/preload/vite.config.ts",
37+
"electron:build:renderer": "NODE_OPTIONS='--max-old-space-size=8192' pnpm exec remix vite:build --config vite-electron.config.js",
38+
"electron:build:unpack": "rm -rf dist && pnpm electron:build:renderer && pnpm electron:build:deps && electron-builder --dir",
39+
"electron:build:mac": "rm -rf dist && pnpm electron:build:renderer && pnpm electron:build:deps && electron-builder --mac",
40+
"electron:build:win": "rm -rf dist && pnpm electron:build:renderer && pnpm electron:build:deps && electron-builder --win",
41+
"electron:build:linux": "rm -rf dist && pnpm electron:build:renderer && pnpm electron:build:deps && electron-builder --linux",
42+
"electron:build:dist": "rm -rf dist && pnpm electron:build:renderer && pnpm electron:build:deps && electron-builder --mwl",
43+
"electron:build:simple": "pnpm electron:build:renderer && pnpm electron:build:deps && echo Build complete - run electron . to test",
44+
"convert:icon": "node scripts/convert-icon.mjs",
45+
"build:dmg": "pnpm convert:icon && pnpm electron:build:mac"
46+
},
47+
"engines": {
48+
"node": ">=18.18.0"
49+
},
50+
"dependencies": {
51+
"@ai-sdk/amazon-bedrock": "1.0.6",
52+
"@ai-sdk/anthropic": "0.0.39",
53+
"@ai-sdk/cohere": "1.0.3",
54+
"@ai-sdk/deepseek": "0.1.3",
55+
"@ai-sdk/google": "0.0.52",
56+
"@ai-sdk/mistral": "0.0.43",
57+
"@ai-sdk/openai": "1.1.2",
58+
"@ai-sdk/react": "^1.2.12",
59+
"@ai-sdk/ui-utils": "^1.2.11",
60+
"@codemirror/autocomplete": "^6.19.0",
61+
"@codemirror/commands": "^6.9.0",
62+
"@codemirror/lang-cpp": "^6.0.3",
63+
"@codemirror/lang-css": "^6.3.1",
64+
"@codemirror/lang-html": "^6.4.11",
65+
"@codemirror/lang-javascript": "^6.2.4",
66+
"@codemirror/lang-json": "^6.0.2",
67+
"@codemirror/lang-markdown": "^6.4.0",
68+
"@codemirror/lang-python": "^6.2.1",
69+
"@codemirror/lang-sass": "^6.0.2",
70+
"@codemirror/lang-vue": "^0.1.3",
71+
"@codemirror/lang-wast": "^6.0.2",
72+
"@codemirror/language": "^6.11.3",
73+
"@codemirror/search": "^6.5.11",
74+
"@codemirror/state": "^6.5.2",
75+
"@codemirror/view": "^6.38.4",
76+
"@electron/packager": "^18.4.4",
77+
"@headlessui/react": "^2.2.9",
78+
"@heroicons/react": "^2.2.0",
79+
"@iconify-json/svg-spinners": "^1.2.4",
80+
"@lezer/highlight": "^1.2.1",
81+
"@modelcontextprotocol/sdk": "^1.19.1",
82+
"@nanostores/react": "^0.7.3",
83+
"@octokit/rest": "^21.1.1",
84+
"@octokit/types": "^13.10.0",
85+
"@openrouter/ai-sdk-provider": "^0.0.5",
86+
"@phosphor-icons/react": "^2.1.10",
87+
"@radix-ui/react-checkbox": "^1.3.3",
88+
"@radix-ui/react-collapsible": "^1.1.12",
89+
"@radix-ui/react-context-menu": "^2.2.16",
90+
"@radix-ui/react-dialog": "^1.1.15",
91+
"@radix-ui/react-dropdown-menu": "^2.1.16",
92+
"@radix-ui/react-label": "^2.1.7",
93+
"@radix-ui/react-popover": "^1.1.15",
94+
"@radix-ui/react-progress": "^1.1.7",
95+
"@radix-ui/react-scroll-area": "^1.2.10",
96+
"@radix-ui/react-separator": "^1.1.7",
97+
"@radix-ui/react-switch": "^1.2.6",
98+
"@radix-ui/react-tabs": "^1.1.13",
99+
"@radix-ui/react-tooltip": "^1.2.8",
100+
"@remix-run/cloudflare": "^2.17.1",
101+
"@remix-run/cloudflare-pages": "^2.17.1",
102+
"@remix-run/node": "^2.17.1",
103+
"@remix-run/react": "^2.17.1",
104+
"@supabase/supabase-js": "^2.58.0",
105+
"@tanstack/react-virtual": "^3.13.12",
106+
"@types/react-beautiful-dnd": "^13.1.8",
107+
"@types/unist": "^3.0.3",
108+
"@uiw/codemirror-theme-vscode": "^4.25.2",
109+
"@unocss/reset": "^0.61.9",
110+
"@webcontainer/api": "1.6.1-internal.1",
111+
"@xterm/addon-fit": "^0.10.0",
112+
"@xterm/addon-web-links": "^0.11.0",
113+
"@xterm/xterm": "^5.5.0",
114+
"ai": "4.3.16",
115+
"chalk": "^5.6.2",
116+
"chart.js": "^4.5.0",
117+
"class-variance-authority": "^0.7.1",
118+
"clsx": "^2.1.1",
119+
"date-fns": "^3.6.0",
120+
"diff": "^5.2.0",
121+
"dotenv": "^16.6.1",
122+
"electron-log": "^5.4.3",
123+
"electron-store": "^10.1.0",
124+
"electron-updater": "^6.6.2",
125+
"file-saver": "^2.0.5",
126+
"framer-motion": "^11.18.2",
127+
"ignore": "^6.0.2",
128+
"isbot": "^4.4.0",
129+
"isomorphic-git": "^1.34.0",
130+
"istextorbinary": "^9.5.0",
131+
"jose": "^5.10.0",
132+
"js-cookie": "^3.0.5",
133+
"jspdf": "^3.0.3",
134+
"jszip": "^3.10.1",
135+
"keytar": "^7.9.0",
136+
"lucide-react": "^0.485.0",
137+
"mime": "^4.1.0",
138+
"nanostores": "^0.10.3",
139+
"ollama-ai-provider": "^0.15.2",
140+
"path-browserify": "^1.0.1",
141+
"react": "^18.3.1",
142+
"react-beautiful-dnd": "^13.1.1",
143+
"react-chartjs-2": "^5.3.0",
144+
"react-dnd": "^16.0.1",
145+
"react-dnd-html5-backend": "^16.0.1",
146+
"react-dom": "^18.3.1",
147+
"react-hotkeys-hook": "^4.6.2",
148+
"react-icons": "^5.5.0",
149+
"react-markdown": "^9.1.0",
150+
"react-qrcode-logo": "^3.0.0",
151+
"react-resizable-panels": "^2.1.9",
152+
"react-toastify": "^10.0.6",
153+
"react-window": "^1.8.11",
154+
"rehype-raw": "^7.0.0",
155+
"rehype-sanitize": "^6.0.0",
156+
"remark-gfm": "^4.0.1",
157+
"remix-island": "^0.2.0",
158+
"remix-utils": "^7.7.0",
159+
"rollup-plugin-node-polyfills": "^0.2.1",
160+
"shiki": "^1.29.2",
161+
"tailwind-merge": "^2.6.0",
162+
"unist": "^0.0.1",
163+
"unist-util-visit": "^5.0.0",
164+
"use-debounce": "^10.0.6",
165+
"vite-plugin-node-polyfills": "^0.22.0",
166+
"zod": "^3.25.76",
167+
"zustand": "^5.0.8"
168+
},
169+
"devDependencies": {
170+
"@blitz/eslint-plugin": "0.1.0",
171+
"@cloudflare/workers-types": "^4.20251004.0",
172+
"@electron/notarize": "^2.5.0",
173+
"@iconify-json/ph": "^1.2.2",
174+
"@iconify/types": "^2.0.0",
175+
"@iconify/utils": "^3.0.2",
176+
"@remix-run/dev": "^2.17.1",
177+
"@remix-run/serve": "^2.17.1",
178+
"@testing-library/jest-dom": "^6.9.1",
179+
"@testing-library/react": "^16.3.0",
180+
"@types/diff": "^5.2.3",
181+
"@types/dom-speech-recognition": "^0.0.4",
182+
"@types/file-saver": "^2.0.7",
183+
"@types/js-cookie": "^3.0.6",
184+
"@types/path-browserify": "^1.0.3",
185+
"@types/react": "^18.3.25",
186+
"@types/react-dom": "^18.3.7",
187+
"@types/react-window": "^1.8.8",
188+
"@vitejs/plugin-react": "^4.7.0",
189+
"appdmg": "^0.6.6",
190+
"concurrently": "^8.2.2",
191+
"create-dmg": "^7.1.0",
192+
"cross-env": "^7.0.3",
193+
"crypto-browserify": "^3.12.1",
194+
"electron": "^38.2.1",
195+
"electron-builder": "^26.0.12",
196+
"electron-packager": "^17.1.2",
197+
"eslint-config-prettier": "^10.1.8",
198+
"eslint-plugin-prettier": "^5.5.4",
199+
"fast-glob": "^3.3.3",
200+
"husky": "9.1.7",
201+
"is-ci": "^3.0.1",
202+
"jsdom": "^26.1.0",
203+
"node-fetch": "^3.3.2",
204+
"pnpm": "^10.18.0",
205+
"prettier": "^3.6.2",
206+
"rimraf": "^4.4.1",
207+
"sass-embedded": "^1.93.2",
208+
"stream-browserify": "^3.0.0",
209+
"@stylistic/eslint-plugin-ts": "^2.0.0",
210+
"@typescript-eslint/utils": "^8.0.0-alpha.30",
211+
"@eslint-community/eslint-utils": "^4.2.0",
212+
"eslint-visitor-keys": "^3.4.0",
213+
"typescript": "^5.9.3",
214+
"unified": "^11.0.5",
215+
"unocss": "^0.61.9",
216+
"vite": "^5.4.20",
217+
"vite-plugin-copy": "^0.1.6",
218+
"vite-plugin-optimize-css-modules": "^1.2.0",
219+
"vite-tsconfig-paths": "^4.3.2",
220+
"vitest": "^2.1.9",
221+
"wrangler": "^4.42.0"
222+
},
223+
"resolutions": {
224+
"@typescript-eslint/utils": "^8.0.0-alpha.30",
225+
"jsondiffpatch": "0.7.3",
226+
"estree-util-value-to-estree": "^3.3.3",
227+
"nanoid": "^3.3.8",
228+
"dompurify": "3.2.7",
229+
"esbuild": "0.25.10",
230+
"undici-types": "^7.13.0"
231+
},
232+
"pnpm": {
233+
"overrides": {
234+
"estree-util-value-to-estree": "^3.3.3",
235+
"nanoid": "^3.3.8",
236+
"undici-types": "^7.13.0"
237+
},
238+
"onlyBuiltDependencies": [
239+
"electron",
240+
"fs-xattr"
241+
]
242+
},
243+
"packageManager": "pnpm@10.18.0",
244+
"main": "build/electron/main/index.mjs"
245+
}

0 commit comments

Comments
 (0)