Skip to content

An application that takes any document (PDF/Image) and generates smart summaries.

Notifications You must be signed in to change notification settings

sudhanshuv1/summary-generator

Repository files navigation

Summary Assistant

This is a Next.js app that takes any document (PDF/Image) and generates smart summaries.

Getting Started

Here are the steps to run this project on local development environment :

  1. Clone the project and run:
cd summary-generator 
npm install
  1. Sign in to Google Cloud Platform and create a project in the console. Enable these APIs and services in the project:
  • Cloud Storage
  • Cloud Storage API
  • Cloud Document AI API
  • Vertex AI API

Create a storage bucket and processor with the Document AI API.

  1. Install the gcloud CLI and set up Application Default Credentials.

  2. Create an OAuth app on Github, with the homepage URL set to http://localhost:3000/dashboard and the callback URL set to http://localhost:3000/api/auth/callback/github.

  3. Create a MongoDB collection and copy the connection string.

  4. Create a .env.local file and create the relevant environment variables form Google Cloud, Github, MongoDB, and NextAuth. Set HOMEPAGE_URL to http://localhost:3000.

  5. Run the development server using:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Approach

This project uploads the files to Google Cloud Storage, uses the Cloud Document AI API to extract text from the PDF or Image file, and then sends a prompt to Gemini via the Vertex AI API to summarize the extracted text. NextAuth enables authentication with github or credentials that are stored in MongoDB.

Deployed on Vercel

This project is deployed on Vercel: https://summary-generator-beryl.vercel.app/

About

An application that takes any document (PDF/Image) and generates smart summaries.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published