Turn plain English into complex SQL queries instantly. GetSQL is a robust, full-stack application designed to bridge the gap between human thought and database logic. It uses advanced LLMs (Google Gemini) to understand your specific database schema and generate accurate, optimized SQL queries.
The application follows a modern, containerized microservices architecture. It separates the AI processing engine (Python) from the application logic (Node.js), using a shared PostgreSQL database for persistence.
- Frontend (Next.js): Manages UI state, user authentication, and optimistic updates.
- AI Engine (FastAPI): Receives the prompt + schema, handles rate limiting , and communicates with Google Gemini.
- Data Layer (PostgreSQL): Stores user history, saved queries, and user profiles via Prisma ORM.
- Sync Engine: A dedicated logic flow that detects when a Guest user logs in and automatically pushes their local history to the persistent database.
- Schema-Aware Generation: Paste your
CREATE TABLEscripts, and the AI generates SQL specifically for your database structure. - Hybrid "Guest" & "Pro" Modes:
- Guest: No login required. History saved to LocalStorage. Limited to 2 queries.
- Pro: Persistent database storage, unlimited queries, and cross-device history synchronization.
- Smart Synchronization: Seamlessly migrates your guest queries to your account immediately upon sign-up/login.
- Resilient AI Layer: Built to handle API rate limits gracefully without crashing.
- Premium UI/UX: A minimalist, "Pro Workspace" aesthetic with distraction-free inputs and syntax highlighting.
- Framework: Next.js 14+ (App Router)
- Auth: Email Password + Google Signin
- Language: TypeScript
- Styling: Tailwind CSS
- State Management: Zustand
- Icons: Lucide React
- API Framework: FastAPI (Python)
- AI Model: Google Gemini 2.5 Flash
- Orchestration: Uvicorn
- Database: PostgreSQL
- ORM: Prisma
- Containerization: Docker
git clone [https://github.com/KrishCodesw/justanothergptwrapper.git](https://github.com/KrishCodesw/justanothergptwrapper.git)
cd justanothergptwrapper
cd frontend
npm ci - Environment Setup Create a .env file in the root directory:
Code snippet
- .env file
# Database (Neon.tech URL)
DATABASE_URL="postgresql://user:password@db:5432/slang_db"
# AI Configuration
GEMINI_API_KEY="your_actual_google_api_key_here"
# Frontend Configuration
NEXT_PUBLIC_API_URL="http://localhost:8000"npx prisma generate
npm run dev- Backend setup
cd ..
cd venv
pip install -r requirements.txt
uvicorn src.main:app --reload --port 8000
