IIIT Everything is a web application that allows users to upload and manage various resources related to the curriculum of your institute. It provides a solution for the limited storage capacity of Google Drive by allowing users to store files locally and manage them using a MongoDB database.
The IIIT Everything API is a FastAPI-based backend that provides the necessary endpoints to upload, download, delete, and search files. It also handles user authentication for editors and administrators.
The API documentation can be accessed using the following link: [IIIT Everything API Documentation]
The Swagger UI provides an interactive interface for exploring and testing the API endpoints. You can access the Swagger UI using the following link: [IIIT Everything Swagger UI]
The IIIT Everything web app is a front-end application built with React that provides an intuitive and user-friendly interface for interacting with the IIIT Everything API. It allows users to upload files, search for resources based on subject and document type, and manage their uploaded files.
- Upload and save PDF and other document files.
- Store file details such as filename, content type, size, uploader, and upload date in MongoDB.
- Retrieve files by searching through the MongoDB database.
- Download files from the local directory.
- Delete files and remove their entries from the database.
- Authenticate editors and administrators.
- Intuitive user interface for seamless interaction.
- Python: The backend of the application is written in Python.
- FastAPI: A modern, fast (high-performance), web framework for building APIs with Python.
- MongoDB: A NoSQL document database used for storing file details.
- PyMongo: A Python library for working with MongoDB.
- FastAPI middleware for CORS: Allows cross-origin resource sharing for web applications.
- Uvicorn: A lightning-fast ASGI server.
- React: A JavaScript library for building user interfaces.
- HTML, CSS, JavaScript: The frontend of the IIIT Everything web app is built using these web technologies.
Before running the application, ensure you have the following installed:
- Node.js (version 14 or later)
- Python (version 3.8 or later)
- MongoDB
- Required Python packages:
fastapi
,pymongo
,uvicorn
- Required Node.js packages:
axios
,react
,react-dom
,react-scripts
-
Clone the repository:
git clone https://github.com/your-username/iiit-everything.git
-
Change to the project directory:
cd iiit-everything
-
Install the required Python packages:
pip install -r requirements.txt
-
Start the backend server:
uvicorn main:app --reload
The backend server will be running at
http://localhost:8000
. -
Install the required Node.js packages:
cd iiiteverythingwebsite npm install
-
Start the frontend development server:
npm start
The frontend development server will be running at
http://localhost:3000
. -
Open your web browser and access the IIIT Everything web app at
http://localhost:3000
.
POST /upload
: Uploads a file to the server.GET /download/{file_id}
: Downloads a file by its ID.GET /delete/{file_id}
: Deletes a file by its ID.GET /find
: Searches for files based on subject and document type.POST /addeditor
: Authenticates and adds an editor.POST /addadmin
: Authenticates and adds an admin.GET /checkeditor
: Checks if an editor is valid.GET /checkadmin
: Checks if an admin is valid.GET /getsubjects
: Retrieves the names of subjects.
For detailed documentation and to interact with the API, please refer to the IIIT Everything API Documentation and explore the Swagger UI.
You can modify the following configurations in the main.py
file:
- MongoDB connection: Update the connection string (
mongodb://localhost:27017
) if your MongoDB server is running on a different host or port. - Database and collection names: Update the values of
db_name
,collection_name
,editors_name
, andadmin_name
variables to match your MongoDB setup.
Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request. Make sure to follow the existing code style and guidelines.
- Fork the repository.
- Create a new branch:
git checkout -b my-feature
. - Make your changes and commit them:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin my-feature
. - Open a pull request.
Please make sure to update tests as appropriate and provide a detailed description of your changes.
This project is licensed under the MIT License.