A sleek, modern chat application that converts algorithm descriptions into beautiful Mermaid flowchart diagrams using Google's Gemini AI. Built with Next.js and styled with the MIMOS color scheme.
- Smart Algorithm Detection: Automatically detects when users describe algorithms or processes
- AI-Powered Conversion: Uses Google Gemini to convert natural language algorithms into Mermaid flowcharts
- Beautiful Visualizations: Clean, professional flowcharts with custom MIMOS styling
- PNG Export: Download generated diagrams as high-quality PNG images
- Responsive Design: Works perfectly on desktop and mobile devices
- Real-time Chat Interface: Smooth, modern chat experience
- Maroon:
#b51a8a(PANTONE 2415 C) - Grey:
#616265(PANTONE COOL GRAY 10 C) - White:
#ffffff - Black:
#000000(PANTONE BLACK C) - Silver:
#c4c4c4(PANTONE 877 C)
- Node.js 18+
- npm or yarn
- Google Gemini API key
-
Clone the repository
git clone <your-repo-url> cd algoflow
-
Install dependencies
npm install
-
Set up environment variables Create a
.env.localfile in the root directory:GEMINI_API_KEY=your_gemini_api_key_here
Get your API key from: Google AI Studio
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
- Start a conversation: Type any algorithm description in the chat
- Algorithm detection: The app automatically detects algorithm-related content
- View flowchart: Generated Mermaid diagrams appear instantly
- Download: Click the download button to save diagrams as PNG files
Try these example algorithm descriptions:
"Create a bubble sort algorithm that sorts an array of numbers in ascending order"
"Binary search algorithm to find a target value in a sorted array"
"Breadth-first search to traverse a graph and find the shortest path"
"Quick sort algorithm with divide and conquer approach"
- Framework: Next.js 15
- Language: TypeScript
- Styling: Tailwind CSS + Custom CSS
- AI: Google Gemini Pro
- Visualization: Mermaid.js
- Export: html2canvas
- Deployment: Vercel (recommended)
algoflow/
├── app/
│ ├── api/
│ │ └── convert-algorithm/
│ │ └── route.ts # Gemini API integration
│ ├── globals.css # Custom MIMOS styling
│ ├── layout.tsx # Root layout
│ └── page.tsx # Main chat interface
├── public/ # Static assets
├── .env.local.example # Environment template
└── README.md # This file
The app uses keyword matching and text analysis to identify:
- Algorithm descriptions
- Process explanations
- Step-by-step procedures
- Pseudocode
- Technical workflows
- Custom MIMOS theme colors
- Flowchart TD (top-down) format
- Proper node shapes and connections
- Clean, readable labels
- High-quality PNG export (2x scale)
- Transparent backgrounds
- Optimized for printing and sharing
- Connect your repository to Vercel
- Add environment variables in the Vercel dashboard
- Deploy automatically on git push
npm run build
npm start- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
For questions or support, please open an issue on GitHub.
Built with ❤️ using Next.js and Google Gemini AI