Skip to content

Commit 0f09faa

Browse files
committed
- Updated .js files to .jsx on frontend.
- Removed Yarn dependency and replaced with PNPM - Changed Frontend to render via vite
1 parent 34702a9 commit 0f09faa

File tree

120 files changed

+25959
-385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+25959
-385
lines changed

CONTRIBUTING.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ Flowise has 3 different modules in a single mono repository.
4444

4545
#### Prerequisite
4646

47-
- Install [Yarn v1](https://classic.yarnpkg.com/en/docs/install)
47+
- Install [PNPM](https://pnpm.io/installation)
4848
```bash
49-
npm i -g yarn
49+
npm i -g pnpm
5050
```
5151

5252
#### Step by step
@@ -71,19 +71,19 @@ Flowise has 3 different modules in a single mono repository.
7171
6. Install all dependencies of all modules:
7272

7373
```bash
74-
yarn install
74+
pnpm install
7575
```
7676

7777
7. Build all the code:
7878

7979
```bash
80-
yarn build
80+
pnpm build
8181
```
8282

8383
8. Start the app on [http://localhost:3000](http://localhost:3000)
8484

8585
```bash
86-
yarn start
86+
pnpm start
8787
```
8888

8989
9. For development:
@@ -93,23 +93,23 @@ Flowise has 3 different modules in a single mono repository.
9393
- Run
9494

9595
```bash
96-
yarn dev
96+
pnpm dev
9797
```
9898

99-
Any changes made in `packages/ui` or `packages/server` will be reflected on [http://localhost:8080](http://localhost:8080)
99+
Any changes made in `packages/ui` or `packages/server` will be reflected on [http://localhost:5173](http://localhost:5173)
100100

101-
For changes made in `packages/components`, run `yarn build` again to pickup the changes.
101+
For changes made in `packages/components`, run `pnpm build` again to pickup the changes.
102102

103103
10. After making all the changes, run
104104

105105
```bash
106-
yarn build
106+
pnpm build
107107
```
108108

109109
and
110110

111111
```bash
112-
yarn start
112+
pnpm start
113113
```
114114

115115
to make sure everything works fine in production.

package.json

+7-9
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,18 @@
1010
"components"
1111
],
1212
"scripts": {
13-
"build": "turbo run build",
14-
"build-force": "turbo run build --force",
15-
"dev": "turbo run dev --parallel",
16-
"start": "run-script-os",
13+
"dev": "kill-port 3000 5173 && pnpm --filter \"./packages/**\" dev",
14+
"build": "pnpm --filter \"./packages/**\" build",
15+
"start": "kill-port 3000 && run-script-os",
1716
"start:windows": "cd packages/server/bin && run start",
1817
"start:default": "cd packages/server/bin && ./run start",
19-
"clean": "npm exec -ws -- rimraf dist build",
18+
"clean": "pnpm exec -ws -- rimraf dist build",
2019
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
21-
"test": "turbo run test",
2220
"lint": "eslint \"**/*.{js,jsx,ts,tsx,json,md}\"",
23-
"lint-fix": "yarn lint --fix",
21+
"lint-fix": "pnpm lint --fix",
2422
"quick": "pretty-quick --staged",
2523
"postinstall": "husky install",
26-
"migration:create": "yarn typeorm migration:create"
24+
"migration:create": "pnpm typeorm migration:create"
2725
},
2826
"lint-staged": {
2927
"*.{js,jsx,ts,tsx,json,md}": "eslint --fix"
@@ -43,12 +41,12 @@
4341
"eslint-plugin-react-hooks": "^4.6.0",
4442
"eslint-plugin-unused-imports": "^2.0.0",
4543
"husky": "^8.0.1",
44+
"kill-port": "^2.0.1",
4645
"lint-staged": "^13.0.3",
4746
"prettier": "^2.7.1",
4847
"pretty-quick": "^3.1.3",
4948
"rimraf": "^3.0.2",
5049
"run-script-os": "^1.1.6",
51-
"turbo": "1.7.4",
5250
"typescript": "^4.8.4"
5351
},
5452
"engines": {

packages/components/gulpfile.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import gulp from 'gulp'
2-
3-
const { src, dest } = gulp
1+
const { src, dest } = require('gulp')
42

53
function copyIcons() {
64
return src(['nodes/**/*.{jpg,png,svg}']).pipe(dest('dist/nodes'))

packages/components/package.json

+11
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
"cheerio": "^1.0.0-rc.12",
4040
"chromadb": "^1.5.11",
4141
"cohere-ai": "^6.2.0",
42+
"crypto-js": "^4.1.1",
43+
"css-what": "^6.1.0",
4244
"d3-dsv": "2",
4345
"dotenv": "^16.0.0",
4446
"express": "^4.17.3",
@@ -53,6 +55,7 @@
5355
"langsmith": "^0.0.32",
5456
"linkifyjs": "^4.1.1",
5557
"llmonitor": "^0.5.5",
58+
"lodash": "^4.17.21",
5659
"mammoth": "^1.5.1",
5760
"moment": "^2.29.3",
5861
"mongodb": "^6.2.0",
@@ -70,19 +73,27 @@
7073
"pyodide": ">=0.21.0-alpha.2",
7174
"redis": "^4.6.7",
7275
"replicate": "^0.12.3",
76+
"socket.io": "^4.6.1",
7377
"srt-parser-2": "^1.2.3",
78+
"typeorm": "^0.3.6",
7479
"vm2": "^3.9.19",
7580
"weaviate-ts-client": "^1.1.0",
81+
"winston": "^3.9.0",
7682
"ws": "^8.9.0",
83+
"zod": "^3.22.4",
7784
"zod-to-json-schema": "^3.21.4"
7885
},
7986
"devDependencies": {
87+
"@types/crypto-js": "^4.1.1",
8088
"@types/gulp": "4.0.9",
89+
"@types/lodash": "^4.14.202",
8190
"@types/node-fetch": "2.6.2",
8291
"@types/object-hash": "^3.0.2",
8392
"@types/pg": "^8.10.2",
8493
"@types/ws": "^8.5.3",
94+
"babel-register": "^6.26.0",
8595
"gulp": "^4.0.2",
96+
"ts-node": "^10.7.0",
8697
"typescript": "^4.8.4"
8798
}
8899
}

packages/components/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
"declaration": true,
1717
"module": "commonjs"
1818
},
19-
"include": ["src", "nodes", "credentials"]
19+
"include": ["src", "nodes", "credentials"],
20+
"exclude": ["gulpfile.ts", "node_modules", "dist"]
2021
}

packages/server/nodemon.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"ignore": ["**/*.spec.ts", ".git", "node_modules"],
33
"watch": ["commands", "index.ts", "src", "../components/nodes", "../components/src"],
4-
"exec": "yarn oclif-dev",
4+
"exec": "./bin/dev start",
55
"ext": "ts"
66
}

packages/server/package.json

+10-5
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
"start": "run-script-os",
2525
"start:windows": "cd bin && run start",
2626
"start:default": "cd bin && ./run start",
27-
"dev": "concurrently \"yarn watch\" \"nodemon\"",
27+
"dev": "nodemon",
2828
"oclif-dev": "run-script-os",
2929
"oclif-dev:windows": "cd bin && dev start",
3030
"oclif-dev:default": "cd bin && ./dev start",
3131
"postpack": "shx rm -f oclif.manifest.json",
32-
"prepack": "yarn build && oclif manifest && oclif readme",
32+
"prepack": "pnpm build && oclif manifest && oclif readme",
3333
"typeorm": "typeorm-ts-node-commonjs",
3434
"watch": "tsc --watch",
3535
"version": "oclif readme && git add README.md"
@@ -46,6 +46,8 @@
4646
"license": "SEE LICENSE IN LICENSE.md",
4747
"dependencies": {
4848
"@oclif/core": "^1.13.10",
49+
"@types/lodash": "^4.14.202",
50+
"@types/uuid": "^9.0.7",
4951
"async-mutex": "^0.4.0",
5052
"axios": "^0.27.2",
5153
"cors": "^2.8.5",
@@ -54,11 +56,14 @@
5456
"express": "^4.17.3",
5557
"express-basic-auth": "^1.2.1",
5658
"express-rate-limit": "^6.9.0",
57-
"flowise-components": "*",
58-
"flowise-ui": "*",
59+
"flowise-components": "workspace:^",
60+
"flowise-ui": "workspace:^",
61+
"lodash": "^4.17.21",
62+
"moment": "^2.29.3",
5963
"moment-timezone": "^0.5.34",
6064
"multer": "^1.4.5-lts.1",
6165
"mysql": "^2.18.1",
66+
"openai": "^4.20.0",
6267
"pg": "^8.11.1",
6368
"reflect-metadata": "^0.1.13",
6469
"socket.io": "^4.6.1",
@@ -72,7 +77,7 @@
7277
"@types/crypto-js": "^4.1.1",
7378
"@types/multer": "^1.4.7",
7479
"concurrently": "^7.1.0",
75-
"nodemon": "^2.0.15",
80+
"nodemon": "^2.0.22",
7681
"oclif": "^3",
7782
"run-script-os": "^1.1.6",
7883
"shx": "^0.3.3",

packages/ui/craco.config.js

-16
This file was deleted.

packages/ui/index.html

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Flowise - Low-code LLM apps builder</title>
5+
<link rel="icon" href="favicon.ico" />
6+
<!-- Meta Tags-->
7+
<meta charset="utf-8" />
8+
<meta name="viewport" content="width=device-width, initial-scale=1" />
9+
<meta name="theme-color" content="#2296f3" />
10+
<meta name="title" content="Flowise - Low-code LLM apps builder" />
11+
<meta name="description" content="Flowise helps you to better integrate Web3 with existing Web2 applications" />
12+
<meta name="keywords" content="react, material-ui, reactjs, reactjs, workflow automation, web3, web2, blockchain" />
13+
<meta name="author" content="CodedThemes" />
14+
<!-- Open Graph / Facebook -->
15+
<meta property="og:locale" content="en_US" />
16+
<meta property="og:type" content="website" />
17+
<meta property="og:url" content="https://flowiseai.com/" />
18+
<meta property="og:site_name" content="flowiseai.com" />
19+
<meta property="article:publisher" content="https://www.facebook.com/codedthemes" />
20+
<meta property="og:title" content="Flowise - Low-code LLM apps builder" />
21+
<meta property="og:description" content="Flowise helps you to better build LLM flows using Langchain in simple GUI" />
22+
<meta property="og:image" content="https://flowiseai.com/og-image/og-facebook.png" />
23+
<!-- Twitter -->
24+
<meta property="twitter:card" content="summary_large_image" />
25+
<meta property="twitter:url" content="https://flowiseai.com" />
26+
<meta property="twitter:title" content="Flowise - Low-code LLM apps builder" />
27+
<meta property="twitter:description" content="Flowise helps you to better build LLM flows using Langchain in simple GUI" />
28+
<meta property="twitter:image" content="https://flowiseai.com/og-image/og-twitter.png" />
29+
<meta name="twitter:creator" content="@codedthemes" />
30+
31+
<link rel="preconnect" href="https://fonts.gstatic.com" />
32+
<link
33+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap"
34+
rel="stylesheet"
35+
/>
36+
</head>
37+
38+
<body>
39+
<noscript>You need to enable JavaScript to run this app.</noscript>
40+
<div id="root"></div>
41+
<div id="portal"></div>
42+
<script type="module" src="src/index.jsx"></script>
43+
</body>
44+
</html>

packages/ui/jsconfig.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"compilerOptions": {
33
"target": "esnext",
44
"module": "commonjs",
5-
"baseUrl": "src"
5+
"paths": {
6+
"@/*": ["./src/*"]
7+
}
68
},
79
"include": ["src/**/*"],
810
"exclude": ["node_modules"]

packages/ui/package.json

+10-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
"@mui/material": "^5.11.12",
1616
"@mui/x-data-grid": "^6.8.0",
1717
"@tabler/icons": "^1.39.1",
18+
"@vitejs/plugin-react": "^4.2.0",
19+
"axios": "^0.27.2",
1820
"clsx": "^1.1.1",
21+
"dotenv": "^16.0.0",
22+
"find-up": "^7.0.0",
1923
"flowise-embed": "*",
2024
"flowise-embed-react": "*",
2125
"flowise-react-json-view": "*",
@@ -26,6 +30,7 @@
2630
"lodash": "^4.17.21",
2731
"moment": "^2.29.3",
2832
"notistack": "^2.0.4",
33+
"openai": "^4.20.0",
2934
"prismjs": "^1.28.0",
3035
"prop-types": "^15.7.2",
3136
"react": "^18.2.0",
@@ -48,14 +53,14 @@
4853
"remark-gfm": "^3.0.1",
4954
"remark-math": "^5.1.1",
5055
"socket.io-client": "^4.6.1",
56+
"uuid": "^9.0.1",
57+
"vite": "^5.0.2",
58+
"vite-plugin-react-js-support": "^1.0.7",
5159
"yup": "^0.32.9"
5260
},
5361
"scripts": {
54-
"start": "craco start",
55-
"dev": "craco start",
56-
"build": "craco build",
57-
"test": "craco test",
58-
"eject": "craco eject"
62+
"dev": "vite",
63+
"build": "vite build"
5964
},
6065
"babel": {
6166
"presets": [
@@ -77,7 +82,6 @@
7782
"devDependencies": {
7883
"@babel/eslint-parser": "^7.15.8",
7984
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
80-
"@craco/craco": "^7.1.0",
8185
"@testing-library/jest-dom": "^5.11.10",
8286
"@testing-library/react": "^14.0.0",
8387
"@testing-library/user-event": "^12.8.3",

packages/ui/src/App.js renamed to packages/ui/src/App.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { ThemeProvider } from '@mui/material/styles'
44
import { CssBaseline, StyledEngineProvider } from '@mui/material'
55

66
// routing
7-
import Routes from 'routes'
7+
import Routes from '@/routes'
88

99
// defaultTheme
10-
import themes from 'themes'
10+
import themes from '@/themes'
1111

1212
// project imports
13-
import NavigationScroll from 'layout/NavigationScroll'
13+
import NavigationScroll from '@/layout/NavigationScroll'
1414

1515
// ==============================|| APP ||============================== //
1616

packages/ui/src/api/client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import axios from 'axios'
2-
import { baseURL } from 'store/constant'
2+
import { baseURL } from '@/store/constant'
33

44
const apiClient = axios.create({
55
baseURL: `${baseURL}/api/v1`,

packages/ui/src/assets/scss/style.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@import 'themes-vars.module.scss';
33

44
// third-party
5-
@import '~react-perfect-scrollbar/dist/css/styles.css';
5+
@import 'react-perfect-scrollbar/dist/css/styles.css';
66

77
// ==============================|| LIGHT BOX ||============================== //
88
.fullscreen .react-images__blanket {

packages/ui/src/hooks/useApi.js renamed to packages/ui/src/hooks/useApi.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
import { useState } from 'react'
23

34
export default (apiFunc) => {

packages/ui/src/hooks/useConfirm.js renamed to packages/ui/src/hooks/useConfirm.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useContext } from 'react'
2-
import ConfirmContext from 'store/context/ConfirmContext'
3-
import { HIDE_CONFIRM, SHOW_CONFIRM } from 'store/actions'
2+
import ConfirmContext from '@/store/context/ConfirmContext'
3+
import { HIDE_CONFIRM, SHOW_CONFIRM } from '@/store/actions'
44

55
let resolveCallback
66
const useConfirm = () => {

0 commit comments

Comments
 (0)