Building a Dynamic Conference Ticket Generator with FastAPI, Pillow, and Pulumi
The article describes the creation of TicketCraft, a dynamic ticket generation system developed by Onayade Mogboluwaga Tolulope to simplify personalized conference ticket creation. While working for AIESEC Nigeria, the author faced challenges using traditional MJML templates. To improve efficiency, they treated tickets as images, using Python’s Pillow library for image manipulation and FastAPI to serve the generated images. A key innovation was an adaptive text sizing algorithm that adjusted font sizes automatically based on attendee name length. For deployment, the author initially struggled with AWS and Terraform but later discovered Pulumi, which allowed infrastructure to be coded in Python. Using Pulumi, they set up API Gateway, Lambda functions, IAM roles, and Docker containerization via ECR, overcoming issues like Docker build context misconfiguration. Overall, the project significantly enhanced the author’s skills in both backend development and cloud deployment practices.
