Screenshots:
English | 简体中文
Online Demo: https://prompt.phodal.com/
Join us:
Follow these steps to deploy ChatFlow on Vercel with a serverless MySQL database provided by Planetscale:
- Clone the ChatFlow template from GitHub.
- Create a Vercel account and connect it to your GitHub account.
- Create a Planetscale account.
- Set up your Planetscale database:
- Log in to your Planetscale account with
pscale auth login
. - Create a password with
pscale password create <DATABASE_NAME> <BRANCH_NAME> <PASSWORD_NAME>
. - Push your database to Planetscale with
npx prisma db push
.
- Log in to your Planetscale account with
- Configure your Vercel environment:
- Set
DATABASE_URL
to your Planetscale database URL. - Generate an encryption key with
node scripts/gen-enc.js
and set it asENC_KEY
.
- Set
With these steps completed, your ChatFlow will be deployed on Vercel with a Planetscale serverless MySQL database.
- Clone the ChatFlow template from GitHub.
- Dependencies on Planetscale services still exist temporarily. Please register as mentioned in the previous section and configure
DATABASE_URL
in the.env
file. - Run
npm install
. - Generate an encryption key using
node scripts/gen-enc.js
and configure it in the.env
file in the formatENC_KEY=***
. (Note: You can copy the.env
file from env.template) - You can now use the application by running
npm run dev
.
- examples: see in: src/assets/chatgpt/flow
- all type defines: src/flows/types
Technical documentation:
- Flowchart
- DotParser, parse dot file to graph data
- dagre, layout graph data
- ReactFlow, render graph data
- Flow Functions
- jsonpath-plus, parse jsonpath
- expr-eval, parse expression
- Flow Components
- JsonViewer, render json data
- DataTable, render table data
- Flow Editor
- ReactFlow, render graph data
- Repl Server
- Rx.js, handle websocket
- Others
- MarkdownViewer, render markdown data
- MermaidViewer, render mermaid data
This code is distributed under the MIT license. See LICENSE in this directory.