Skip to content

IT21168222/PDF_Viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

MERN Stack PDF Upload and Viewer Application

Overview

This repository contains a MERN stack application designed to allow users to upload and view PDF files. The application includes basic logging functionality and consists of two primary pages: the Home page and the PDF Viewer page. The interface is designed to be user-friendly and follows modern UI design trends. Additionally, the application implements user authentication and incorporates data tracing and security methods to ensure data protection.

Features

  • User Authentication: Secure user authentication on both the frontend and backend to ensure that only authorized users can upload and view PDFs.
  • PDF Upload API: An API endpoint for users to upload PDF files, which are then stored securely on the server.
  • PDF Viewer: A dedicated page for viewing uploaded PDFs directly within the application.
  • Logging: Backend logging of all API requests for monitoring and debugging purposes.
  • Data Security: Implementation of data tracing and security methods to protect user data and uploaded files.

Pages

  1. Home: The landing page where users can log in, register, and upload PDF files.
  2. PDF Viewer: A page that displays the uploaded PDF files and allows users to view them directly within the application.

Technologies Used

  • Frontend: React.js with modern UI design trends
  • Backend: Node.js with Express.js
  • Database: MongoDB for storing user data and file metadata
  • Authentication: JWT-based authentication
  • File Storage: Multer for storing PDF files
  • PDF Viewing: React-pdf-viewer for rendering PDFs in the browser

Getting Started

Prerequisites

  • Node.js
  • MongoDB

Installation

  1. Clone the repository:
git clone <git url>
  1. Navigate into the project directory:
cd frontend // for frontend
cd backend  // for backend
  1. Install backend dependencies:
cd backend
npm install
  1. Install frontend dependencies:
cd ../frontend
npm install

Set Up environment Variables

  • Please create a .env file with neccesary variables mentioned in .env example file

Running the Application

  1. Start the backend server:
cd backend
npm run dev
  1. Start the frontend server:
cd ../frontend
npm run dev

Usage

Routes

  • /: Home page.
  • /view-pdf/:id: View the selected PDF file's content.
  • /signUp: Sign up for an account.
  • /signIn: Sign in to your account.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published