Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Database Query Tool

A web-based tool for managing PostgreSQL database connections, viewing metadata, and executing SQL queries with natural language support.

Project Structure

w2/db_query/
├── backend/          # FastAPI backend (Python 3.12+)
├── frontend/         # React frontend (TypeScript, Refine 5)
├── fixtures/         # REST Client test files
│   ├── test.rest     # API test requests
│   └── README.md     # Testing guide
└── Makefile          # Development commands

Quick Start

Initial Setup

# Install all dependencies
make install

# Setup database and environment
make setup
# Then edit backend/.env and add your OPENAI_API_KEY

# Start development servers
make dev

Development Commands

# View all available commands
make help

# Start backend only
make dev-backend

# Start frontend only
make dev-frontend

# Run tests
make test

# Format code
make format

# Run linters
make lint

API Testing

Using REST Client (VSCode)

  1. Install REST Client extension
  2. Open fixtures/test.rest
  3. Click "Send Request" above any HTTP request
  4. View responses in VSCode panel

See fixtures/README.md for detailed testing guide.

Using Makefile

# Check if backend is running
make health

# Open API documentation
make docs

Phase 1 Status

Phase 1 Complete: All setup and foundation tasks completed.

  • Backend project structure initialized
  • Frontend project structure initialized
  • Core infrastructure (FastAPI, database, models) ready
  • Data models defined with camelCase API convention
  • Makefile with common development tasks
  • REST Client test file for API testing

Next Steps

Proceed to Phase 2 for core feature implementation (US1 + US2).

About

AI class home work

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages