Disc Indexer is a Java application designed to organize and manage disk files efficiently. It identifies duplicate files using hashing algorithms and provides tools to archive or delete them, helping to save storage space. The application also features a built-in file indexing system that stores metadata in a database, enabling quick access without the need for repeated calculations.
Disc Indexer allows users to search for content within files by keywords. Simply provide a word, and the application will show which files contain it.
- Duplicate File Detection: Identifies and removes duplicate files using hashing algorithms.
- File Indexing: Stores file metadata in a MongoDB database for fast retrieval.
- Content Search: Enables keyword-based search within files.
- Space Optimization: Tools to archive or delete unnecessary files to save space.
- Docker: Required to run MongoDB in a container.
- Java 21: Ensure your system has OpenJDK 21 installed and properly configured.
- Node.js & Vite: For running the React frontend.
-
Pull the MongoDB Docker Image:
docker pull mongo
-
Run the MongoDB Container:
docker run --name my-mongo-container -d -p 27017:27017 mongo
-
Create the Database and Collection: Use MongoDB Compass or a client tool to create:
- Database Name:
spring-test - Collection Name:
files
- Database Name:
-
Navigate to the Backend Directory:
cd backend -
Build the Application: Use Gradle to compile the project if not already built:
./gradlew build
-
Run the Application: Use the
javacommand to start the application:java -jar build/libs/disc-indexer-0.0.1-SNAPSHOT.jar
-
Open your browser and navigate to the default backend API URL:
http://localhost:8080 -
To access the Swagger API documentation, visit:
http://localhost:8080/docs
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the Vite development server:
npm run dev
-
Open your browser and visit the URL displayed in the terminal (e.g.,
http://localhost:5173).
- Launch both the backend and frontend servers.
- Access the frontend through your browser.
- Use the search feature to find files containing specific keywords.
- Identify duplicate files and choose to archive or delete them.
- Ensure Docker is running and the MongoDB container is active on port
27017. - Verify the database
spring-testand collectionfilesexist in MongoDB. - Ensure all required dependencies are installed for both the backend and frontend.
This project is licensed under the MIT License.
Happy indexing and organizing!