Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
/ RenderLaTeX Public archive

A reliable and responsive serverless LaTeX/MathJax render bot for Twitter.

Notifications You must be signed in to change notification settings

winstxnhdw/RenderLaTeX

Repository files navigation

@RenderLaTeX

RenderLaTeX has been archived indefinitely due to changes in Twitter's API pricing model. See the announcement here.

main.yml update-webhook.yml dependabot.yml

@RenderLaTeX is a reliable and responsive serverless in-memory LaTeX/MathJax render bot for improving accessibility in Twitter's mathematics community. Check it out in action here!

Setup

Install the dependencies.

yarn

Generate the bot's OAuth 2.0 token.

yarn oauth

Project Objectives

Traditionally, bots such as @saucenaopls and @aceCourtBot2 must be spun up indefinitely to poll the Twitter servers for updates. These bots are expensive to maintain, while being slow and frustrating for their users due to Twitter rate limits. Instead, @RenderLaTeX relies on webhooks to receive tweets, enabling near instant response at no cost under acceptable loads. Specifically, @RenderLaTeX's architecture was designed to meet the following objectives.

Available always

Ensuring the continuous availability of the bot without requiring frequent upkeep is paramount. For this reason, the bot is hosted on a cloud provider such as AWS, minimising potential points of failure, as it relies solely on the server it is hosted on and Twitter.

Free forever

It is imperative that the project remain cost-free to maintain indefinitely. To achieve this goal, the bot leverages webhooks to receive events, eschewing the costly option of spinning up a VPS, even during low traffic periods.

Really responsive

By harnessing the increased performance of AWS Lambda Function URLs, the bot can deliver near-instant responses to incoming tweets. Furthermore, the bot's MathJax engine empowers it to independently render LaTeX, circumventing the need for external API requests.

Credits

Many thanks to Alyssa for the amazing Twitter banner and profile picture!