Skip to content

Commit

Permalink
🚚 refactor the project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
fredk3 committed Mar 21, 2024
1 parent 113e089 commit 6442c25
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ yarn-error.log*

# local env files
.env.local
.env
.env.development.local
.env.test.local
.env.production.local
Expand Down
File renamed without changes.
35 changes: 35 additions & 0 deletions apps/desktop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Modular Cloud desktop app

## How to run the project

1. Build the nextjs app :

```bash
# go to the root
cd ../..

# build the nextjs app
npx turbo run build --filter web
```

You may get an error when building the app,
for that you can go to the web folder and build it manuaally :

```bash
cd apps/web
npm run prefetch:networks
npm run build
```

2. Export the built files from the next app :

```bash
cd apps/web
npm run prepare-electron
```

3. Run the desktop project :

```bash
npx electron index.js
```
File renamed without changes
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions apps/web/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
INTERNAL_INTEGRATION_API_URL="***"
NEXT_PUBLIC_SVM_METRICS="https://fr64dzklc3.execute-api.us-west-2.amazonaws.com/prod"
NEXT_PUBLIC_ADOBE_EMBED_API_KEY="a165f09589fc4cd29a574b37d1212a96"
NEXT_PUBLIC_TARGET='electron'
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"prefetch:networks": "set -a; . ./.env.local; set +a && tsx --tsconfig ./tsconfig.script.json ./this-is-ridiculous.ts",
"prefetch:networks-prod": "tsx --tsconfig ./tsconfig.script.json ./this-is-ridiculous.ts",
"electron": "electron ./electron/index.js",
"prepare-electron": "rsync -a .next/static/ .next/standalone/apps/web/.next/static && rsync -a public/ .next/standalone/apps/web/public && cp .env .next/standalone/apps/web/.env.local && rsync -a .next/standalone/apps ./electron && rsync -a .next/standalone/packages ./electron && rsync -a .next/standalone/resolver ./electron && rsync -a .next/standalone/package.json electron/package.json && sed -i .bak 's/process.chdir(__dirname)//g' electron/apps/web/server.js"
"prepare-electron": "rsync -a .next/static/ .next/standalone/apps/web/.next/static && rsync -a public/ .next/standalone/apps/web/public && cp .env .next/standalone/apps/web/.env.local && rsync -a .next/standalone/apps ../electron && rsync -a .next/standalone/packages ../electron && rsync -a .next/standalone/resolver ./electron && rsync -a .next/standalone/package.json electron/package.json && sed -i .bak 's/process.chdir(__dirname)//g' electron/apps/web/server.js"
},
"main": "electron/index.js",
"dependencies": {
Expand Down

0 comments on commit 6442c25

Please sign in to comment.