The File Processor Project is a web application that accepts a text file, compresses its contents using the Huffman coding algorithm, and encrypts the compressed data using AES encryption. This project demonstrates the integration of a Spring Boot backend with a React frontend to handle file uploads and processing.
- Spring Boot: For creating the backend REST API.
- React: For building the user interface.
- Huffman Coding: For compressing the text data.
- AES Encryption: For encrypting the compressed data.
/src
/main
/java
/com/example/fileprocessor
FileProcessorApplication.java
/controller
FileController.java
/service
FileService.java
CompressionService.java
EncryptionService.java
/util
HuffmanCoding.java
AESUtil.java
/resources
application.properties
- Java 17 or above
- Maven (for building the Spring Boot application)
- Node.js and npm (for the React frontend)
-
Clone the Repository:
git clone https://github.com/Maniac198/ZipCrypt.git cd https://github.com/Maniac198/ZipCrypt.git -
Navigate to the Backend Directory:
cd backend -
Build and Run the Spring Boot Application:
./mvnw spring-boot:run
The application will start on
http://localhost:8080.
-
Navigate to the Frontend Directory:
cd frontend -
Install Dependencies:
npm install
-
Run the React Application:
npm start
The application will be available at
http://localhost:5173.
- URL:
http://localhost:8080/api/compress-encrypt - Method:
POST - Request Type:
multipart/form-data - Form Data:
file: The text file to be processed.
{
"original": "Hello, this is a test file!",
"compressed": "110101010...",
"encrypted": "U2FsdGVkX19KSmFsaM..."
}- Open Postman and create a new
POSTrequest. - Use the URL:
http://localhost:8080/api/compress-encrypt. - In the Body tab, select
form-data. - Set the key to
fileand choose your text file. - Click Send and check the response.
This project demonstrates the use of modern web technologies to perform file processing tasks. The integration of Spring Boot and React provides a solid foundation for building web applications.
This project is licensed under the MIT License.