Skip to content

Establish a conversation with document. Full-stack application backed with FastAPI, PosgreSQL, Prisma, AWS, LangChain as backend and ReactJS as frontend.

Notifications You must be signed in to change notification settings

wantedbear007/Guardian-assist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guardian-assist: PDF interacting App

This repository contains a web application designed to upload PDF files to AWS S3, process them using Google GenAI LLM, and allow users to ask questions related to the content of the PDF file. The application utilizes FastAPI for the backend, React for the frontend, and integrates with AWS S3, Google GenAI, PostgreSQL with Supabase, and PyPDF2 for PDF content extraction.

Architecture Overview

Backend (FastAPI)

  • Framework: FastAPI (Python)
  • Technologies:
    • PyPDF2: For reading the content of PDF files.
    • PostgreSQL with Supabase: Database solution for storing pdf meta data.
  • Endpoints:
    • /: Endpoint to check health of the servers.
    • /v1/upload/: Endpoint for uploading PDF files to AWS S3.
    • /v1/chat/: Endpoint for users to ask questions related to the content of the processed PDF files.
    • /docs/: Endpoint to test the API using OpenAPI

Frontend (React)

  • Framework: React (TypeScript + vite)
  • Features:
    • File Upload: Allows users to select and upload PDF files to the backend.
    • Chat Interface: Provides a user-friendly interface for users to ask questions related to the content of the PDF files.

Dockerization

  • Docker-Compose: Provides a Docker Compose file for running the entire backend.
  • Dockerfile: Defines Docker images for the backend services, making it easy to deploy and scale.

Setup Instructions

  1. Backend Setup:
    1. Clone the repository.
    2. Navigate to the backend directory.
    3. Install dependencies: pip install -r requirements.txt.
    4. Start the FastAPI server: uvicorn main:app --reload. or run python main.py
  2. Frontend Setup:
    1. Navigate to the frontend directory.
    2. Install dependencies: npm install or bun install or yarn install.
    3. Start the React development server: npm start or bun run dev or yarn dev.
  3. Docker Deployment:
    1. Ensure Docker and Docker Compose are installed.
    2. Navigate to the root directory of the repository.
    3. Run docker-compose up --build to build and start the Docker containers.
  4. Accessing the Application:
    1. Open your web browser and navigate to http://http://localhost:5173/ or look for port number in the terminal.
    2. You should see the frontend interface for uploading files and interacting with the chat.

Preview

Contributing

Contributions are welcome! If you'd like to contribute to this project, feel free to fork the repository and submit a pull request with your changes.

About

Establish a conversation with document. Full-stack application backed with FastAPI, PosgreSQL, Prisma, AWS, LangChain as backend and ReactJS as frontend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published