An open API service indexing awesome lists of open source software.

https://github.com/tejastn10/papyrus

๐Ÿ” Papyrus โ€“ Securely add or remove passwords from PDF files in your browser. Built with React + Vite & FastAPI for speed, privacy, and simplicity.
https://github.com/tejastn10/papyrus

fastapi pdf python react typescript vite

Last synced: 3 months ago
JSON representation

๐Ÿ” Papyrus โ€“ Securely add or remove passwords from PDF files in your browser. Built with React + Vite & FastAPI for speed, privacy, and simplicity.

Awesome Lists containing this project

README

          


Papyrus Logo

# Papyrus ๐Ÿ“„

![Python](https://img.shields.io/badge/Python-3.11+-3776AB?logo=python&logoColor=white)
![FastAPI](https://img.shields.io/badge/FastAPI-0.116+-009688?logo=fastapi&logoColor=white)
![Vite](https://img.shields.io/badge/Vite-7+-646CFF?logo=vite&logoColor=white)
![React](https://img.shields.io/badge/React-19+-61DAFB?logo=react&logoColor=white)
![License](https://img.shields.io/badge/License-MIT-yellow?logo=open-source-initiative&logoColor=white)

**Papyrus** is a lightweight and secure PDF management tool that helps you seamlessly **add or remove passwords** from PDF files. Built with a blazing-fast frontend using **React + Vite** and a high-performance **FastAPI** backend, Papyrus ensures privacy and ease of use โ€” right from your browser.

---

## โœจ Features

- ๐Ÿ” **Add Password**: Secure your PDF files with a password in just one click.
- ๐Ÿ”“ **Remove Password**: Strip password protection from encrypted PDF files.
- โšก **Fast & Lightweight**: Optimized for speed with Vite + React and FastAPI.
- ๐Ÿ›ก๏ธ **No File Storage**: All files are processed in memory โ€” nothing is stored on disk.
- ๐ŸŽฏ **User-Friendly UI**: Simple drag-and-drop interface for quick interaction.

---

## ๐Ÿš€ Getting Started

### ๐Ÿ“ฆ Prerequisites

Ensure you have the following installed:

- **Node.js**: v22 or later
- **Python**: v3.11 or later
- **Poetry**: for managing Python dependencies
- **Docker** (optional, for containerized setup)

---

### ๐Ÿงช Local Development

#### Backend (FastAPI)

```bash
# Navigate to backend folder
cd backend

# Install dependencies
poetry install

# Start FastAPI server
poetry run uvicorn app.main:app --reload --port 5000
````

Server will be available at: [http://localhost:5000/docs](http://localhost:5000/docs)

#### Frontend (Vite + React)

```bash
# Navigate to frontend folder
cd frontend

# Install dependencies
npm install

# Start development server
npm run dev
```

Frontend runs at: [http://localhost:3000](http://localhost:3000)

---

### ๐Ÿณ Using Docker (Optional)

```bash
docker-compose up --build
```

This starts both the FastAPI backend and React frontend.

---

## ๐Ÿ“‚ Project Structure

```bash
papyrus/
โ”œโ”€โ”€ backend/ # FastAPI backend
โ”‚ โ”œโ”€โ”€ app/
โ”‚ โ”‚ โ”œโ”€โ”€ api/ # API routes
โ”‚ โ”‚ โ”œโ”€โ”€ utils/ # Common utility functions
โ”‚ โ”‚ โ”œโ”€โ”€ models/ # Models
โ”‚ โ”‚ โ”œโ”€โ”€ config/ # Settings, config
โ”‚ โ”‚ โ”œโ”€โ”€ services/ # PDF encryption/decryption logic
โ”‚ โ”‚ โ”œโ”€โ”€ middleware/ # Middleware
โ”‚ โ”‚ โ””โ”€โ”€ main.py # App entry point
โ”‚ โ”œโ”€โ”€ tests/ # Backend unit tests
โ”‚ โ”œโ”€โ”€ pyproject.toml # Poetry config
โ”‚ โ””โ”€โ”€ Dockerfile # Backend Docker setup
โ”‚
โ”œโ”€โ”€ frontend/ # React + Vite frontend
โ”‚ โ”œโ”€โ”€ src/ # Main app code
โ”‚ โ”œโ”€โ”€ public/ # Static assets
โ”‚ โ”œโ”€โ”€ vite.config.ts # Vite configuration
โ”‚ โ””โ”€โ”€ Dockerfile # Frontend Docker setup
โ”‚
โ”œโ”€โ”€ compose.yml # Multi-service Docker config
โ””โ”€โ”€ README.md # You're here!
```

---

## ๐Ÿ“˜ API Documentation

Swagger docs are auto-generated and available at:

```bash
http://localhost:5000/docs
```

---

## โš–๏ธ License

This project is licensed under the [MIT License](./LICENSE.md).

---

## ๐Ÿ™Œ Acknowledgments

- Powered by [FastAPI](https://fastapi.tiangolo.com) and [React](https://react.dev)
- PDF operations handled by [PyPDF2](https://pypdf2.readthedocs.io/)
- UI inspired by minimal productivity apps like CleanShot and Arc Browser.

---

Built with ๐Ÿ’™ by Tejas.