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.
- 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.
- Home: The landing page where users can log in, register, and upload PDF files.
- PDF Viewer: A page that displays the uploaded PDF files and allows users to view them directly within the application.
- 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
- Node.js
- MongoDB
- Clone the repository:
git clone <git url>
- Navigate into the project directory:
cd frontend // for frontend
cd backend // for backend
- Install backend dependencies:
cd backend
npm install
- Install frontend dependencies:
cd ../frontend
npm install
- Please create a .env file with neccesary variables mentioned in .env example file
- Start the backend server:
cd backend
npm run dev
- Start the frontend server:
cd ../frontend
npm run dev
- Open your browser and visit http://localhost:5173 to view the application.
/
: Home page./view-pdf/:id
: View the selected PDF file's content./signUp
: Sign up for an account./signIn
: Sign in to your account.