Skip to content
← All work

Surface Evolver

This a Surface Evolver Desktop Application for Mac and Linux

full-stackCompleted

  • C
  • React.js
  • Three.js
  • Bun.js
  • Electrobun
  • bun-ffi

Demo

Write-up

Introduction

This is Surface Evolver - a GUI application designed to wrap the original computational engine into a modern interface, providing an easier way to interact with the program.

Technical Details

Considerations and Implementation

The original code, written in C, was designed to be portable. I initially created this as a web application for my capstone project at my university. The architecture primarily relies on a single C file called se_api.c, where I exposed the engine’s functionality. Subsequently, I designed the backend and frontend around it. It functioned well for local purposes. However, I realized that deploying a web app like this one would necessitate significantly limiting its computational requirements, as it could easily strain the computational resources due to its heavy GPU usage.

Therefore, I ported the app to electrobun for the demonstration and testing of its current capabilities. This process proved to be quite challenging, as I had to fit the web app into a web view. There are many nuances involved in using Bun.js and bun ffi for these purposes. My primary takeaway is that this is not a production-ready product. It requires extensive testing and debugging. Perhaps, even a complete rewrite using more mature technologies and fundamentally altering the architecture to achieve full backward compatibility with the engine would be necessary.

Tech Stack

  • React.js + Three.js
  • Bun.js + bun-ffi
  • Electrobun
  • CMake for compiling the C code

Conclusion

This has been an intriguing project to experiment with. Regrettably, I don’t foresee it being released for production anytime soon. Currently, the app operates on Apple and Linux platforms. For Apple users, please note that you’ll need to navigate to the settings and enable the app’s launch through the Safety and Privacy section.

Additionally, I must mention that this project has been an experiment in utilizing AI (Claude) for development. While most of the code was generated by an AI agent, it was thoroughly reviewed and approved by me. I must admit that this feels like a vibe-coded app in a sense. However, I’m still learning how to effectively integrate AI into my development workflow to ensure proper integration without compromising the quality of the generated code.