This project is a full-stack application for extracting, visualizing knowledge graphs from PDF. It leverages AI and graph technologies to help users explore relationships within their documents.
- Upload PDFs/CSVs: Extracts text and data from uploaded files.
- AI-Powered Knowledge Graphs: Uses LLMs to generate and query knowledge graphs from document content.
- Interactive Visualization: Visualizes knowledge graphs in the browser using Cytoscape.js.
- Conversational Interface: Chat with your documents to extract insights.
- Frontend: Next.js (React, TypeScript, Cytoscape.js)
- Backend: FastAPI (Python)
- Database: SQLAlchemy (default: PostgreSQL)
- AI/LLM: OpenAI API (configurable via environment variables)
- Node.js (v18+ recommended)
- npm (v9+ recommended)
- Python (v3.9+ recommended)
- pip (Python package manager)
- OpenAI API Key (for LLM features)
git clone https://github.com/yourusername/ai-dashboard.git
cd ai-dashboardcd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt # If requirements.txt exists, otherwise install FastAPI, SQLAlchemy, etc.
cp .env.example .env # Create and edit your .env file with your OpenAI key and DB settings
uvicorn main:app --reload # Starts FastAPI on http://localhost:8000cd ../frontend
npm install
npm run dev # Starts Next.js on http://localhost:3000-
Backend (
backend/.env):OPENAI_API_KEY=your_openai_keyDATABASE_URL=sqlite:///./test.db(or your preferred DB)
-
Frontend: (Set this to the URL of your backend API)
NEXT_PUBLIC_API_URL=http://localhost:8000
- Start both backend and frontend servers as above.
- Open http://localhost:3000 in your browser.
- Upload a PDF or CSV, visualize the knowledge graph, and interact via chat.