AI-powered flowchart generation from natural language descriptions.
- Frontend: Next.js 14 (App Router), React 18, TypeScript
- Backend: Next.js API Routes
- Database: Supabase (PostgreSQL) with Row Level Security
- Authentication: Supabase Auth
- AI: OpenAI GPT-4 Turbo
- Styling: Tailwind CSS + shadcn/ui
- State Management: Zustand
- Diagrams: Mermaid.js
- Node.js 18+ installed
- Supabase account and project
- OpenAI API account
Create a .env.local file in the root directory with the following variables:
# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_MODEL=gpt-4-turbo-preview
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url_here
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key_here
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key_here
# Application Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000- Clone the repository
- Install dependencies:
npm install
- Set up environment variables (see above)
- Run the development server:
npm run dev
- Open http://localhost:3000 in your browser
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run test- Run testsnpm run type-check- Run TypeScript checks
flowsense/
├── app/ # Next.js App Router
│ ├── (auth)/ # Auth route group
│ ├── dashboard/ # Dashboard pages
│ ├── editor/ # Flowchart editor
│ ├── shared/ # Shared flowcharts
│ └── api/ # API routes
├── components/ # Reusable components
│ ├── ui/ # shadcn/ui components
│ ├── flowchart/ # Flowchart components
│ ├── auth/ # Auth components
│ └── common/ # Common components
├── lib/ # Utility functions
├── hooks/ # Custom hooks
├── stores/ # Zustand stores
├── types/ # TypeScript types
└── middleware.ts # Next.js middleware
- Row Level Security (RLS) enabled on all database tables
- Server-side authentication verification
- Input validation with Zod
- Rate limiting on AI endpoints
- Secure environment variable handling
- Project Setup
- Authentication System
- Database Schema & RLS
- Natural Language Input
- AI Clarification Loop
- Mermaid Generation
- Dashboard
- CRUD Operations
- Interactive Q&A
- Advanced Editing
- Export Functionality
- Sharing Features
- Template Library
- Visual Editor
- Primary: Deep Blue (#2563eb)
- Secondary: Emerald Green (#10b981)
- Accent: Indigo (#6366f1)
- Neutrals: Modern grays
MIT License - see LICENSE file for details.