Skip to content

karanbagle/PDFtoWord

Repository files navigation

PDF to Word Converter

React Node.js Netlify Render Flask

Overview

This PDF to Word Converter project allows users to upload a PDF file and convert it into a Word document (.docx). The application consists of a frontend built with React and a backend built using Flask. It is deployed on Render and Netlify to provide a seamless online document conversion experience, which can further be leveraged as Software as a Service (SaaS).

Live Demo

Features

  • PDF to Word Conversion: Upload a PDF and download a Word (.docx) version.
  • Real-Time Progress Indicator: Loading bar displaying percentage completion.
  • Simple Interface: User-friendly design for ease of use.
  • Responsive Design: Supports both mobile and desktop views.
  • Backend API Integration: Seamless interaction between frontend and backend for conversion.

Project Structure

Files and Components

  • Frontend:

    • App.js: Entry point for the React application that renders the Dashboard component.
    • Dashboard.js: Component handling file input, PDF conversion request, and downloading the Word file.
    • Dashboard.css: Styling for the Dashboard component to ensure a consistent and appealing user interface.
    • index.js: Renders the main App component and initializes the frontend.
  • Backend:

    • server.py: Handles the backend logic using Flask, allowing the conversion from PDF to Word using the pdf2docx library.
    • requirements.txt: Lists all dependencies for the backend (e.g., Flask, pdf2docx).
  • General:

    • package.json: Manages project dependencies and scripts for the frontend.
    • index.html: The main HTML template for the React application.

Tech Stack

Getting Started

Prerequisites

  • Node.js and npm: Install Node.js.
  • Python 3: Install Python.
  • Flask: Install Flask using pip install Flask.
  • pdf2docx: Install the library for PDF to Word conversion with pip install pdf2docx.

Setup

  1. Clone the repository:

    git clone https://github.com/karanbagle/PDFtoWord.git
    cd PDFtoWord
  2. Install frontend dependencies:

    npm install
  3. Run the frontend locally:

    npm start
  4. Backend setup:

    • Navigate to the backend directory and create a virtual environment:
      python3 -m venv env
      source env/bin/activate
    • Install backend dependencies:
      pip install Flask pdf2docx flask-cors
    • Run the Flask server:
      python server.py

Deployment

Frontend (Netlify)

  • Deploy the frontend by connecting the GitHub repository to Netlify.
  • Set the build command to npm run build and publish directory to build.

Backend (Render)

  • Deploy the backend by connecting the GitHub repository to Render.
  • Set up a Python environment, configure the server.py file to run as the entry point, and open port 5000.

How to Use as SaaS

This application can be used as a SaaS by providing the following features:

  1. Authentication and User Accounts: Add a login and registration system to manage user sessions.
  2. Subscription Plans: Integrate a payment gateway to allow users to subscribe for different usage plans (e.g., number of conversions per month).
  3. API Access: Provide API access to users who want to use the document conversion service programmatically in their own applications.
  4. Custom Domains: Allow users to use the service on custom domains for businesses or private use.

Stack Icons

  • React
  • Node.js
  • Netlify
  • Render
  • Flask

License

This project is open source and available under the MIT License.

Contact

For questions or collaboration, reach out at [email protected].

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published