A natural language CSV querying application built with Next.js and FastAPI.
SmartQuery is built as a monorepo with the following structure:
- Frontend: Next.js 14 with TypeScript, Tailwind CSS, and daisyUI
- Backend: FastAPI with Python for natural language processing
- Database: PostgreSQL for metadata storage
- Storage: File storage for CSV uploads
- AI: OpenAI integration for natural language to SQL conversion
- Node.js 18+ and npm
- Python 3.9+
- Git
- Clone the repository:
git clone <repository-url>
cd SmartQuery- Install dependencies:
# Frontend
cd frontend
npm install
# Backend
cd ../backend
pip install -r requirements.txt- Set up environment variables:
# Frontend
cp frontend/.env.example frontend/.env.local
# Backend
cp backend/.env.example backend/.env- Start development servers:
# Frontend (from frontend directory)
npm run dev
# Backend (from backend directory)
uvicorn main:app --reloadThis project uses GitHub Actions for continuous integration and deployment:
- Frontend CI: ESLint, TypeScript checking, testing, and building
- Backend CI: Black formatting, isort, flake8 linting, and pytest
- Integration Tests: Full-stack testing with PostgreSQL
- Security Scanning: Trivy vulnerability scanning and dependency audits
- Multi-version Testing: Node.js 18.x/20.x and Python 3.9/3.10/3.11
- Automated Deployment: Deploys to staging on main branch
# Frontend tests
cd frontend
npm run test
npm run lint
npm run type-check
# Backend tests
cd backend
pytest tests/
black --check .
isort --check-only .
flake8 .✅ Task 1: Monorepo structure initialized
✅ Task 2: Environment configuration setup
✅ Task 3: API contract specifications defined
✅ Task 4: CI/CD pipeline implemented
- Create a feature branch
- Make your changes
- Ensure all tests pass locally
- Create a pull request
- Wait for CI/CD pipeline to pass
- Request review
The CI/CD pipeline will automatically run on all pull requests and validate code quality, run tests, and perform security checks.