https://github.com/sudipbishwakarma/hackathon-infinite
Hackathon 2025 Infinite. RAG application for analyzing and optimizing PL/SQL scripts.
https://github.com/sudipbishwakarma/hackathon-infinite
azureopenai fastapi langchian nextjs nodejs pinecone python sqlalchemy sqlite
Last synced: 2 months ago
JSON representation
Hackathon 2025 Infinite. RAG application for analyzing and optimizing PL/SQL scripts.
- Host: GitHub
- URL: https://github.com/sudipbishwakarma/hackathon-infinite
- Owner: SudipBishwakarma
- Created: 2025-11-04T16:20:15.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-11-04T17:09:10.000Z (8 months ago)
- Last Synced: 2025-11-04T19:05:21.487Z (8 months ago)
- Topics: azureopenai, fastapi, langchian, nextjs, nodejs, pinecone, python, sqlalchemy, sqlite
- Language: Jupyter Notebook
- Homepage:
- Size: 1.22 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hackathon 2025 Infinite - PL/SQL Auditor Chatbot
This project is a full-stack application designed to audit and analyze PL/SQL scripts using AI. It leverages Retrieval-Augmented Generation (RAG) to compare PL/SQL logic against source and standard layout definitions, identifying mismatches, type issues, and missing mappings.
## System Overview
- **Knowledge Base**: Uses a vector store (Pinecone) to index data dictionaries and PL/SQL mapping scripts.
- **RAG Architecture**: Combines hybrid search with LLMs (Azure OpenAI) to provide context-aware analysis.
- **Auditor Capabilities**:
- Analyzes transformation logic and hardcoded values.
- Flags datatype mismatches and null-handling issues.
- Provides a chat interface for natural language Q&A about the codebase and mappings.
## Tech Stack
- **Backend**: FastAPI (Python 3.9+)
- **Frontend**: Next.js (TypeScript, React)
- **AI/LLM**: Azure OpenAI, LangChain
- **Knowledgebase/Vector Database**: Pinecone
- **Conversation Memory**: SQLite (via SQLAlchemy)
---
## Getting Started
Steps to set up and run the project locally.
### Prerequisites
- **Python**: 3.9 or higher
- **Node.js**: 18.x or higher
- **Package Manager**: `npm` (included with Node.js) or `pnpm`/`yarn`
- **Pinecone**: Pinecone account and API keys
- **Azure OpenAI**: Azure OpenAI account and API keys
### Installation
1. **Clone the repository**:
```bash
git clone https://github.com/SudipBishwakarma/hackathon-infinite.git
cd hackathon-infinite
```
2. **Set up the Backend**:
- (Optional) Create a virtual environment:
```bash
python -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\activate
```
- Install Python dependencies:
```bash
pip install -r requirements.txt
```
3. **Set up the Frontend**:
- Navigate to the frontend directory and install packages:
```bash
cd frontend
npm install
```
### Environment Configuration
1. **Backend**:
- Copy the `.env.example` to `.env` in the root directory.
- Fill in your Azure OpenAI, Pinecone, and Database credentials.
2. **Frontend**:
- Navigate to `frontend/` and copy `.env.local.sample` to `.env.local`.
- Replace the domain or ip with your API URL.
---
## Running the Servers
### 1. Start the Backend (FastAPI)
From the project root:
```bash
cd api
uvicorn main:app
```
The API will be available at `http://localhost:8000`. You can view the interactive documentation (Swagger UI) at `http://localhost:8000/docs`.
### 2. Start the Frontend (Next.js)
Open a new terminal and navigate to the `frontend` directory:
```bash
cd frontend
npm run dev
```
The application will be accessible at `http://localhost:3000`.
---
## Example Use Cases
- **Logic Validation**: *"Does this script map 'payer_id' correctly according to the standard layout?"*
- **Constraint Checking**: *"Flag columns where null values are not handled but the target is NOT NULL."*
- **Schema Discovery**: *"Which source layouts map to version 3.2 of the standard format?"*
## Project Structure
- `api/`: FastAPI backend implementation (controllers, RAG logic, utilities).
- `data/`: Knowledgebase (sample sql scripts and data dictionaries).
- `frontend/`: Next.js frontend application.
- `src/`: Jupyter notebooks for prototyping and testing.
- `requirements.txt`: Python dependencies.