{"id":25919714,"url":"https://github.com/medhansh-32/paper_pal","last_synced_at":"2026-04-13T03:01:44.054Z","repository":{"id":280292251,"uuid":"941508370","full_name":"Medhansh-32/Paper_Pal","owner":"Medhansh-32","description":"PaperPal is a webapp made using React-TypeScript , Bolt.io(Frontend) and Java, SpringBoot (Backend).This provides students to uplaod study materials and PYQs  and people can fetch them according to their details of Course ,Branch and semester , gets AI response on specific prompt provided and post query where people can collaborarte and solve them.","archived":false,"fork":false,"pushed_at":"2025-03-02T14:23:40.000Z","size":106,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T15:27:41.680Z","etag":null,"topics":["gemini-ai","java","jwt","maven","mongodb","reactjs","spring-boot","typescript"],"latest_commit_sha":null,"homepage":"https://paperpals.onrender.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Medhansh-32.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-02T13:15:31.000Z","updated_at":"2025-03-02T14:25:51.000Z","dependencies_parsed_at":"2025-03-02T15:38:47.941Z","dependency_job_id":null,"html_url":"https://github.com/Medhansh-32/Paper_Pal","commit_stats":null,"previous_names":["medhansh-32/paper_pal"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Medhansh-32%2FPaper_Pal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Medhansh-32%2FPaper_Pal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Medhansh-32%2FPaper_Pal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Medhansh-32%2FPaper_Pal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Medhansh-32","download_url":"https://codeload.github.com/Medhansh-32/Paper_Pal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241686830,"owners_count":20003112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gemini-ai","java","jwt","maven","mongodb","reactjs","spring-boot","typescript"],"created_at":"2025-03-03T15:15:53.081Z","updated_at":"2026-04-13T03:01:44.047Z","avatar_url":"https://github.com/Medhansh-32.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PaperPal Application 🎓📁\n\nWelcome to the **PaperPal** application! This project is designed to manage and interact with study material files, handle user responses, and assist with posting and resolving doubts. The application also integrates an AI assistant for answering general questions. It provides functionalities for uploading, downloading, and managing exam-related files, posting and replying to doubts, and interacting with an AI assistant.\n\n## Table of Contents\n- [Project Overview](#project-overview-)\n- [Features](#features-)\n- [API Endpoints](#api-endpoints-)\n    - [Authentication API](#authentication-api-)\n    - [User API](#user-api-)\n    - [UserResponse API](#userresponse-api-)\n    - [Doubts API](#doubts-api-)\n    - [AI Assistant API](#ai-assistant-api-)\n- [Running the Application](#running-the-application-)\n\n## Project Overview 🏠\n\nThe **PaperPal** application has been refactored from HTML/CSS/JS to **React** with **TypeScript** for improved type safety and component-based architecture. The application provides a web interface for users to upload, manage, and download exam files. It supports managing user responses and linking those responses to exam files. Additionally, users can interact with an AI assistant powered by **Google Gemini** via the home page. The application also allows users to post and resolve doubts related to exams, fostering better learning and communication.\n\nMoreover, when a PDF is uploaded, it is analyzed by AI to ensure it meets the required guidelines. If the document does not comply, it gets rejected automatically, reducing manual effort in the review process.\n\n## Features 🌟\n\n1. **Question Paper and Notes Upload and Download**:\n    - Users can upload exam files and download them by accessing the file details through the application.\n    - When a user uploads a PDF, it is analyzed by Google Gemini AI in parallel using multithreading to ensure the file meets guidelines and is study-related.\n    - If the file is not related to study materials, it is automatically rejected, reducing manual effort.\n\n2. **Ask AI**:\n    - The integrated AI assistant allows users to ask questions, similar to ChatGPT, to get instant responses for better learning and problem-solving.\n\n3. **Doubts Postings**:\n    - Users can post doubts, respond to others' doubts, and manage their doubts effectively. This feature promotes collaboration and clarity among students.\n\n## API Endpoints 🔌\n\n### Authentication API 🔑\n\nThe Authentication API handles user registration, login, and authentication processes.\n\n- **POST /user/redirectHome**: Registers a new user.\n    - **Request Body**: `{ username, email, password }`\n    - **Response**: `{ message, token }`\n\n- **POST /user/login**: Authenticates a user and provides a JWT token.\n    - **Request Body**: `{ email, password }`\n    - **Response**: `{ message, token, userData }`\n\n### User API 🧑‍💻\n\nThe User API handles user-related actions such as password management and profile updates.\n\n- **POST /user/changePassword**: Sends an OTP for user verification.\n    - **Request Body**: `{ email }`\n    - **Response**: `{ message, success }`\n\n- **POST /user/otp**: Verifies the OTP entered by the user.\n    - **Request Body**: `{ email, otp }`\n    - **Response**: `{ message, success }`\n\n- **PUT /user/setNewPassword**: Changes the user's password.\n    - **Request Body**: `{ email, newPassword }`\n    - **Response**: `{ message, success }`\n\n- **GET user/activate**: Verifies the code and redirect to homepage.\n    -**Request Body**: `{ code }`\n    -**Response**: `{ redirect to paperpals.onrender.com}`\n\n### UserResponse API 📚\n\nThe UserResponse API manages uploading and retrieving educational files with course-specific metadata and PDF analysis capabilities.\n\n- **POST /userresponse**: Uploads and analyzes educational files.\n   - **Headers**: `Authorization: {JWT token}`\n   - **Request Body**: `form-data: { course, branch, semester, fileType, file, title, description }`\n   - **Response**: `HTTP 200 OK`\n\n- **GET /userresponse/getlinks**: Retrieves download links for files based on course criteria.\n   - **Headers**: `Authorization: {JWT token}`\n   - **Query Parameters**: `course, branch, semester` (required)\n   - **Response**: `{ List\u003cFileDto\u003e }`\n\n### Doubts API 🤔\n\nThe Doubts API manages posting, replying to, and retrieving doubts.\n\n- **POST /doubts/postDoubts**: Creates a new doubt.\n    - **Headers**: `Authorization: {JWT token}`\n    - **Request Body**: `{ title, description }`\n    - **Response**: `{ message, doubtData }`\n\n- **GET /doubts/allDoubts**: Retrieves all doubts with optional filtering.\n    - **Headers**: `Authorization: {JWT token}`\n    - **Query Parameters**: `user, solved` (optional)\n    - **Response**: `{ doubts }`\n\n- **GET /doubts/{id}**: Retrieves a specific doubt with its replies.\n    - **Headers**: `Authorization: {JWT token}`\n    - **Path Parameter**: `id`\n    - **Response**: `{ doubt, replies }`\n\n- **POST /doubts/addReply**: Adds a reply to a doubt.\n    - **Headers**: `Authorization: {JWT token}`\n    - **Path Parameter**: `id`\n    - **Request Body**: `{ content }`\n    - **Response**: `{ message, reply }`\n\n- **DELETE /doubts/deleteDoubt/{id}**: Deletes a specific doubt.\n    - **Headers**: `Authorization: {JWT token}`\n    - **Path Parameter**: `id`\n    - **Response**: `{ message, success }`\n\n### AI Assistant API 🤖\n\nThe AI Assistant API provides interaction with the integrated AI assistant.\n\n- **POST /api/ai/ask**: Sends a query to the AI assistant and receives a response.\n    - **Headers**: `Authorization: {JWT token}`\n    - **Request Body**: `{ query }`\n    - **Response**: `{ answer }`\n\n## Frontend Components 🖼️\n\nThe PaperPal application's frontend is built using React with TypeScript, featuring the following key components:\n\n### Authentication Components\n\n- **RegisterForm**: Handles user registration with form validation\n- **LoginForm**: Manages user login and authentication\n- **PasswordReset**: Facilitates the password reset flow with OTP verification\n\n### Navigation Components\n\n- **Navbar**: Main navigation with responsive design for both mobile and desktop\n- **Sidebar**: Context-aware sidebar that changes based on the current section\n- **ThemeToggle**: Switches between light and dark themes\n\n### File Management Components\n\n- **FileUpload**: Multi-step form for uploading exam files with metadata\n- **FileList**: Displays filterable list of available files with download options\n- **FileViewer**: Preview component for PDF files\n\n### Doubts Components\n\n- **DoubtsList**: Displays all doubts with filtering and sorting options\n- **DoubtDetail**: Shows a single doubt with all replies and actions\n- **DoubtForm**: Form for creating new doubts\n- **ReplyForm**: Component for adding replies to existing doubts\n\n### AI Assistant Components\n\n- **AIChatInterface**: Real-time chat interface for interacting with the AI assistant\n- **QueryHistory**: Shows previous AI interactions\n\n### Common Components\n\n- **Button**: Reusable button component with various states\n- **Modal**: Reusable modal for confirmations and forms\n- **Dropdown**: Custom dropdown component for selections\n- **Toast**: Notification system for success/error messages\n- **LoadingSpinner**: Visual indicator for loading states\n\n\n## 🚀 Running the Application\n\nTo run the application locally, follow these steps:\n\n---\n\n### 🧾 1. Clone the repository\n\n```bash\ngit clone https://github.com/Medhansh-32/Paper_Pal.git\n```\n\n### 📁 2. Navigate to the project directory\n\n#### 👉 For Frontend\n\n```bash\ncd Frontend\nnpm install\nnpm run dev\n```\n\n#### 👉 For Backend\n\n```bash\ncd Backend\n# Add the required configuration in `application.properties`\nmvn clean install\njava -jar target/PaperPal-0.0.1-SNAPSHOT.jar\n```\n\n### 🐳 3. Alternatively, use Docker Compose (recommended)\n\nIf you have Docker and Docker Compose installed, you can run the entire application using:\n\n```bash\ndocker-compose up --build\n```\nIf Docker v20.10 or greater use this : \n\n\n```bash\ndocker compose up --build\n```\n\nThis will build and start both the **frontend** and **backend** services together.\n\n- Frontend: http://localhost:5173\n- Backend: http://localhost:8080\n\n### 🌐 4. Access the Application\n\n- Frontend is available at: http://localhost:5173\n- Backend is available at: http://localhost:8080\n\n### ⭐ 5. Enjoy Using the Project?\n\nIf you find this project helpful or interesting, don't forget to give it a **⭐ on GitHub**! Your support is greatly appreciated and helps the project grow!\n\n---\n\n## Additional Setup Information\n\n### Prerequisites\n\n- **Node.js** (v14 or higher)\n- **Java** (v11 or higher)\n- **Maven** (v3.6 or higher)\n- **Docker** and **Docker Compose** (for containerized deployment)\n\n### Configuration\n\nMake sure to configure your `application.properties` file in the Backend directory with the necessary database and API configurations before running the application.\n\n### Troubleshooting\n\nIf you encounter any issues:\n\n1. Ensure all prerequisites are installed\n2. Check that ports 5173 and 8080 are available\n3. Verify your `application.properties` configuration\n4. For Docker issues, ensure Docker daemon is running\n\n### Support\n\nFor additional support or questions, please visit the [GitHub repository](https://github.com/Medhansh-32/Paper_Pal) and create an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedhansh-32%2Fpaper_pal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmedhansh-32%2Fpaper_pal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedhansh-32%2Fpaper_pal/lists"}