How jeremiahpetersen/repototext works
Project type and purpose
• RepoToText is a full-stack web application whose goal is to fetch the contents of a GitHub repository (and optional external documentation), concatenate all files into a single structured .txt file, and present that text in the browser while saving it to disk.
File structure
• Top-level:
• Dockerfiles (Dockerfile.frontend, Dockerfile.backend) and docker-compose.yml for containerization of front- and back-ends.
• package.json / public / src → React.js SPA.
• requirements.txt, Python scripts (RepoToText.py, FolderToText.py), plus .env for GITHUB_API_KEY → Python Flask API.
• /.github/workflows → CI linting for Python and JavaScript.
• /data (implied) → output folder for generated .txt files.
• Pattern: Single front-end SPA talks to a single back-end service over HTTP. The back end uses PyGithub, BeautifulSoup, etc., to scrape repos.
README for additional insights
• Tech stack: React.js (frontend), Flask (backend), Docker, GitHub API (PyGithub), plus retry, flask_cors, requests, beautifulsoup4.
• Runtime flow: user enters URLs → front end calls Flask endpoint → back end fetches repo & docs → back end returns text payload → UI displays & writes to /data.
Detailed call-outs
• Environment variables (.env → GITHUB_API_KEY).
• Docker Compose orchestrating the two containers.
• Retry logic or error handling between Flask and GitHub API.