Back when I first started programming, processes were often manual and direct. If you wanted to connect to a database, you had to write out every part of the connection yourself. Consider this typical PHP snippet for connecting to a MySQL database:
While this code looks simple, it reveals how much responsibility rested on the individual developer. You had to safely source and manage every variable, and the imperative logic for handling a successful connection or a failure was yours to implement repeatedly. Now, contrast that with the modern approach using a database library like Prisma.
Here, the complexity is abstracted away. By using a npm library, we delegate important processes like connection pooling, error handling, and credential management. This not only simplifies the application code but also places these responsibilities in the hands of a team solely dedicated to maintaining and securing the library.
The importance of libraries in Apolloview
In my talent programme project Apolloview I will be using libraries to simplify my code, not using libraries in 2025 is like trying to reinvent the wheel when there is a parked car outside waiting for you. Apolloview will be using some libraries where the choice for me was easy Tailwind and Nativewind for styling, Motion for animations and Drizzle-kit for database relation management. But the most important library is of a category I’ve never used before, Augmented Reality (AR) technology.
The case for AR Kit and AR Core
Apple’s AR Kit and Google’s AR Core are by far the best, they are created and maintained by two of the largest companies in the world and used for their own marketing purposes, making this a project that they themself want to improve and maintain, the only downside is that these are two solutions for one problem. Because these libraries interact with the device on such a low level they both only work on one of the mayor operating systems for mobile. The option of AR Kit and AR Core has a clear benefit and downside, the best user experience but double implementation and a mixed experience on Android versus IOS. For catching Pokemon in Pokemon Go or showing of the newest Iphone in the Apple Store app, this is a worthwhile investment but for the timeline of Apolloview, it simply is not.
The open source option
Viro React is an open source AR library created for both Android and IOS, it does this by using AR Kit and AR Core, wait that doesn’t make sense…
That’s right Viro is a wrapper over the tech created by apple and google, it lets you set all the parameters and create your app while it handles interacting with the devices native features. In technical terms it's an abstraction layer, but in more simpler terms you could call it a bridge, a bridge between your JavaScript code in your code editor to the device which only understands Swift or Kotlin.
Let’s write some code
in our TSX file we create a ViroARSceneNavigator, this is the component that will become a view of your device’s camera In this component we set the parameter initialscene, this is the scene we render in our AR environment.
In our ARSceneComponent we can create interactivity functions like onPinch, when we pinch our object we would like it to scale, so we set the scale parameter in the same function. We create an use state (a function that controls the state of a component) for the scaling level and position of our object.
The only thing left for us to add a ViroARScene to our code, in this scene we create ViroBox wich is the object we can interact with.
The full code is available in my codepen
Conclusion
Viro is a great solution for out problem and after having read the documentation further and doing some online research on platforms like Stack Overflow and Reddit I’m sold. This week I vibe coded a small application to see what was possible with Viro and it impressed me even further, I’m exited to learn more about it and implement it in my codebase.
If I have seen further it is by standing on the shoulders of Giants - Isaac Newton






