This is a Universal App to show the functionality of the Enguage Natural Language Understanding library.
This App is also a proof of concept to demonstrate how a unified codebase can be used to distribute an application across multiple platforms - developing features once and running them on any platform.
The particular app I used as a POC is a simple chat interface for a Java API I wrote to wrap the Enguage Java library.
| 🤖 Android: | 🍎 iOS: | 🕸️ Web: | 🍎 MacOS: |
|---|---|---|---|
|
|
|
NextJS app on Vercel | MacOS app |
One unified codebase with five different distributions on five different platforms. The codebase uses React + React Native to deploy via NextJS with SSR and Expo on Android and iOS.
Using a monorepo, we can split our app into clean boundaries:
/apps: the entry point for each app and place where any native specific code for each app is implemented (e.g. routing, which is file-base in both in Next and Expo). Here we implement things which must be platform specific. Solito helps with this./packages/core: the bulk of the app sits here and it platform agnostic. React is used, but as all components are abstracted behind a package, we don't care which platform we're targeting.packages/atoms: we create an interface for cross-platform UI atoms. Here we must provide an implementation for each platform. Tamagui helps with this.
This style of app works well in particular for apps that require parity across platforms over a large set of features (e.g. Notion/ Slack/ Zoom/ Netflix web + mobile + desktop apps).
A lot of care must be put into implementing the interface for the multi-platform UI atoms, however investing the time in ensuring platform specific UI elements well means that features can be developed across all platforms and released in parallel, rather than having a divergent codebase.
- Session management
- Voice interface
- Fix TS configs + more refactoring
I made this repo quite quickly as a POC - if I had more time I would fix some of the leaky abstractions and set up better boundaries within the code. More refactoring to clean up the repo might be incoming!