diff --git a/Procfile b/Procfile
index 3b297788..9baa387d 100644
--- a/Procfile
+++ b/Procfile
@@ -1,2 +1,2 @@
react: yarn react-start
-electron: node src/electron-wait-react
+electron: yarn wait-electron
diff --git a/package.json b/package.json
index 276332ec..f02b5328 100644
--- a/package.json
+++ b/package.json
@@ -30,6 +30,7 @@
"electron-dist": "electron-builder",
"start": "nf start",
"serve": "node src/api/index.js",
+ "wait-electron": "node src/app/electron-wait-react",
"postinstall": "electron-builder install-app-deps"
},
"eslintConfig": {
@@ -47,7 +48,7 @@
"last 1 safari version"
]
},
- "main": "src/electron.js",
+ "main": "src/app/electron.js",
"devDependencies": {
"electron": "^7.1.7",
"electron-builder": "^21.2.0",
diff --git a/src/electron-wait-react.js b/src/app/electron-wait-react.js
similarity index 100%
rename from src/electron-wait-react.js
rename to src/app/electron-wait-react.js
diff --git a/src/electron.js b/src/app/electron.js
similarity index 96%
rename from src/electron.js
rename to src/app/electron.js
index 30b878ef..75ee80e5 100644
--- a/src/electron.js
+++ b/src/app/electron.js
@@ -16,7 +16,7 @@ function createWindow() {
// Create the browser window.
mainWindow = new BrowserWindow({width: 800, height: 600});
- const apiProcess = fork(path.join(__dirname, '/api/index.js'));
+ const apiProcess = fork(path.join(__dirname, '../api/index.js'));
const startUrl = process.env.ELECTRON_START_URL || url.format({
pathname: path.join(__dirname, '/../build/index.html'),
diff --git a/src/index.js b/src/index.js
index 87d1be55..49cf480c 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,8 +1,8 @@
import React from 'react';
import ReactDOM from 'react-dom';
-import './index.css';
-import App from './App';
-import * as serviceWorker from './serviceWorker';
+import './ui/index.css';
+import App from './ui/App';
+import * as serviceWorker from './ui/serviceWorker';
ReactDOM.render(, document.getElementById('root'));
diff --git a/src/App.css b/src/ui/App.css
similarity index 100%
rename from src/App.css
rename to src/ui/App.css
diff --git a/src/App.js b/src/ui/App.js
similarity index 100%
rename from src/App.js
rename to src/ui/App.js
diff --git a/src/App.test.js b/src/ui/App.test.js
similarity index 100%
rename from src/App.test.js
rename to src/ui/App.test.js
diff --git a/src/index.css b/src/ui/index.css
similarity index 100%
rename from src/index.css
rename to src/ui/index.css
diff --git a/src/ui/index.js b/src/ui/index.js
new file mode 100644
index 00000000..87d1be55
--- /dev/null
+++ b/src/ui/index.js
@@ -0,0 +1,12 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import './index.css';
+import App from './App';
+import * as serviceWorker from './serviceWorker';
+
+ReactDOM.render(, document.getElementById('root'));
+
+// If you want your app to work offline and load faster, you can change
+// unregister() to register() below. Note this comes with some pitfalls.
+// Learn more about service workers: https://bit.ly/CRA-PWA
+serviceWorker.unregister();
diff --git a/src/logo.svg b/src/ui/logo.svg
similarity index 100%
rename from src/logo.svg
rename to src/ui/logo.svg
diff --git a/src/serviceWorker.js b/src/ui/serviceWorker.js
similarity index 100%
rename from src/serviceWorker.js
rename to src/ui/serviceWorker.js
diff --git a/src/setupTests.js b/src/ui/setupTests.js
similarity index 100%
rename from src/setupTests.js
rename to src/ui/setupTests.js
diff --git a/src/useFetch.js b/src/ui/useFetch.js
similarity index 100%
rename from src/useFetch.js
rename to src/ui/useFetch.js