FakerDB is an AI-powered SQL data generator that helps developers create realistic test data for database tables. Using Google's Gemini AI, it generates the ready to copy-paste SQL statements for both table schema and sample data across multiple SQL dialects.
- Generate ready-to-run SQL commands for both CREATE and INSERT statements
- Design either using single table mode or multiple related tables using diagram view
- Support for multiple SQL dialects:
- MySQL
- PostgreSQL
- SQLite
- Oracle
- AI-powered data generation based on field names and types
- Context-aware data generation for each field
- Copy or export SQL scripts
- Node.js (v18 or higher)
- npm
- Google Gemini API key (get it for free at Google AI Studio)
- Pocketbase
- Clone the repository:
git clone https://github.com/krishna2206/fakerdb.git
cd fakerdb
- Install dependencies:
npm install
- Create a
.env
file in the root directory with the following content:
VITE_POCKETBASE_URL=http://127.0.0.1:8090
You can modify this URL if your Pocketbase instance is running on a different host or port.
- Apply Pocketbase migrations:
pocketbase migrate
- Start the development server:
npm run dev
- Run the Pocketbase backend:
pocketbase serve
-
Open http://localhost:8080 in your browser.
-
Add your Gemini API key in the settings menu of the application.
The application supports 3 authentication methods : Email, Google, GitHub. You can login/register using email address and password, but if you want to connect using your Google or GitHub account, you must do some configurations.
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Navigate to "APIs & Services" > "Credentials"
- Click "Create Credentials" and select "OAuth client ID"
- Set the application type to "Web application"
- Add your application name
- Add authorized JavaScript origins:
- For development:
http://localhost:8080
- For production: Add your production URL
- For development:
- Add authorized redirect URIs:
- For development:
http://localhost:8090/api/oauth2-redirect
- For production:
https://your-production-domain.com/api/oauth2-redirect
- For development:
- Click "Create" and note your Client ID and Client Secret
- In Pocketbase Admin UI (http://localhost:8090/_/), select the
users
collection and click on settings button - Enable Google auth provider and enter your Client ID and Client Secret
- Save your changes
- Go to your GitHub account settings
- Navigate to "Developer settings" > "OAuth Apps"
- Click "New OAuth App"
- Enter your application name
- Set the homepage URL:
- For development:
http://localhost:8080
- For production: Your production URL
- For development:
- Add the authorization callback URL:
- For development:
http://localhost:8090/api/oauth2-redirect
- For production:
https://your-production-domain.com/api/oauth2-redirect
- For development:
- Click "Register application" and note your Client ID
- Generate a new Client Secret and note it down
- In Pocketbase Admin UI (http://localhost:8090/_/), select the
users
collection and click on settings button - Enable GitHub auth provider and enter your Client ID and Client Secret
- Save your changes
After configuring these providers, users will be able to log in using their Google or GitHub accounts.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.