Skip to content

Quick Start

Kshitij Joshi edited this page May 26, 2026 · 1 revision

Quick Start Guide ⚡

Get Ask My PostgreSQL Database running in 5 minutes!

Prerequisites

  • Python 3.10+
  • Node.js 18+
  • PostgreSQL (local or remote)
  • Ollama

Step 1: Install Ollama (2 minutes)

# macOS
brew install ollama

# Linux
curl -fsSL https://ollama.com/install.sh | sh

# Pull model
ollama pull llama3.2

Step 2: Clone & Setup Backend (1 minute)

# Clone repository
git clone https://github.com/kjosh2008/ask-my-postgres-database.git
cd ask-my-postgres-database/backend

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Configure database
cp .env.example .env
nano .env  # Edit with your database credentials

Edit .env:

DB_HOST=localhost
DB_NAME=your_database
DB_USER=postgres
DB_PASSWORD=your_password

Step 3: Setup Frontend (1 minute)

cd ../frontend

# Install dependencies
npm install

Step 4: Start Application (30 seconds)

Terminal 1 - Backend:

cd backend
source venv/bin/activate
python main.py

Terminal 2 - Frontend:

cd frontend
npm run dev

Step 5: Open & Test (30 seconds)

  1. Open http://localhost:3000
  2. Click an example question
  3. See the magic happen! ✨

🎉 You're Done!

Try these questions:

  • "Who are the highest paid employees?"
  • "Which departments are over budget?"
  • "Show me all employees in Finance"

Next Steps

Troubleshooting

Backend won't start?

  • Check Ollama is running: ollama list
  • Verify database connection: psql -h localhost -U postgres

Frontend shows blank page?

Still stuck?


← Back to Home | Installation Guide →