github.com/ashton314/newton

Math question organizer and test builder

Open this visualization on its own page →

Contributors

2

Lines of Code

1,013

From

2020-04-24

To

2021-01-02

About ashton314/newton

Newton is a web application for managing and organizing mathematics problems written in LaTeX, built with Elixir using the Phoenix Framework and Phoenix LiveView. It allows educators to create, edit, and organize math questions into persistent tests while viewing live rendered previews as they work.

The application stores math problems in a central repository where authenticated users can add, modify, or delete questions. A key feature is the real-time LaTeX rendering system that generates PDF previews on-the-fly as users edit questions in the textarea. Behind the scenes, this involves debounced edit events triggering the LatexRenderer module to compile LaTeX into PDFs asynchronously, with results cached and automatically garbage-collected to manage disk space. Users can assemble questions into reusable test collections that persist in the PostgreSQL database.

Newton was developed as a modernized successor to an earlier system built for BYU's Math Department, leveraging lessons learned since the original project. It currently uses Basic Auth for simple password-based authentication with the Pow framework available for future role-based systems. The application provides utility functions for exporting question and exam data as JSON, managing the image cache, and running database migrations. Deployment is supported through Docker containers, with development setup available for local work.

Share this video