rrrehab is now Landshape Tech

I decided to give the rrrehab landform rehabilitation shaping tool a revamp. With the ubiquity of competent LLM coding agents, and advances in web technologies, the old webapp running custom WebGL could be entirely replaced with a modern stack. This post dives into the overhaul. Go check out the new app at https://landshape.tech

For those unfamiliar with the app, it is a tool to automatically generate a landform surface from a topography, given a target constraint grade (slope) of the landform. It will generate a valid surface that balances the cut and fill volumes, accounting for swell and respecting the constraints. It ensures the surface is the minimal movement required to balance. And it does this fast. The tool is generally useful, all mining operations need to track and assess their rehabilitation liability, for which this tool can provide an answer in minutes. It can also be used to assess various options for dump planning and Life-Of-Mine designs. Outputs can also be fed straight into dozer guidance machines for use in operations. With the revamp I wanted to lay the foundations to improve the visual outputs of the shaped results, aiming to provide even more value than a bare surface; the user should be able to analyse and visualise how the shaped landform would look rehabilitated.

The first revamp was the webapp itself. The old app was all bespoke HTML with a WebGL viewer. It was functional, but spartan and caused friction when doing repeated shaping jobs. The new webapp adopts a Bevy 3D engine for the rendering with a Vue framework for the UI. Bevy is still pre 1.0, however it is very functional and stable, especially for 'standard' rendering workflows. All the usual problems to solve occurred, like setting a local transform to deal with mine space coordinates, rotations in coordinate space from Z-up left-handed to Y-up right-handed, etc. These problems are not unique and I have solved them many a time before. Adopting Bevy also sets up the app for some neat rendering features in the future, which I am excited to experiment with (reach out if you want something!).

Moving to a known framework rather than custom HTML was mostly to leverage a build system and a LLM to do the refactoring work. It is liberating being able to specify the design you want for the website and let the LLM do the tedious grunt work of nesting elements and doing styling. I would say that this update would not have been possible (or at least it would not have had the same level of polish) if I was still having to hand write the UI.

The real technical detail was in designing data structures, local storage in the browser, DB schemas, wire formats, API endpoints, etc. The landform shaping algorithm remains the same, with some improvements to job running (like getting job progress), so there were not any fun technical challenges. But an app has to look good as well as function! I do have some ideas for improving the core algorithm, potentially eking out more performance, although I think there is more value in improvements to the visual outputs.

Finally, I wrote more thorough documentation with a dedicated docs page. This makes the app much more approachable. I would recommend registering to get an access token and try out shaping various surfaces! And get in touch if you need more, at support@landshape.tech

Here is a video of the new app in action, happy shaping!

Next
Next

Use Rust in shell scripts