Skip to content

Ritin1308/pdf-annotator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“„ PDF Annotator - Full Stack Application

A full-stack application to upload, view, and annotate PDF documents with persistent highlights. Built with React, Node.js, and MongoDB.

๐Ÿš€ Features

๐Ÿ”‘ Authentication โ€“ Secure JWT-based login & registration

๐Ÿ“‚ PDF Upload & Storage โ€“ UUID-based local storage

๐Ÿ‘€ PDF Viewer โ€“ Render PDFs with pagination & zoom (PDF.js)

โœ๏ธ Text Highlighting โ€“ Select & highlight text with color options

๐Ÿ“Œ Highlight Management โ€“ Save, view, and delete highlights

๐Ÿ“š User Dashboard โ€“ Manage uploaded PDFs

๐Ÿ”Ž Search โ€“ Find PDFs and highlights

๐Ÿ“ฑ Responsive Design โ€“ Works on desktop, tablet, and mobile

๐Ÿ—๏ธ Architecture Frontend (React) โ†’ Backend (Node.js + Express) โ†’ Database (MongoDB) PDF.js Viewer โ†’ Auth / File / Highlight APIs โ†’ Users, PDFs, Highlights

โš™๏ธ Tech Stack

Frontend: React 18, React Router, PDF.js, Axios, Context API

Backend: Node.js, Express, JWT, Multer, bcryptjs, Mongoose

Database: MongoDB (local or Atlas)

Other: UUID, Helmet, dotenv

๐Ÿ› ๏ธ Setup Instructions

  1. Backend cd pdf-annotator-backend npm install cp .env.example .env # configure MongoDB + JWT_SECRET npm run dev

Runs on http://localhost:5000

  1. Frontend cd pdf-annotator-frontend npm install cp .env.example .env # set REACT_APP_API_URL=http://localhost:5000/api npm start

Runs on http://localhost:3000

๐Ÿ”— Key API Endpoints

POST /api/auth/register โ†’ Register user

POST /api/auth/login โ†’ Login user

POST /api/pdfs/upload โ†’ Upload PDF

GET /api/pdfs โ†’ Get all PDFs

POST /api/highlights โ†’ Create highlight

GET /api/highlights/:pdfUuid โ†’ Get highlights for a PDF

๐Ÿ“ฆ Project Structure pdf-annotator-backend/ โ”œโ”€โ”€ models/ # User, PDF, Highlight โ”œโ”€โ”€ routes/ # Auth, PDFs, Highlights โ”œโ”€โ”€ middleware/ # Auth, Error handler โ””โ”€โ”€ server.js

pdf-annotator-frontend/ โ”œโ”€โ”€ src/components/ # Auth, Dashboard, PDFViewer, UI โ”œโ”€โ”€ src/contexts/ # Auth, PDF, Toast contexts โ””โ”€โ”€ src/App.js

๐Ÿ”ฎ Future Enhancements

Drawing tools (freehand, arrows, shapes)

Notes and tagging for highlights

Cloud storage (Google Drive, Dropbox)

Real-time collaboration & sharing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published