Skip to content

Feature/api server#1

Open
ArmanShirzad wants to merge 4 commits intokhalildim:mainfrom
ArmanShirzad:feature/api-server
Open

Feature/api server#1
ArmanShirzad wants to merge 4 commits intokhalildim:mainfrom
ArmanShirzad:feature/api-server

Conversation

@ArmanShirzad
Copy link
Copy Markdown

This pull request migrates the project from a desktop GUI application to a modern, containerized FastAPI web API for compiling LaTeX files to PDF. It introduces Docker support, a GitHub Actions workflow for automated image publishing, and a new RESTful endpoint for LaTeX compilation. The codebase is simplified by removing all GUI-related files and logic, focusing solely on API-based PDF generation.

The most important changes are:

API and Backend Refactor:

  • Replaced the entire GUI-based application with a FastAPI server in main.py, exposing a /compile endpoint for LaTeX-to-PDF conversion, supporting both .tex files and supplementary assets. The new implementation uses temporary directories for isolated, secure compilation and returns the generated PDF as a response.
  • Removed all desktop GUI code and dependencies, including customtkinter, converting.py, and env_setup.py, as well as the Mac/Windows packaging script setup.py. [1] [2] [3]

Containerization and Deployment:

  • Added a Dockerfile to build a minimal Python 3.11-based image with TeX Live and all Python dependencies, exposing port 80 for the API.
  • Added a .dockerignore file to exclude unnecessary files from the Docker build context, such as .git, virtual environments, and OS-specific files.

Continuous Integration / Delivery:

  • Introduced a GitHub Actions workflow (.github/workflows/docker-publish.yml) to automatically build and publish the Docker image to GitHub Container Registry (GHCR) on pushes and pull requests to main.

Documentation:

  • Updated README.md to reflect the new API-centric workflow, including Docker usage, API testing instructions, and removal of desktop-application-specific content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant