An intelligent, interactive prototyping component visualization and BOM (Bill of Materials) management tool built with Next.js and React Flow. Flow combines visual design capabilities with AI-powered assistance to streamline the prototyping process.
- Interactive Mind Map: Visual representation of prototyping components and their relationships using React Flow
- Component Library: Comprehensive library of prototyping components categorized by type (mechanical, electrical, control, hydraulic)
- BOM Management: Track costs, quantities, and specifications for each component with real-time calculations
- Real-time Editing: Add, edit, and delete components with live updates and instant visual feedback
- Connection Management: Define relationships between components with customizable link types
- Export/Import: Save and load project configurations in JSON format for easy sharing and backup
- AI Design Generation: Generate complete prototyping designs from natural language descriptions
- Smart Suggestions: Get AI-powered recommendations for additional components and optimizations
- Workflow Analysis: Analyze prototyping efficiency and identify potential bottlenecks
- Troubleshooting Assistant: Get help diagnosing and solving prototyping issues
- Interactive Chat: Conversational AI interface for design guidance and technical support
- Design Editing: Modify existing designs using natural language commands
- Modern UI: Clean, responsive interface built with Tailwind CSS and Radix UI
- Drag & Drop: Intuitive component placement and connection creation
- Sample Projects: Pre-loaded robotics project demonstrating system capabilities
- Mobile Responsive: Works seamlessly across desktop, tablet, and mobile devices
- Dark/Light Mode: Theme support for comfortable usage in any environment
- Framework: Next.js 15.2.4 with App Router
- Frontend: React 19 with TypeScript
- Styling: Tailwind CSS 4.1.9 with custom animations
- Flow Visualization: @xyflow/react for interactive node-based diagrams
- AI Integration: Google Gemini AI (Gemini 2.5 Pro) for intelligent features
- UI Components: Radix UI primitives with custom styling
- Form Handling: React Hook Form with Zod validation
- Markdown: React Markdown with syntax highlighting
- Icons: Lucide React
- Fonts: Geist Sans & Mono
- Node.js 18+
- npm, pnpm, or yarn package manager
- Google Gemini API key (for AI features)
-
Clone the repository
git clone https://github.com/obhox/flow.git cd flow -
Install dependencies
npm install # or pnpm install # or yarn install
-
Environment Configuration Create a
.env.localfile in the root directory:GOOGLE_GEMINI_API_KEY=your_gemini_api_key_here
To get a Gemini API key:
- Visit Google AI Studio
- Create a new API key
- Copy the key to your
.env.localfile
-
Run the development server
npm run dev # or pnpm dev # or yarn dev
-
Open your browser Navigate to http://localhost:3000 to see the application.
- Load Sample Data: Click "Load Sample" to see a pre-configured autonomous mobile robot project
- Explore AI Features: Use the AI chat interface to generate new designs or get suggestions
- Add Components: Use the component library on the left to drag and drop new parts
- Create Connections: Select components and use the connection tools to link them
- Edit Properties: Click on any component to edit its properties, cost, and specifications
- Export Project: Save your work using the export functionality
Flow's AI capabilities allow you to create prototypes using natural language:
- Generate New Designs: Type "Generate a design for a robotic arm" or "Create a drone prototype"
- Modify Existing Designs: Say "Add a camera sensor" or "Replace the motor with a servo"
- Get Suggestions: Ask "What components would improve this design?" or "How can I optimize this?"
- Troubleshoot Issues: Request help with "This motor isn't working properly" or "How do I connect these components?"
- Mechanical: Frames, gears, wheels, bearings, actuators, etc.
- Electrical: Motors, sensors, controllers, batteries, power supplies, etc.
- Control: PLCs, HMIs, drives, encoders, microcontrollers, etc.
- Hydraulic: Pumps, cylinders, valves, filters, reservoirs, etc.
- Assembly: Physical assembly relationships
- Power: Electrical power connections
- Data: Communication and data flow
- Material: Material flow paths
- Dependency: Logical dependencies
- Sequence: Process sequence relationships
- Custom: User-defined connection types
The included sample project demonstrates a comprehensive robotics system with:
- Chassis & Structure: Aluminum frame with mounting points
- Locomotion System: Dual drive motors with omni-directional wheels
- Power System: LiPo battery with power distribution
- Control System: Raspberry Pi 4B with motor drivers
- Sensing System: LiDAR, RGB-D camera, IMU, ultrasonic sensors
- Manipulation System: Servo-driven gripper assembly
- Communication: WiFi/Bluetooth module with emergency stop
Total project cost: ~$1,000 with detailed component specifications.
flow/
βββ app/ # Next.js App Router
β βββ api/ # API routes
β β βββ ai/ # AI integration endpoints
β β βββ chat/ # AI chat API
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout
β βββ page.tsx # Main page
βββ components/ # React components
β βββ ui/ # Reusable UI components (Radix UI)
β βββ ai-chat.tsx # AI chat interface
β βββ ai-suggestions-panel.tsx # AI suggestions
β βββ canvas.tsx # Main flow canvas
β βββ component-library.tsx # Component library
β βββ custom-node.tsx # Custom flow nodes
β βββ custom-edge.tsx # Custom flow edges
β βββ part-editor.tsx # Component property editor
β βββ prototyping-mind-map.tsx # Main mind map
β βββ simple-chat-bar.tsx # Simple AI chat
β βββ toolbar.tsx # Main toolbar
βββ lib/ # Utilities and configuration
β βββ ai/ # AI integration
β β βββ gemini.ts # Google Gemini AI service
β βββ constants.ts # Component definitions and sample data
β βββ types.ts # TypeScript type definitions
β βββ utils.ts # Utility functions
βββ hooks/ # Custom React hooks
βββ styles/ # Additional styles
βββ public/ # Static assets
βββ README.md # Project documentation
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
- Edit
lib/constants.tsto add new component types toCOMPONENT_CATEGORIES - Update the
ALL_COMPONENTSarray with your new components - Components support custom colors, icons, and properties
Update the SAMPLE_DATA object in lib/constants.ts to create your own sample projects with custom parts and connections.
The AI service in lib/ai/gemini.ts can be extended with new methods:
- Add new prompt templates for specific use cases
- Implement custom design generation logic
- Create specialized analysis functions
The project uses Tailwind CSS with custom component styling. Modify app/globals.css for global styles or individual component files for specific styling.
We welcome contributions to Flow! Here's how you can help:
- π Bug Reports: Report issues via GitHub Issues
- π‘ Feature Requests: Suggest new features or improvements
- π§ Code Contributions: Submit pull requests for bug fixes or new features
- π Documentation: Improve documentation and examples
- π§ͺ Testing: Help test new features and report feedback
- Fork the repository
- Clone your fork:
git clone https://github.com/obhox/flow.git - Create a feature branch:
git checkout -b feature/amazing-feature - Install dependencies:
npm install - Set up environment variables (see Installation section)
- Make your changes
- Test your changes:
npm run dev - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow the existing code style and conventions
- Write clear, descriptive commit messages
- Add comments for complex logic
- Update documentation when needed
- Test your changes thoroughly
- Ensure your code follows the project's style guidelines
- Update the README.md if needed
- Make sure all tests pass
- Request review from maintainers
- Address any feedback promptly
This project is licensed under the MIT License - see the LICENSE file for details.
- β Commercial use
- β Modification
- β Distribution
- β Private use
- β Liability
- β Warranty
- React Flow - For the excellent flow diagram library
- Radix UI - For accessible UI components
- Tailwind CSS - For utility-first CSS framework
- Google Gemini AI - For powerful AI capabilities
- Lucide - For beautiful icons
- Next.js - For the amazing React framework
- Vercel - For hosting and analytics
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π§ Email: hello@obhoxsystems.com
- π¦ Twitter: @obhoxsys
- Push your code to GitHub
- Connect your repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on every push
Flow can be deployed on any platform that supports Next.js:
- Netlify
- Railway
- Heroku
- AWS
- Google Cloud Platform
Flow - Streamlining prototyping visualization with AI-powered intelligence.
Made with β€οΈ by Joy Oguntona