Skip to content

Your AI genie for PDFs and documents - A Next.js frontend interface for intelligent document assistant.

License

Notifications You must be signed in to change notification settings

imtiaj-007/docugenie-frontend

Repository files navigation


Docugenie Banner
nextjs react typescript tailwindcss Google AI Gemini

Your AI genie for PDFs and documents - A Next.js frontend interface for intelligent document assistant.

  1. πŸ€– Introduction
  2. βš™οΈ Tech Stack
  3. πŸ”‹ Features
  4. πŸ› οΈ Architecture
  5. 🀸 Getting Started
  6. πŸ“‚ Project Structure

Checkout the backend code: Docugenie Backend

DocuGenie is an AI-powered chat assistant that helps you extract insights, summarize content, analyze PDF documents and other file formats, generate diagrams and visualizations, create comprehensive plans, perform agentic tasks, and generate AI-powered documents. It provides intelligent document processing capabilities including text extraction, content analysis, automated summarization, diagram generation, planning assistance, and AI document creation.

Frontend

  • Next.js - React framework for server-side rendering and routing
  • React.js - Component-based UI library
  • Tailwind CSS - Utility-first CSS framework for styling
  • shadcn/ui - Accessible UI component library

Backend

  • Python >=3.10 - Programming language
  • FastAPI - Modern web framework with async support
  • Pydantic - Data validation and settings management
  • SQLAlchemy - Database ORM and management
  • Alembic - Database migrations
  • PostgreSQL - Primary database system
  • FAISS - Vector similarity search and clustering
  • LangChain - AI model integration and RAG pipelines

AI/ML

  • Google Gemini - Primary LLM for text generation
  • HuggingFace - Embedding models and transformers
  • OpenAI - Alternative LLM provider

Infrastructure

  • Docker - Containerization
  • Poetry - Python dependency management
  • pnpm - JavaScript/TypeScript package manager
  • Prettier - Code formatter for frontend codebase
  • ESLint - JavaScript/TypeScript linting
  • Jest - JavaScript/TypeScript testing framework
  • Pytest - Python testing framework
  • Ruff - Python code linting and formatting

Document Processing

  • πŸ“„ Multi-format document support (PDF, DOCX, TXT)
  • πŸ” Intelligent text extraction and parsing
  • 🧠 AI-powered content analysis and summarization
  • πŸ“Š Automated diagram and visualization generation (Coming Soon...)

Chat & AI Capabilities

  • πŸ’¬ Context-aware document conversations
  • πŸ” Semantic search across document collections
  • πŸ“ AI-powered document creation and editing (Coming Soon...)
  • 🎯 Agentic task execution (Coming Soon...)

Technical Features

Backend

  • πŸ—„οΈ PostgreSQL with SQLAlchemy ORM
  • πŸ”„ Alembic database migrations
  • πŸš€ FastAPI with high-performance endpoints
  • πŸ“‹ Pydantic models for robust data validation
  • πŸ” FAISS vector database for efficient similarity search

Frontend

  • ⚑ Next.js for fast server-side rendering and routing
  • βš›οΈ Modular component architecture with React.js
  • πŸ’Ž shadcn/ui for accessible, modern UI components
  • 🎨 Tailwind CSS for utility-first, customizable styling
  • πŸ› οΈ TypeScript support for type-safe frontend development
  • ♻️ pnpm for efficient JavaScript/TypeScript package management
  • πŸ§ͺ Jest for robust frontend testing
  • ✨ Prettier & ESLint for consistent code style and linting

The system leverages LangChain AI models, FAISS vector database, and RAG (Retrieval-Augmented Generation) pipeline to provide intelligent document analysis and conversational interactions.

Document Processing Pipeline:

The document processing pipeline transforms raw documents into searchable, intelligent knowledge bases:

Document Processing Pipeline

Key Components:

  • Parser & Tokenizer: Extracts text content and breaks it into manageable chunks
  • LangChain AI Models: Generates embeddings using state-of-the-art language models
  • FAISS Vector Database: Stores and indexes vectors for efficient similarity search
  • Metadata Database: Maintains document metadata, chunk references, and user sessions

Chat & RAG Pipeline:

The chat system provides intelligent, context-aware responses using retrieved document knowledge:

Document Processing Pipeline

Key Components:

  • Chat Orchestrator: Manages conversation flow, session context, and query understanding
  • RAG Pipeline: Retrieves relevant document chunks using vector similarity search
  • FAISS Vector DB: Provides fast and accurate semantic search capabilities
  • Prompt Manager: Optimizes prompts with context injection and formatting guidelines
  • LangChain AI: Generates intelligent responses using retrieved context

Prerequisites

  • Node.js >= v22.0
  • pnpm >= v10.0.0
  1. Clone the repository
git clone https://github.com/imtiaj-007/docugenie-frontend.git

cd docugenie-frontend
  1. Install dependencies
pnpm install
  1. Available Commands

Run these commands from the project root:

Script Command Description
Development pnpm dev Start Next.js dev server (Turbopack)
Production Build pnpm build Build optimized production bundle (Turbopack)
Start pnpm start Start Next.js production server
Type Checking pnpm type-check Run TypeScript type checks
Lint (Check) pnpm lint:check Run ESLint (no fixes)
Lint (Fix) pnpm lint:fix Run ESLint with autofix
Format (Check) pnpm format:check Check code formatting with Prettier
Format (Fix) pnpm format:fix Format code with Prettier

For example, to start the dev server:

pnpm dev

To run type checks and lint:

pnpm type-check
pnpm lint:check
pnpm format:check

For a full list, see the scripts section of package.json.

docugenie-frontend/
β”œβ”€β”€ .github/                # CI/CD workflows, GitHub configs
β”‚   └── workflows
β”œβ”€β”€ .vscode/                # VSCode settings and recommendations
β”‚   β”œβ”€β”€ settings.json
β”‚   └── extensions.json
β”œβ”€β”€ public                  # Static assets (images, diagrams, etc.)
β”œβ”€β”€ src/                    # Main frontend source code
β”‚   β”œβ”€β”€ app                 # Next.js app directory (routing, pages, layout)
β”‚   β”œβ”€β”€ components          # Reusable React UI components
β”‚   β”œβ”€β”€ hooks               # Custom React hooks
β”‚   β”œβ”€β”€ lib                 # Utilities, helpers, and shared logic
β”‚   β”œβ”€β”€ services            # API clients and business logic
β”‚   └── store               # Zustand stores (state management)
β”œβ”€β”€ .gitignore
β”œβ”€β”€ .prettierignore
β”œβ”€β”€ .prettierrc
β”œβ”€β”€ commitlint.config.ts
β”œβ”€β”€ eslint.config.mjs
β”œβ”€β”€ lint-staged.config.js
β”œβ”€β”€ next.config.ts
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
└── LICENSE

CI Pipeline


πŸ“š API Documentation

Once the application is running, access the interactive API docs:

πŸ‘₯ Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ƒ License

CC BY-NC-SA 4.0 β€” Non-commercial use only. Credit required. Derivatives must be shared alike. Check Details here.

About

Your AI genie for PDFs and documents - A Next.js frontend interface for intelligent document assistant.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors