A modern web application for converting PDFs and images into LaTeX—the industry standard for mathematical and technical documents. Built with a Ruby on Rails backend and a React (Vite) frontend, powered by Google's Gemini API.
- PDF & Image Processing: Upload documents or images and extract content directly into LaTeX.
- Mathematical Extraction: Intelligent recognition of complex mathematical expressions and equations.
- Real-time Compilation: Compile LaTeX code into high-quality PDFs instantly using the integrated compilation service.
- Modern UI: A sleek, responsive workspace designed for productivity and ease of use.
- Micro-animations: Enhanced user experience with fluid transitions and interactive elements.
- Ruby on Rails API: Robust and scalable backend architecture.
- Gemini API: Leverages the latest Gemini 2.5 Flash model for high-fidelity content extraction.
- Docker: Fully containerized environment for consistent deployment.
- React (Vite): Fast and modern frontend development.
- TypeScript: Type-safe development for reliable code.
- Framer Motion: Smooth, high-performance animations.
- KaTeX: Blazing fast math rendering in the browser.
- Google Cloud Platform: Deployed on Cloud Run for serverless scaling.
- CI/CD: Automated build and deployment with Google Cloud Build.
.
├── backend/ # Ruby on Rails API server
├── frontend/ # React (Vite) web application
├── cloudbuild.yaml # Cloud Build configuration for GCP
└── docker-compose.yml # Local development configuration
- Node.js: v18 or higher
- Ruby: 3.3.x or higher
- Docker & Docker Compose: For containerized development
- Gemini API Key: Required for content extraction
-
Navigate to the backend directory:
cd backend -
Install dependencies:
bundle install
-
Configure environment: Create a
.envfile and add yourGEMINI_API_KEY. -
Start the Rails server:
rails server
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
You can run the entire stack using Docker:
- Build and start services:
docker-compose up --build
The project is optimized for deployment on Google Cloud Run:
-
Initialize GCP Project:
gcloud config set project [YOUR_PROJECT_ID] -
Deploy via Cloud Build:
gcloud builds submit
GEMINI_API_KEY: Your Google AI Studio API key.RAILS_MASTER_KEY: Master key for encrypted credentials (production).RAILS_ENV: Set toproductionordevelopment.
VITE_BACKEND_URL: URL of the running Rails API (injected during build in CI/CD).
Uploads a file (PDF or Image) and returns the extracted LaTeX content.
- Parameters:
file(Multipart Form) - Response:
{ "latex": "..." }
Compiles a LaTeX string into a PDF document.
- Parameters:
latex(String) - Response: PDF file binary (served as
application/pdf)
This project is licensed under the MIT License.