An intelligent web application for generating concise summaries from PDF documents and text-based content. Built with a modern, scalable microservice architecture and a unique E-Ink inspired design.
- Dual Input Modes: Summarize content by either uploading a PDF document or directly pasting text.
- Advanced Summarization Control:
- Word Count Slider: For short summaries, precisely control the desired length.
- Page Limit Input: For long documents, request a detailed summary of a specific page length.
- Dynamic Summarization Strategy: Automatically switches between a simple summarization method for short texts and a powerful MapReduce strategy for long documents.
- Secure User Authentication: Full registration and login system with both email/password (hashed with bcrypt) and Google OAuth 2.0.
- Persistent History: Registered users can save, view, and re-download their summarization history.
- Professional PDF Export: Generate beautifully formatted PDF documents from summaries, featuring custom fonts and proper pagination.
- Unique E-Ink UI: A custom-designed, minimalist interface inspired by e-ink displays for enhanced readability and focus.
This project is built with a decoupled architecture, ensuring each component is optimized for its specific task.
- Frontend: A Next.js application handles the user interface. It communicates with the API Gateway for all operations.
- API Gateway: A Go (Gin) service acts as the central entry point. It manages user authentication (JWT), handles registration/login, and routes summarization requests to the appropriate service.
- AI Service: A Python (FastAPI) microservice contains all the AI logic. It uses LangChain to interface with a language model, process PDF files, and perform summarization tasks.
- Database: A PostgreSQL instance stores all user data and saved document summaries.
- Containerization: The entire backend stack is containerized and managed by Docker Compose, allowing for a one-command setup.
Follow these steps to get the complete application running on your local machine.
- Git
- Docker Desktop
- Ollama
- Go (v1.24+)
- Python (v3.12+)
- Node.js (v20+ LTS) with
pnpm(npm install -g pnpm)
-
Clone the Repository
git clone https://github.com/your-github-username/ai-summarizer.git cd ai-summarizer -
Configure Environment Variables
- In the
frontend/directory, create a.env.localfile and add your Google Client ID:NEXT_PUBLIC_GOOGLE_CLIENT_ID="YOUR_GOOGLE_CLIENT_ID" - In the root
docker-compose.yml, update theenvironmentsection for thego-apiservice with your JWTSECRETandGOOGLE_CLIENT_ID.
- In the
-
Run the AI Model Open a new terminal and run the following command to download and serve the Llama 3 model. Leave this running.
ollama run llama3
-
Launch the Application Stack In two separate terminals at the project root:
# Terminal 1: Start the backend services docker compose up --build # Terminal 2: Start the frontend development server cd frontend pnpm install pnpm dev
- Web Application: Access the frontend at
http://localhost:3000. - API Gateway: The Go API is available at
http://localhost:8080.
- E-Ink Inspired UI/UX
- Google OAuth Integration
- Customizable Summaries (Word Count & Page Limit)
- PDF Export
- Enhanced UX with Animations: Implement subtle transitions and micro-interactions using Framer Motion.
- Deployment Configuration: Prepare the application for live deployment on services like Vercel and Render.
This project is licensed under the MIT License.
