A full-stack web application for uploading, processing, and summarizing documents of various formats. The app provides a chat-like interface for interacting with document content, supports Retrieval-Augmented Generation (RAG) for enhanced document understanding, and features incremental streaming of responses and file management.
root/
│ package.json # Root-level scripts and dependencies
│ README.md # Project documentation
│ summarizer.db # SQLite database
│
├── client/ # Frontend (React + Vite + Tailwind CSS)
│ ├── src/ # React source code
│ │ ├── components/ # UI components (chat, file list, drag & drop, etc.)
│ │ ├── hooks/ # Custom React hooks
│ │ ├── types/ # TypeScript types
│ │ └── assets/ # Static assets
│ ├── public/ # Static files
│ ├── package.json # Frontend dependencies and scripts
│ └── ... # Config files (Vite, Tailwind, etc.)
│
├── server/ # Backend (Node.js + Express + TypeScript)
│ ├── src/ # Server source code
│ │ ├── controllers/ # Express route controllers
│ │ ├── middlewares/ # Express middlewares
│ │ ├── models/ # Data models
│ │ ├── services/ # Business logic (file/message processing)
│ │ ├── types/ # TypeScript types
│ │ └── utilities/ # Utility functions (DB, logger, etc.)
│ ├── package.json # Backend dependencies and scripts
│ └── ... # Config files
│
├── exampleFiles/ # Example documents for testing
│
- Node.js (v18+ recommended)
- npm (v9+ recommended)
git clone <repo-url>
cd simple-document-summarizercd server
npm installcd ../client
npm install- Copy
.env.exampleto.envin theserver/directory and adjust as needed (e.g., file size limits, database path, etc.).
npm run dev- Run this command from the root directory to start both the server and client concurrently.
npm run server:dev # Start only the backend server
npm run client:dev # Start only the frontend clientcd server && npm run dev # Start backend only
cd ../client && npm run dev # Start frontend only- The client will typically be available at
http://localhost:5173(or as shown in the terminal). - The server will run on the port specified in your
.env(default: 3001).
- The
exampleFiles/directory contains sample documents (PDF, DOCX, CSV, TXT, etc.) for testing uploads and summarization.
npm run dev— Start both the server and client concurrently (recommended for development)npm run build— Build both the client and server for productionnpm run format— Format all code with Prettiernpm run typecheck— Type-check both client and server
npm run dev— Start the server in development mode with auto-reload (nodemon)npm run build— Type-check and compile TypeScript to JavaScript
npm run dev— Start the Vite development servernpm run build— Type-check and build the React app for production
- Upload and process multiple document types (TXT, PDF, DOCX, CSV, Markdown, JSON, etc.)
- Chat interface for summarizing and querying document content
- Real-time streaming of responses (SSE)
- File management and conversation clearing
- Example files for easy testing
MIT