Skip to content

xavimondev/snap2sql

Repository files navigation

Introduction

Snap2SQL lets you instantly convert database diagrams into clean SQL schemas using AI. Support for MySQL and PostgreSQL.

Requirements

  • Node >= 20
  • pnpm >= 9

Stack

  • next: A framework for server-rendered React applications.
  • shadcn/ui: Provides beautifully designed components for UI.
  • monaco-editor/react: A Monaco Editor wrapper for React applications.
  • zustand: A small, fast, and scalable state management library for React.
  • typescript: A typed superset of JavaScript that compiles to plain JavaScript.

Setting Up

OPENAI_API_TOKEN

  • Go to the OpenAI web.
  • Sign in to your account or create a new one.
  • Navigate to your API settings.
  • Generate an Secret key.
  • Copy the generated Secret key.

GOOGLE_GENERATIVE_AI_API_KEY

  • Go to the Google AI Studio.
  • Sign in to your account or create a new one.
  • Generate an Secret key.
  • Copy the generated Secret key.

UPSTASH_REDIS_REST_URL - UPSTASH_REDIS_REST_TOKEN

  • Go to the Uptash console.
  • Sign in to your account or create a new one.
  • Navigate to your database.
  • Copy the generated keys.

Run Locally

1.Clone the snap2sql repository:

git clone https://github.com/xavimondev/snap2sql

2.Install the dependencies:

pnpm install

3.Start the development:

pnpm dev

Contributors

License

MIT.

Contributors 4

  •  
  •  
  •  
  •