Ejscraft
AI-Powered PDF Generator

The Problem
Generating dynamic, well-formatted PDF documents like invoices and reports is often cumbersome. Existing solutions either require complex backend setups or lack the flexibility to customize templates easily. Additionally, developers spend too much time designing templates from scratch.
The Solution
Ejscraft provides an intuitive interface to create and render EJS templates into PDFs instantly. It integrates Google's Gemini API to allow users to generate template code using natural language prompts, dramatically speeding up the template creation process. A live preview feature ensures users see exactly what the PDF will look like before generating it.
Architecture
The application uses React for the frontend interface and Node.js/Express for the backend API. Supabase handles user authentication and data persistence. Document generation is powered by Puppeteer running on the server, which renders the EJS templates into high-quality PDFs. The Gemini API is integrated via a serverless function to provide AI assistance.
Implementation Details
- 1Integrated Google's Gemini API to translate natural language prompts into responsive EJS templates.
- 2Implemented a real-time preview mechanism using a sandboxed iframe to safely render user-generated EJS code.
- 3Built a robust PDF generation service using Puppeteer on a Node.js backend.
- 4Utilized Supabase for robust user authentication and secure storage of user templates.
- 5Designed a clean, developer-focused UI using TailwindCSS for maximum productivity.