Skip to content

suhail34/PDF-Compressor

Repository files navigation

PDF Compressor

project-image

The PDF Compressor project is a system for compressing PDF files and managing them using a combination of MongoDB Kafka and a Golang-based web service. This README provides an overview of the project its components and how to set it up.

💻 Components

1. Web Service (Golang)

  • Description: Handles file uploads, compression, and file downloads.
  • Dependencies: Gin (HTTP framework), MongoDB Go driver, Confluent Kafka Go library.

2. Kafka (Message Broker)

  • Description: Manages asynchronous communication between the web service and the consumer service.
  • Dependencies: Confluent Kafka.

3. MongoDB (Database)

  • Description: Stores compressed PDF files and associated metadata.
  • Dependencies: MongoDB, GridFS.

4. Consumer Service (Python)

  • Description: Consumes messages from Kafka, indicating successful compression.
  • Dependencies: Confluent Kafka.

5. Database Cleaner Service (Python)

  • Description: Scheduled job for deleting old files from MongoDB GridFS.
  • Dependencies: MongoDB, GridFS

🧐 Features

Here're some of the project's best features:

  • Upload PDF files for compression.
  • Compress PDF files using PyMuPDF
  • Store compressed PDF files in MongoDB using GridFS.
  • Asynchronous processing of compression tasks with Kafka.
  • Download compressed PDF files.

🛠️ Installation Steps:

1. Fork The Repository

2. Clone the repository:

git clone https://github.com/your-username/pdf-compressor.git

3. Navigate to the project directory:

cd pdf-compressor

4. Add the helm bitnami repo:

helm repo add bitnami https://charts.bitnami.com/bitnami

5. Install the Confluentic Kafka service using below command:

helm upgrade --install kafka-release bitnami/kafka --set persistence.size=8GilogPersistence.size=8GivolumePermissions.enabled=truepersistence.enabled=truelogPersistence.enabled=trueserviceAccount.create=truerbac.create=true --version 23.0.7 -f Helm_charts/Kafka/values.yaml

6. Install MongoDB service using command:

helm install mongo Helm_charts/MongoDB -f Helm_chart/MongoDB/values.yaml

7. Run frontend service using command

kubectl apply -f frontend-service/manifests/

8. Run producer service using command

kubectl apply -f producer-service/manifests/

9. Run compressor service using command

kubectl apply -f compressor-service/manifests/

10. Run DB Cleaner Service using command

kubectl apply -f DBClean-service/manifests/

💻 Built with

Technologies used in the project:

  • Golang
  • Kafka
  • Helm Charts
  • MongoDB
  • Python
  • Html
  • Bootstrap
  • Javascript

🛡️ License:

This project is licensed under the MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published