{"id":20469804,"url":"https://github.com/rooyca/pdf-vision-be","last_synced_at":"2026-05-04T01:33:42.561Z","repository":{"id":47475954,"uuid":"516153755","full_name":"Rooyca/PDF-Vision-BE","owner":"Rooyca","description":"PDF Vision Backend (FastAPI)","archived":false,"fork":false,"pushed_at":"2023-07-15T22:08:43.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T00:45:20.549Z","etag":null,"topics":["celery","fastapi","mongodb","pdf","pdf-viewer","redis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rooyca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-20T22:38:23.000Z","updated_at":"2023-08-23T07:31:23.000Z","dependencies_parsed_at":"2025-06-27T00:48:53.855Z","dependency_job_id":null,"html_url":"https://github.com/Rooyca/PDF-Vision-BE","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Rooyca/PDF-Vision-BE","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rooyca%2FPDF-Vision-BE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rooyca%2FPDF-Vision-BE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rooyca%2FPDF-Vision-BE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rooyca%2FPDF-Vision-BE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rooyca","download_url":"https://codeload.github.com/Rooyca/PDF-Vision-BE/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rooyca%2FPDF-Vision-BE/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32591601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["celery","fastapi","mongodb","pdf","pdf-viewer","redis"],"created_at":"2024-11-15T14:10:29.443Z","updated_at":"2026-05-04T01:33:42.556Z","avatar_url":"https://github.com/Rooyca.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PDF2Slide - Convert PDF to Slides (Backend)\r\n\r\nThis is the backend of PDF2Slide. It is built using Python and FastApi. It uses Celery to run tasks asynchronously, Redis as a message broker and MongoDB as a database.\r\n\r\n- Check out the Frond-end [here](https://github.com/Rooyca/PDF-Vision)\r\n\r\n## Table of Contents\r\n\r\n- [Installation](#installation)\r\n- [Usage](#usage)\r\n- [Contributing](#contributing)\r\n- [Contact](#contact)\r\n\r\n## Installation\r\n\r\nWe currently support 3 ways to install and run the backend. The first one is using Docker, the second one is using Docker-compose and the third one is manually installing the dependencies and running the backend.\r\n\r\n### Docker-compose (recommended)\r\n\r\nTo run the backend using Docker-compose you should edit the file `docker-compose.yml` and change the following variables:\r\n\r\n```bash\r\n- SMTP_SERVER=smtp-relay.sendinblue.com\r\n- SMTP_USER=user@mail.com\r\n- SMTP_PASS=password\r\n- SMTP_PORT=587\r\n- SENDER=sender@mail.com\r\n- S3_ENDPOINT=https://11111.r2.cloudflarestorage.com\r\n- KEY_ID=id\r\n- KEY_SECRET=secret\r\n- URL_STORAGE=https://example.com/\r\n```\r\n\r\nFor `S3_ENDPOINT` you can use the cloudflare storage or any other storage that supports S3.\r\n\r\nAfter that you can run the following command to run the entire stack:\r\n\r\n```bash\r\ndocker-compose up -d\r\n```\r\n\r\n### Docker\r\n\r\nTo run the backend using Docker you need to have Docker installed on your machine. You can find instructions on how to install Docker [here](https://docs.docker.com/get-docker/).\r\n\r\nOnce you have Docker installed you can run the following command to build the backend image:\r\n\r\n```bash\r\ndocker run -e MONGO='mongodb://localhost:27017/' \\\r\n       -e CELERY_BROKER_URL='redis://localhost:6379/0' \\\r\n       -e CELERY_RESULT_BACKEND='redis://localhost:6379/0' \\\r\n        rooyca/pdf2slide-be:slim\r\n```\r\n\r\nWe need to make sure that MongoDB and Redis are running before running the command above. You can run the following commands to run MongoDB and Redis using Docker:\r\n\r\n```bash\r\ndocker run -d -p 27017:27017 mongo\r\ndocker run -d -p 6379:6379 redis\r\n```\r\n\r\n### Manual\r\n\r\nTo run the backend manually you need to have Python 3.9 installed on your machine. You can find instructions on how to install Python [here](https://www.python.org/downloads/).\r\n\r\nOnce you have Python installed you can run the following command to install the dependencies:\r\n\r\n```bash\r\npip install -r requirements.txt\r\n```\r\n\r\nWe also need to make sure that MongoDB and Redis are running before running the backend. You can run the following commands to run MongoDB and Redis using Docker:\r\n\r\n```bash\r\ndocker run -d -p 27017:27017 mongo\r\ndocker run -d -p 6379:6379 redis\r\n```\r\n\r\nFinally, you can run the backend using the following command:\r\n\r\n```bash\r\nuvicorn main:app --reload\r\ncelery -A main worker --loglevel=info\r\n```\r\n\r\n#### To run Celery on Windows \r\n\r\n```bash\r\npip install eventlet\r\ncelery -A main worker -l info -P eventlet\r\n```\r\n\r\nNow you can access `http://localhost:8000/docs` to see the API documentation.\r\n\r\n### Fly.io\r\n\r\nYou can also run the backend on Fly.io. You can find instructions on how to install Fly.io [here](https://fly.io/docs/getting-started/installing-flyctl/).\r\n\r\nOnce you have Fly.io installed you can run the following command to deploy the backend:\r\n\r\n```bash\r\nflyctl launch\r\n```\r\n\r\nAfter the configuration is done you can add envairoment variables. To do so you can check the `fly.toml.example` file. Then run the following command to deploy the app:\r\n\r\n\r\n```bash\r\nflyctl deploy\r\n```\r\n\r\n## Usage\r\n\r\nYou can allways read the API documentation at `http://localhost:8000/docs`. Shortly, you can use the following endpoints:\r\n\r\n### POST /files\r\n\r\nThis endpoint is used to upload a file. You can upload a file using the following command:\r\n\r\n```bash\r\ncurl -X 'POST' \\\r\n  'https://localhost:8000/files/' \\\r\n  -H 'accept: application/json' \\\r\n  -H 'Content-Type: multipart/form-data' \\\r\n  -F 'file=@INV_2023_00006.pdf;type=application/pdf' \\\r\n  -F 'owner_email=example@example.com' \\\r\n  -F 'slides_name=slideName'\r\n```\r\n\r\n### GET /files/{task_id}\r\n\r\nThis endpoint is used to get the status of a task. You can get the status of a task using the following command:\r\n\r\n```bash\r\ncurl -X 'GET' \\\r\n  'https://localhost:8000/files/{task_id}' \\\r\n  -H 'accept: application/json'\r\n```\r\n\r\n### DELETE /files/{task_id}\r\n\r\nThis endpoint is used to delete a slide. You can delete a slide using the following command:\r\n\r\n```bash\r\ncurl -X 'DELETE' \\\r\n  'https://localhost:8000/files/{task_id}' \\\r\n  -H 'accept: application/json'\r\n```\r\n\r\n\r\n## Contributing\r\n\r\nContributions are always welcome! \u003c3\r\n\r\n\r\n## Contact\r\n\r\nYou can contact me at:\r\n\r\n- [Mas.to](https://mas.to/@rooyca)\r\n- [Telegram](https://t.me/seiseiseis)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frooyca%2Fpdf-vision-be","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frooyca%2Fpdf-vision-be","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frooyca%2Fpdf-vision-be/lists"}