AIFlow is a full-stack AI workflow automation platform that enables users to create, manage, and execute AI-powered workflows with an intuitive visual interface.
- Visual Workflow Builder: Create complex AI workflows using a drag-and-drop interface powered by React Flow
- AI Chat Interface: Interactive chat functionality integrated with your workflows
- Knowledge Base Management: Upload and manage documents (PDF, DOCX) for AI context
- Workflow Execution: Execute workflows with custom queries and get real-time results
- Persistent Storage: PostgreSQL/Supabase backend for reliable data storage
- RESTful API: Well-documented FastAPI backend for seamless integration
- Framework: FastAPI
- Database: PostgreSQL with Supabase
- ORM: SQLAlchemy + SQLModel
- AI Integration: Google Gemini AI
- Document Processing: PyPDF, python-docx, pandas
- Async Support: asyncio, asyncpg
- Framework: React 19 + TypeScript
- Build Tool: Vite
- UI Components: Radix UI
- Styling: Tailwind CSS
- State Management: Redux Toolkit
- Workflow Canvas: React Flow (@xyflow/react)
- Routing: React Router v7
- Markdown Rendering: React Markdown with LaTeX support
- Python 3.8+
- Node.js 18+
- PostgreSQL database (or Supabase account)
- Google Gemini API key
- Navigate to the backend directory:
cd backend- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Configure environment variables:
cp sample.env .envEdit .env with your configuration:
DATABASE_URL=postgresql+asyncpg://user:password@host:port/database
SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_ROLE_KEY=your_supabase_key
SUPABASE_BUCKET_KB=your_bucket_name
EMBEDDING_SIZE=256
EMBEDDING_KEY_GEMINI=your_gemini_api_key
FRONTEND_URL=http://localhost:5173- Run database migrations:
alembic upgrade head- Start the backend server:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000The API will be available at http://localhost:8000
- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Configure environment variables:
cp sample.env .envEdit .env with your configuration:
VITE_API_URL=http://localhost:8000- Start the development server:
npm run devThe application will be available at http://localhost:5173
- Navigate to the home page
- Click "Create" to open the workflow builder
- Drag and drop nodes to create your workflow:
- Input Node: Entry point for your workflow
- LLM Nodes: AI processing nodes
- Output Node: Final result node
- Connect nodes to define the flow
- Configure each node with appropriate settings
- Save your workflow
- Go to the Chat interface
- Select a workflow
- Enter your query
- View the AI-generated results
- Use the file upload feature
- Upload PDF or DOCX files
- Files are processed and stored in the knowledge base
- Reference these files in your workflows
Once the backend is running, visit:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
POST /workflow/- Create a new workflowGET /workflow/{id}- Get workflow detailsPOST /run/{workflow_id}- Execute a workflowPOST /chat/create- Create a new chatPOST /upload_kb_file- Upload knowledge base file
AIFlow/
├── backend/
│ ├── alembic/ # Database migrations
│ ├── app/
│ │ ├── api/ # API routes
│ │ ├── models/ # SQLModel schemas
│ │ ├── services/ # Business logic
│ │ ├── repositories/ # Data access layer
│ │ ├── llm/ # LLM integration
│ │ ├── embeddings/ # Vector embeddings
│ │ ├── text_extraction/ # Document processing
│ │ └── main.py # Application entry point
│ └── requirements.txt
└── frontend/
├── src/
│ ├── apis/ # API client
│ ├── components/ # React components
│ ├── views/ # Page components
│ ├── store/ # Redux store
│ ├── types/ # TypeScript types
│ └── main.tsx # Application entry point
└── package.json
Run with auto-reload:
cd backend
uvicorn app.main:app --reloadRun development server:
cd frontend
npm run devBuild for production:
npm run buildLint code:
npm run lintContributions are welcome! Please feel free to submit a Pull Request.
License information is to be determined.
If you encounter any issues or have suggestions, please file an issue on the GitHub repository.
Created by devshah23
Note: Make sure to keep your API keys and sensitive information secure. Never commit .env files to version control.