Skip to content

Commit 17cfdec

Browse files
authored
Merge pull request #81 from FlowTestAI/new-ui
FlowTest as a electron app designed to run completely locally
2 parents 0cbaf94 + ef38380 commit 17cfdec

File tree

199 files changed

+10874
-6047
lines changed

Some content is hidden

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

199 files changed

+10874
-6047
lines changed

.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# dependencies
2+
**/node_modules
3+
4+
# production
5+
/build
6+
7+
# intermal dependencies
8+
/server

.eslintrc.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true,
5+
jest: true,
6+
},
7+
extends: ['eslint:recommended', 'plugin:react/recommended', 'prettier'],
8+
overrides: [
9+
{
10+
env: {
11+
node: true,
12+
},
13+
files: ['.eslintrc.{js,cjs}'],
14+
parserOptions: {
15+
sourceType: 'script',
16+
},
17+
},
18+
],
19+
parserOptions: {
20+
ecmaVersion: 'latest',
21+
sourceType: 'module',
22+
},
23+
plugins: ['react', 'react-hooks', 'prettier'],
24+
rules: {
25+
'react/prop-types': 'off', // keeping off for first phase
26+
'no-unused-vars': 'off', // Getting a lot of Error for: '_' is assigned a value but never used no-unused-vars. For now disabling this because need to understand more about the use '_'.
27+
},
28+
settings: {
29+
'import/resolver': {
30+
node: {
31+
moduleDirectory: ['node_modules', './src/*'],
32+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
33+
},
34+
},
35+
},
36+
};

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@ uploads/
3737
# env
3838
.env
3939
.env.example
40+
41+
# Ide
42+
.vscode/

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"tabWidth": 2,
4+
"printWidth": 120,
5+
"singleQuote": true,
6+
"trailingComma": "all",
7+
"jsxSingleQuote": true,
8+
"bracketSpacing": true,
9+
"plugins": ["prettier-plugin-tailwindcss"]
10+
}

README.md

Lines changed: 38 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,56 @@
1-
# FlowTest
1+
# FlowTestAI
22

33
[![Release Notes](https://img.shields.io/github/release/FlowTestAI/FlowTest)](https://github.com/FlowTestAI/FlowTest/releases)
44
[![Linkedin](https://img.shields.io/badge/LinkedIn-blue?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/company/flowtestai)
55
[![Twitter Follow](https://img.shields.io/twitter/follow/FlowTestAI?style=social)](https://twitter.com/FlowTestAI)
66
[![Chat on Discord](https://img.shields.io/badge/chat-Discord-7289DA?logo=discord)](https://discord.gg/Pf9tdSjPeF)
77

8-
Leverage GenAI to convert your customer's interactions with your product into runnable flows all via natural language and simple drag and drop. Generated flows not only test the functional correctness of your product but also the time it takes your customers to perform these actions together.
8+
FlowTestAI stands as the world’s first GenAI powered OpenSource Integrated Development Environment (IDE) specifically designed to craft, visualize, and manage API-driven workflows. Characterized by its speed, lightweight architecture, and local operation, FlowTestAI safeguards privacy while facilitating the seamless integration of API driven workflows.
99

10-
- Step 1: Import your openAPI spec and describe your prodcut flow in natural language to our AI.
11-
- Step 2: Add an evaluate node at the end via simple drag and drop to check the final output.
12-
- Step 3: Run the created flow for a success/falure and observe the generated logs and timing info.
13-
- Step 4: Save and Export these runnable chains in json format and share with others.
14-
- Step 5: Have a beer! 🍺
10+
🚧 We are actively working on launching a CLI. The CLI allows you to run API driven workflows created using FlowTestAI from command line interface making it easier to automate and run them in a CI/CD (continuous integration/development) fashion.
1511

16-
![alt text](public/flowtest_1.gif)
12+
## Documentation 📝
1713

18-
## 👨‍💻 Developers
19-
FlowTest has 2 major components -
20-
- `server`: Node backend to serve API requests
21-
- `src`: React frontend
14+
https://flowtestai.gitbook.io/flowtestai
2215

23-
### Prerequisite
24-
- Install npm
25-
```bash
26-
npm install -g npm
27-
```
28-
- NodeJS >= 18.0.0
16+
💡 We are proud to announce that we were recently featured in a LangChain blog post. You can read the article here.
17+
18+
## Setup
19+
20+
## Production 🚀
21+
22+
FlowTestAI is an electron app that runs entirely in your local environment interacting with your local file system just like other IDE(s) out there like VSCode, Intellij etc. The platform-specific binaries are available for download from our GitHub releases. We currently offer binaries for macOS, with versions for Windows and Linux under development 🚧. If you require a binary for a specific platform, please let us know in the Discussions section. We will prioritize your request accordingly.
23+
24+
## Development 🔧
2925

30-
### Setup
3126
1. Clone the repository
32-
```bash
33-
git clone https://github.com/FlowTestAI/FlowTest.git
34-
```
27+
```bash
28+
git clone https://github.com/FlowTestAI/FlowTest.git
29+
```
3530
2. Go into repository folder
36-
```bash
37-
cd FlowTest
38-
```
39-
3. Install all dependencies of all modules:
40-
```bash
41-
npm install
42-
```
43-
4. Rename `.env.example` to `.env` and enter your cerdentials, for instance
44-
```bash
45-
OPENAI_API_KEY={API_KEY_VALUE}
46-
PORT=3500
47-
...
48-
```
31+
```bash
32+
cd FlowTest
33+
```
34+
3. Clean any previously installed dependencies:
35+
```bash
36+
npm run clean
37+
```
38+
4. Install all dependencies of all modules:
39+
```bash
40+
npm install
41+
```
4942
5. Start the app:
50-
```bash
51-
npm start
52-
```
53-
You can now access the app on [http://localhost:3500](http://localhost:3500)
43+
```bash
44+
npm start
45+
```
46+
The app should start as a normal desktop app
47+
48+
## Support 🙋
5449

55-
## 🙋 Support
50+
- ❓ QNA: feel free to ask questions, request new features or start a constructive discussion here [discussion](https://github.com/FlowTestAI/FlowTest/discussions)
51+
- 🐛 Issues: Feel free to raise issues here [issues](https://github.com/FlowTestAI/FlowTest/issues) (contributing guidelines coming soon..)
52+
- 🔄 Integration: If you want to explore how you can use this tool in your day to day activities or integrate with your existing stack or in general want to chat, you can reach out to us at any of our social media handles or email me at jsajal1993@gmail.com.
5653

57-
Feel free to ask any questions, raise problems, and request new features in [discussion](https://github.com/FlowTestAI/FlowTest/discussions)
54+
## License 📄
5855

59-
## 📄 License
6056
Source code in this repository is made available under the [MIT License](LICENSE.md).

jsconfig.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": "src",
4+
"target": "es5",
5+
"lib": [
6+
"dom",
7+
"dom.iterable",
8+
"esnext"
9+
]
10+
},
11+
"include": [
12+
"src"
13+
]
14+
}

package.json

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,52 @@
22
"name": "flowtest",
33
"version": "1.0.0",
44
"private": true,
5+
"homepage": ".",
56
"dependencies": {
67
"@emotion/react": "^11.11.1",
78
"@emotion/styled": "^11.11.0",
8-
"@mui/icons-material": "^5.14.9",
9-
"@mui/joy": "^5.0.0-beta.7",
10-
"@mui/material": "^5.14.10",
11-
"@tabler/icons-react": "^2.34.0",
9+
"@headlessui/react": "^1.7.18",
10+
"@heroicons/react": "^2.1.1",
1211
"@testing-library/jest-dom": "^5.17.0",
1312
"@testing-library/react": "^13.4.0",
1413
"@testing-library/user-event": "^13.5.0",
14+
"@tippyjs/react": "^4.2.6",
15+
"allotment": "^1.20.0",
16+
"autoprefixer": "^10.4.18",
1517
"axios": "^1.5.1",
18+
"eslint-import-resolver-alias": "^1.1.2",
19+
"eslint-plugin-import": "^2.29.1",
20+
"immer": "^10.0.4",
21+
"lodash": "^4.17.21",
1622
"notistack": "^3.0.1",
23+
"postcss": "^8.4.35",
1724
"react": "^18.2.0",
1825
"react-dom": "^18.2.0",
26+
"react-edit-text": "^5.1.1",
27+
"react-icons": "^5.0.1",
1928
"react-perfect-scrollbar": "^1.5.8",
2029
"react-router": "^6.15.0",
21-
"react-router-dom": "^6.15.0",
30+
"react-router-dom": "^6.22.2",
2231
"react-scripts": "5.0.1",
32+
"react-sliding-pane": "^7.3.0",
33+
"react-toastify": "^10.0.5",
34+
"react-tooltip": "^5.26.2",
2335
"reactflow": "^11.8.3",
24-
"web-vitals": "^2.1.4"
36+
"socket.io-client": "^4.7.4",
37+
"tailwindcss": "^3.4.1",
38+
"web-vitals": "^2.1.4",
39+
"zustand": "^4.5.2"
2540
},
2641
"scripts": {
27-
"start": "npm run build && cd server && npm start",
42+
"start": "npm run build && cd packages/flowtest-electron && npm start",
2843
"build": "react-scripts build",
2944
"test": "react-scripts test",
3045
"eject": "react-scripts eject",
31-
"postinstall": "cd server && npm install"
46+
"postinstall": "cd packages/flowtest-electron && npm install",
47+
"lint": "eslint src/**/*.{js,jsx,ts,tsx,json}",
48+
"lint:fix": "eslint --fix 'src/**/*.{js,jsx,ts,tsx,json}'",
49+
"format": "prettier --write '**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc",
50+
"clean": "rm -rf node_modules/ && rm -rf packages/flowtest-electron/node_modules/"
3251
},
3352
"eslintConfig": {
3453
"extends": [
@@ -47,5 +66,18 @@
4766
"last 1 firefox version",
4867
"last 1 safari version"
4968
]
69+
},
70+
"devDependencies": {
71+
"@tailwindcss/typography": "^0.5.10",
72+
"@types/node": "20.11.5",
73+
"daisyui": "^4.7.2",
74+
"eslint": "^8.56.0",
75+
"eslint-config-prettier": "^9.1.0",
76+
"eslint-plugin-import-alias": "^1.2.0",
77+
"eslint-plugin-prettier": "^5.1.3",
78+
"eslint-plugin-react": "^7.33.2",
79+
"eslint-plugin-react-hooks": "^4.6.0",
80+
"prettier": "^3.2.5",
81+
"prettier-plugin-tailwindcss": "^0.5.11"
5082
}
5183
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Modules to control application life and create native browser window
2+
const { app, BrowserWindow, Menu, shell } = require('electron');
3+
const path = require('path');
4+
const url = require('url');
5+
const template = require('./electron-menu');
6+
const Watcher = require('./src/app/watcher');
7+
const registerRendererEventHandlers = require('./src/ipc/collection');
8+
9+
let mainWindow;
10+
let watcher;
11+
12+
app.on('ready', async () => {
13+
const menu = Menu.buildFromTemplate(template);
14+
Menu.setApplicationMenu(menu);
15+
16+
// Create the browser window.
17+
mainWindow = new BrowserWindow({
18+
width: 1280,
19+
height: 768,
20+
webPreferences: {
21+
nodeIntegration: true,
22+
contextIsolation: true,
23+
preload: path.join(__dirname, 'preload.js'),
24+
webviewTag: true,
25+
},
26+
title: 'FlowTestAI',
27+
});
28+
29+
mainWindow.maximize();
30+
31+
// and load the index.html of the app.
32+
const startUrl = url.format({
33+
pathname: path.join(__dirname, '../../build/index.html'),
34+
protocol: 'file:',
35+
slashes: true,
36+
});
37+
mainWindow.loadURL(startUrl);
38+
39+
// Open the DevTools.
40+
// mainWindow.webContents.openDevTools()
41+
42+
// This is required to open a link in the external browser
43+
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
44+
shell.openExternal(url);
45+
return { action: 'deny' };
46+
});
47+
48+
watcher = new Watcher();
49+
50+
registerRendererEventHandlers(mainWindow, watcher);
51+
});
52+
53+
// Quit when all windows are closed, except on macOS. There, it's common
54+
// for applications and their menu bar to stay active until the user quits
55+
// explicitly with Cmd + Q.
56+
app.on('window-all-closed', function () {
57+
//if (process.platform !== 'darwin')
58+
app.quit();
59+
});
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
const { shell } = require('electron');
2+
3+
const template = [
4+
{
5+
label: 'FlowTestAI',
6+
submenu: [
7+
{ type: 'separator' },
8+
{
9+
role: 'quit',
10+
label: 'Exit FlowTestAI',
11+
},
12+
],
13+
},
14+
{
15+
label: 'Edit',
16+
submenu: [
17+
{ role: 'undo' },
18+
{ role: 'redo' },
19+
{ type: 'separator' },
20+
{ role: 'cut' },
21+
{ role: 'copy' },
22+
{ role: 'paste' },
23+
{ role: 'selectAll' },
24+
{ type: 'separator' },
25+
{ role: 'hide' },
26+
{ role: 'hideOthers' },
27+
],
28+
},
29+
{
30+
label: 'View',
31+
submenu: [
32+
{ role: 'toggledevtools' },
33+
{ type: 'separator' },
34+
{ role: 'resetzoom' },
35+
{ role: 'zoomin' },
36+
{ role: 'zoomout' },
37+
{ type: 'separator' },
38+
{ role: 'togglefullscreen' },
39+
],
40+
},
41+
{
42+
role: 'window',
43+
submenu: [{ role: 'minimize' }, { role: 'close', accelerator: 'CommandOrControl+Shift+Q' }],
44+
},
45+
{
46+
role: 'help',
47+
label: 'Help',
48+
submenu: [
49+
{
50+
label: 'About',
51+
click: async () => {
52+
await shell.openExternal('https://github.com/FlowTestAI/FlowTest');
53+
},
54+
},
55+
],
56+
},
57+
];
58+
59+
module.exports = template;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
require('dotenv').config();
2+
const { notarize } = require('@electron/notarize');
3+
4+
exports.default = async function notarizing(context) {
5+
const { electronPlatformName, appOutDir } = context;
6+
if (electronPlatformName !== 'darwin') {
7+
return;
8+
}
9+
10+
const appName = context.packager.appInfo.productFilename;
11+
12+
return await notarize({
13+
appBundleId: 'com.flowtestai.app',
14+
appPath: `${appOutDir}/${appName}.app`,
15+
appleId: process.env.APPLE_ID,
16+
appleIdPassword: process.env.APPLE_ID_PASSWORD,
17+
teamId: process.env.TEAM_ID,
18+
});
19+
};

0 commit comments

Comments
 (0)