QP Repository is a web application for managing question papers. Users can upload and download question papers easily.
- Upload question papers
- Download question papers
- Responsive design
- Smooth animations
- Express.js: Framework for building RESTful APIs.
- MongoDB: Metadata storage for uploaded question papers.
- AWS S3: Storage for PDF files.
- Multer: Middleware for parsing multipart form data.
- AWS SDK: Library for interacting with AWS services.
- React.js: Library for building user interfaces.
- Tailwind CSS: Utility-first CSS framework.
controllers/
uploadController.js
: Handles file upload logic.searchController.js
: Handles search and metadata retrieval.
models/
QuestionPaper.js
: MongoDB schema for metadata.
routes/
uploadRoutes.js
: Routes for upload operations.searchRoutes.js
: Routes for search operations.
middleware/
validateFile.js
: Middleware for validating file uploads.errorHandler.js
: Global error handler.
utils/
s3.js
: AWS S3 integration utilities.app.js
: Main application file.
config/
db.js
: MongoDB connection setup.
public/
index.html
: Main HTML file.manifest.json
: Web app manifest.robots.txt
: Robots exclusion protocol.
src/
App.css
: Main CSS file.App.js
: Main React component.App.test.js
: Test file for the main React component.components/
: Directory for React components.
- Node.js
- npm or yarn
- MongoDB
- AWS S3 bucket
-
Clone the repository:
git clone https://github.com/ChinnaDevelopers/ QP-Repository.git
cd QP-Repository/question-paper-backend
-
Install dependencies:
npm install
-
Create a
.env
file in thequestion-paper-backend
directory and add the following environment variables:MONGODB_URI=your_mongodb_uri AWS_ACCESS_KEY_ID=your_aws_access_key_id AWS_SECRET_ACCESS_KEY=your_aws_secret_access_key AWS_BUCKET_NAME=your_s3_bucket_name
-
Start the backend server:
npm run dev
-
Navigate to the frontend directory:
cd ../question-paper-frontend
-
Install dependencies:
npm install
-
Create a
.env
file in thequestion-paper-frontend
directory and add any necessary environment variables:REACT_APP_API_URL=your_backend_api_url
-
Start the frontend development server:
npm start
-
Open your browser and navigate to
http://localhost:3000
to view the application.