An intelligent, interactive learning flow builder that helps you organize, visualize, and enhance your study materials with AI assistance.
Features β’ Technologies β’ Installation β’ Usage β’ Project Structure
FlowDo is a modern, web-based learning management tool that combines visual graph-based learning flows with AI-powered content generation. It allows students and educators to create interactive study plans, connect learning concepts, and leverage AI to explain, enhance, and generate educational content.
- π¨ Visual Learning Flows: Create and manage interconnected learning nodes
- π€ AI-Powered Assistance: Integrated with Google Gemini API for content generation
- π¬ Context-Aware Chat: Chat with your flow using RAG (Retrieval-Augmented Generation)
- π File Support: Upload and convert files (PDF, TXT, MD) into study flows
- ποΈ Persistent Storage: Automatic saving using IndexedDB
- π― Auto-Layout: Magic organize feature for automatic node arrangement
- Create different types of learning nodes:
- Lecture: Course materials and presentations
- Concept: Core concepts and definitions
- Question: Quiz and practice questions
- Summary: Key takeaways and summaries
- Task: Action items and assignments
- Goal: Learning objectives
- Note: Personal notes
- Idea: Brainstorming and ideas
- Resource: External resources and links
- Drag and drop nodes to organize your flow
- Resize nodes to fit your content
- Connect nodes with edges to show relationships
- Group related nodes together
- Explain: Get AI-generated explanations for concepts
- Quiz: Generate practice questions
- Enhance: Improve and expand existing content
- Decompose: Break down complex topics into smaller parts
- Brainstorm: Generate related ideas and connections
- Flow Generation: Create complete study plans from topics or files
- Global chat sidebar for asking questions
- Context-aware responses based on visible nodes
- Automatically extracts text content from visible nodes
- Answers questions about relationships between concepts
- Example: "What is the relationship between Newton's First Law and the Quiz?"
- Upload files (PDF, TXT, MD) to generate study flows
- Convert uploaded files into structured learning nodes
- AI analyzes file content and creates relevant steps
- Support for both topic-based and file-based flow generation
- One-click automatic node arrangement
- Hierarchical tree structure using Dagre layout algorithm
- Handles both connected and isolated nodes
- Centers layout in viewport automatically
- Grid arrangement for nodes without connections
- Minimap: Zoomed-out overview of entire canvas
- Click to navigate to different areas
- Shows viewport rectangle
- Toggleable visibility
- Fit to View: Instantly center camera on all content
- Zoom Controls:
- Zoom slider for precise control
- Zoom in/out buttons
- Current zoom percentage display
- Zoom range: 0.2x to 3x
- Attachments: Add files, images, and links to nodes
- Completion Tracking: Mark nodes as completed
- Node Resizing: Adjust node dimensions
- Node Deletion: Remove nodes and their connections
- Group Management: Create, resize, and delete node groups
- IndexedDB Storage: Automatic saving to browser database
- Export/Import: Download and upload flow data as JSON
- Auto-save: Changes saved automatically
- Reset Functionality: Clear all data with confirmation
- JSON-formatted responses for better UI presentation
- Structured fields:
summary: Main explanationkey_points: Array of important pointssuggested_next_steps: Optional follow-up actions
- Beautiful formatting with icons and styling
- Modern, dark-themed UI with Tailwind CSS
- Responsive design
- Context menus for quick actions
- Toast notifications for user feedback
- Loading overlays during AI processing
- Confirmation modals for destructive actions
- React 18.3.1: Modern UI library with hooks and functional components
- TypeScript 5.5.3: Type-safe JavaScript for better development experience
- Vite 5.4.2: Fast build tool and development server
- Tailwind CSS 3.4.1: Utility-first CSS framework
- Lucide React 0.344.0: Beautiful icon library
- React Hot Toast 2.6.0: Elegant toast notifications
- Google Gemini API: AI content generation and chat functionality
- Custom AI Service: Wrapper for Gemini API with structured output support
- RAG Implementation: Context-aware responses using visible node content
- IndexedDB: Browser-based database for persistent storage
- Custom Database Utils: Abstraction layer for IndexedDB operations
- Dagre 0.8.5: Graph layout library for automatic node arrangement
- Custom Layout Utils: Viewport-aware organization functions
- PDF.js 5.4.449: PDF text extraction (via pdfjs-dist)
- FileReader API: Native browser API for file reading
- Custom File Handlers: Utilities for text, image, and PDF processing
- ESLint 9.9.1: Code linting and quality checks
- TypeScript ESLint: TypeScript-specific linting rules
- PostCSS & Autoprefixer: CSS processing and vendor prefixing
- Node.js 18+ and npm/yarn
- Google Gemini API key (optional, demo mode available)
-
Clone the repository
git clone <repository-url> cd FlowDo
-
Install dependencies
npm install
-
Configure API Key (Optional)
- Open the app and click the Settings icon
- Enter your Google Gemini API key
- Leave empty for demo mode (uses mock responses)
-
Start development server
npm run dev
-
Build for production
npm run build
-
Preview production build
npm run preview
-
Create Your First Flow
- Right-click on the canvas to open the context menu
- Select a node type (Lecture, Concept, Question, etc.)
- Click on the node to edit its content
-
Connect Nodes
- Click the output pin (right side) of a node
- Drag to the input pin (left side) of another node
- Release to create a connection
-
Use AI Features
- Right-click on a node to open the AI menu
- Choose an action: Explain, Quiz, Enhance, Decompose, or Brainstorm
- View the AI-generated content in the node
-
Generate a Study Plan
- Click the "Plan" button in the toolbar
- Enter a topic OR upload a file
- Click "Generate Plan"
- AI creates a structured flow automatically
-
Chat with Your Flow
- Click the "Chat" button to open the sidebar
- Ask questions about your visible nodes
- Get context-aware answers from the AI
-
Organize Your Flow
- Click "Magic Organize" to automatically arrange nodes
- Use the minimap to navigate large flows
- Use "Fit to View" to center all content
- Right-click: Open context menu
- Scroll: Zoom in/out
- Drag: Pan canvas or move nodes
- Click pins: Connect nodes
FlowDo/
βββ src/
β βββ components/ # React components
β β βββ AIInsight.tsx # Structured AI response display
β β βββ ChatSidebar.tsx # RAG chat interface
β β βββ ContextMenus.tsx # Right-click menus
β β βββ FlowNode.tsx # Individual node component
β β βββ Minimap.tsx # Canvas overview
β β βββ Modals.tsx # Modal dialogs
β β βββ NodeGroup.tsx # Node grouping container
β β βββ Wire.tsx # Edge/connection component
β β βββ ZoomControls.tsx # Zoom UI controls
β βββ constants/ # App constants
β β βββ index.ts # Node types, colors, mock data
β βββ data/ # Initial data
β β βββ initialData.ts # Sample nodes and edges
β βββ hooks/ # Custom React hooks
β β βββ useCanvasInteractions.ts # Canvas event handling
β βββ types/ # TypeScript definitions
β β βββ index.ts # Interfaces and types
β βββ utils/ # Utility functions
β β βββ aiService.ts # AI/Gemini integration
β β βββ database.ts # IndexedDB operations
β β βββ fileHandlers.ts # File processing
β β βββ layout.ts # Auto-layout algorithms
β βββ App.tsx # Main application component
β βββ main.tsx # Application entry point
β βββ index.css # Global styles
βββ package.json # Dependencies and scripts
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite configuration
βββ tailwind.config.js # Tailwind CSS configuration
- Get a Google Gemini API key from Google AI Studio
- Open Settings in the app
- Paste your API key
- Click Save
- Node Types: Edit
src/constants/index.tsto add/modify node types - Colors: Modify
COLORSconstant insrc/constants/index.ts - Default Sizes: Adjust
DEFAULT_NODE_WIDTHandDEFAULT_NODE_HEIGHT
-
Explain Mode
- Returns structured JSON with summary, key points, and next steps
- Perfect for understanding complex concepts
-
Quiz Mode
- Generates practice questions
- Helps with exam preparation
-
Enhance Mode
- Improves and expands existing content
- Adds depth and clarity
-
Decompose Mode
- Breaks down topics into smaller tasks
- Creates actionable steps
-
Brainstorm Mode
- Generates related ideas and connections
- Sparks creativity
-
Flow Mode
- Creates complete study plans
- Generates nodes with dependencies
- Works with topics or file content
- Analyzes visible nodes on canvas
- Extracts text content from nodes
- Sends context to AI for accurate responses
- Maintains conversation history
- Uses Dagre for hierarchical layouts
- Handles complex graph structures
- Separates connected and isolated nodes
- Centers result in viewport
-
AI not working
- Check if API key is set in Settings
- Verify internet connection
- Try demo mode (leave API key empty)
-
Nodes not saving
- Check browser console for errors
- Verify IndexedDB is enabled
- Try clearing browser cache
-
File upload not working
- Ensure file is in supported format (TXT, MD, PDF)
- Check file size (large files may timeout)
- For PDFs, ensure text is extractable
-
Layout issues
- Use "Magic Organize" to reset layout
- Check for disconnected nodes
- Try "Fit to View" to center content
Contributions are welcome! Please feel free to submit a Pull Request.
- Follow TypeScript best practices
- Use functional components with hooks
- Maintain type safety
- Add comments for complex logic
- Test features before submitting
This project is open source and available under the MIT License.
- Google Gemini API for AI capabilities
- Dagre for graph layout algorithms
- Lucide for beautiful icons
- React and Vite communities
For issues, questions, or suggestions, please open an issue on the GitHub repository.
Built with β€οΈ for learners and educators
β Star this repo if you find it helpful!