Convert CSV files into production-ready Postgres database schemas for Supabase with AI-powered schema generation and visual editing.
Features · Demo · Clone and run locally · Feedback and issues
- AI-Powered Schema Generation: Uses Gemini 2.5 Flash to analyze CSV files and generate intelligent Postgres schemas
- Visual Schema Editor: Interactive graph-based editor using React Flow for visualizing and editing table relationships
- Supabase Integration: Seamless OAuth integration with Supabase for project creation and schema deployment
- Multi-CSV Support: Process single or multiple CSV files to create comprehensive database schemas
- Production-Ready: Generates proper Postgres schemas with UUID primary keys, foreign key relationships, and best practices
- Migration Scripts: Generates Supabase-compatible SQL migration files for easy deployment
- Works across the entire Next.js stack
- App Router
- Pages Router
- Middleware
- Client
- Server
- It just works!
- supabase-ssr. A package to configure Supabase Auth to use cookies
- Password-based authentication with Supabase Auth
- Styling with Tailwind CSS using Supabase's black and green theme
- Components with shadcn/ui
Coming soon! The application will be deployed and available for testing.
-
You'll first need a Supabase project which can be made via the Supabase dashboard
-
Clone this repository
git clone https://github.com/your-username/dreamschema.git cd dreamschema
-
Install dependencies
npm install
-
Create a
.env.local
file and update the following:NEXT_PUBLIC_SUPABASE_URL=[INSERT SUPABASE PROJECT URL] NEXT_PUBLIC_SUPABASE_ANON_KEY=[INSERT SUPABASE PROJECT API ANON KEY] GEMINI_API_KEY=[INSERT YOUR GEMINI API KEY]
Both
NEXT_PUBLIC_SUPABASE_URL
andNEXT_PUBLIC_SUPABASE_ANON_KEY
can be found in your Supabase project's API settingsGet your Gemini API key from Google AI Studio
-
You can now run the Next.js local development server:
npm run dev
Dreamschema should now be running on localhost:3000.
Check out the docs for Local Development to also run Supabase locally.
- Upload CSV Files: Upload one or multiple CSV files through the intuitive drag-and-drop interface
- AI Analysis: Gemini 2.5 Flash analyzes your CSV headers and sample data to infer optimal database schema
- Visual Editing: Use the interactive React Flow graph to visualize and edit table structures, relationships, and column types
- Schema Generation: Generate production-ready Postgres migration scripts with proper UUID keys and relationships
- Supabase Integration: Connect your Supabase account and deploy schemas directly to your projects
- Frontend: Next.js 15.3, React 19, TypeScript
- Styling: Tailwind CSS with Supabase theme, shadcn/ui components
- AI: Google Gemini 2.5 Flash for intelligent schema generation
- Visualization: React Flow for interactive schema diagrams
- Database: Supabase (Postgres) with OAuth integration
- Deployment: Netlify, Vercel, or any Node.js hosting platform
Please file feedback and issues over on the GitHub repository.