Introduction
In the background over the last few weeks, I have started building a TiddlyWiki app for iOS, iPad and macOS.
A couple of weeks ago I reached a significant milestone: the app now runs the full Node.js configuration of TiddlyWiki with an integrated browser. It does not yet support Multi Wiki Server, but hopefully I’ll have that running soon.
Using the app does not require any knowledge of Node.js. In fact, the user experience could not be simpler:
- Download the app
- Run the app
- An empty TiddlyWiki immediately appears that you can use as normal
- Changes are automatically synchronised to the file system, and visible as individual
.tid
files in the “Files” app
Arguably, it is an even simpler process than signing up for a TiddlyWiki online service. Discussions here have often noted that a very significant barrier to the success of TiddlyWiki is that it is too difficult and fiddly to get it set up to save reliably. A TiddlyWiki app can decisively change that: we can finally ship a product that works out of the box, without requiring any technical knowledge to get started.
Embedding the full Node.js configuration of TiddlyWiki makes it possible to access the full range of Node.js features, including functioning as a server. This means that you can allow other users on the same wifi network to connect to the TiddlyWiki running on your phone.
I’m quite excited about this. A commercial TiddlyWiki application that can compete with Obsidian and Notion in terms of ease of use could represent a significant opportunity, both for the healthy future of the project and in the future as a source of revenue to support my work.
The really felicitous thing is the way that the app has been an almost trivial amount of work compared to TiddlyWiki itself, and yet it elevates and consolidates all the work that has been done on TiddlyWiki, making it available for a new, broader audience at very little additional cost.
The app is currently not much more than a proof of concept, and needs a fair amount of work before it will be robust enough for practical usage. But this is the perfect time for us as a community to explore the implications of this development.
Contents
This is a long post, so I’ll list the areas it covers:
- We’ll have a look at the user interface of the app as it is now
- Then describe some of the future enhancements that I hope to be able to introduce
- A quick word about branding
- An overview of the technical architecture
- Summary of development progress and issues remaining
- A discussion of the opportunities arising from the app
- Project risks, and their mitigations
- Next steps
- Frequently Asked Questions
- How to get involved
- Questions for discussion
Tour of the TiddlyWiki App Today
This section shows how the TiddlyWiki app appears at the moment. Things will change significantly when Multi Wiki Server is integrated, but for the moment app currently uses the regular Node.js configuration of TiddlyWiki, and thus only offers access to a single wiki at a time.
So, the app currently opens straight to that single wiki, and it can be used in the usual way:
At the top right there is a refresh button, and a menu that currently just leads to popup information windows. Eventually there will be an “Export” button, a settings screen, and a way to share the IP address of the server with other users as a QR code or message.
To demonstrate that this is the full Node.js configuration of TiddlyWiki, here is a split screen arrangement of TiddlyWiki and Safari showing the same wiki accessed via http://127.0.0.1:8080/
External links open in an integrated popup browser. This helps to get around a significant limitation of apps on iOS which is that they are not allowed to run in the background. If you switch from TiddlyWiki to another app, after a short period TiddlyWiki will be terminated by the operating system, and will be restarted when you switch back to it. (Note that this restriction does not apply on the Mac where it is possible to run TiddlyWiki, minimise it to the dock, and only interact with it through your preferred desktop browser).
Future Enhancements
The core functionality of the app is to provide access to a locally running TiddlyWiki under Node.js. Things will get a lot more interesting soon once it is running MWS. Then it will be possible to create multiple wikis, and share data between them. MWS also includes a full copy of the core plugin library, making it completely self-contained.
There is an opportunity to integrate TiddlyWiki much more closely with the iOS ecosystem. Some of the subsequent enhancements that should be feasible:
- iOS widget support, allowing tiddler content to be displayed on the home screen
- The ability to perform media playback in the background. This circumvents Apple’s restrictions on apps running in the background, and would allow users to leave TiddlyWiki in the background and work with it through Safari
- Syncing with online storage and publishing platforms. For example, automatically pushing a static copy of a wiki to GitHub Pages
- Realtime notifications (eg task notifications)
- Integration with Apple’s Shortcuts app, allowing end users to automate operations involving TiddlyWiki
- Support for controlling remote TiddlyWiki MWS servers alongside the integrated server
- Integration of Apple’s native APIs for machine learning and artificial intelligence, giving TiddlyWiki the capability to transcribe text, perform OCR and other image recognition tasks
- I would also like to investigate the possibilities for synchronisation of tiddler content with Apple’s integrated apps like Calendar, Contacts, Reminders
Branding
The primary name of the app will be the plain, unqualified word "TiddlyWiki”. A full name such as “TiddlyWiki for Apple”, “TiddlyWiki for iPhone” or “TiddlyWiki for iPad” can be used where there is ambiguity.
I made a new icon for the app: I started with the concept of Motovun Jack in a cat carrier to convey mobility, but it looked rather like a cage, so I ended up giving him freedom on a skateboard:
Architecture
The pleasing thing about the architecture of the app at this point is that there is so little of it: compared to TiddlyWiki itself, the app is a paper thin layer on the top.
The app uses Node.js to run TiddlyWiki, passing the path of the application data directory as the wiki folder. Simultaneously, it displays an embedded web view pointing to the local address of the server.
One of the implications of this architecture is that the wiki folder resides privately on the device file system, rather than in iCloud. However, the data will be backed up to iCloud with the rest of the device.
Having the single source of truth for your personal data in your pocket/briefcase will be an attractive approach for some people, but many users will prefer to have the prime copy of their material reside in the cloud. That means that the app will need ways to export and synchronise data to external sources.
Progress
Progress has been surprisingly quick on this project (it actually feels like it has taken longer to write this post than to write the code). The velocity of the development is thanks to the flourishing iOS open source community. Two projects have been particularly helpful:
- GitHub - nodejs-mobile/nodejs-mobile: Full-fledged Node.js on Android and iOS is an implementation of Node.js that runs on iOS (and Android)
- https://code.thebaselab.com is a full featured IDE for iOS that integrates the VSCode editor, Node.js and a number of other runtimes and is completely open source. I haven’t directly borrowed any code but this app is a tremendous learning resource, and demonstrates that a number of the things that I need to get working are possible
I’ve also been using ChatGPT and Claude.ai to help me learn Swift, Apple’s homegrown programming language. I don’t let ChatGPT write code for me but I find it quite helpful to use it to explain code to me.
There is a fair amount of further work to get the app to the point where it is robust and practical:
- The Node.js server does not recover properly after the app has been switched to the background
- There is currently no access to the terminal output of the Node.js server component. We will also need the ability to start and stop it
- Multi Wiki Support is waiting until I figure out how to compile better-sqlite3 from source
- Opening a tiddler in a new window is not supported
Opportunities
The real opportunity represented by this project is the chance to experiment with a new business model for TiddlyWiki with a relatively small additional investment.
Up until now, my own revenue stream has come from commercial organisations that make use of TiddlyWiki, and who can pay me commercial rates to help them get the best out of it.
A TiddlyWiki app in the app store opens up the possibility of a retail business model, where my work on TiddlyWiki is supported by end users choosing to pay for TiddlyWiki.
These sort of plans are never certain, but the opportunity right now is that without much more work it is possible to get a functional, useful app in the App Store, and so be able to find out if the idea works commercially.
This project is likely to require a good deal of my time and attention as I learn an entirely new programming environment. That means that it is only worth doing if I can get enough revenue from it, equivalent to the revenue I currently get from my existing wholesale business
That means that I need to make a great app that that doesn’t just appeal to existing TiddlyWiki users, but makes sense as an alternative to Obsidian, Notion, etc. That means that it has to meet the same threshold of quality, attention to detail and ease of use.
There is also the question of how to charge for the app. I am committed to making TiddlyWiki freely available to as many people as possible. I think it is essential that people can use the app without charge. That rules out making it a paid app, so we would be left with optional premium regular subscriptions, or optional “in app purchases”. In such cases the idea is that some functionality would only be available to subscribers. The obvious candidate for add-on services is cloud access: the hosting of your public or private web-based TiddlyWiki, but those kind of features would take a while to evolve.
I’d like to find a commercial model that works from the beginning. One approach is to make the premium features essentially be decoration: alternate icons, colour schemes or fonts. The proposition wouldn’t be that the premium features are super valuable or useful, but rather than the premium features make a fun and effective way for users to support the long term development of TiddlyWiki.
Another possible revenue stream is the possibility of finding commercial organisations who would be prepared to pay to have their own white labelled TiddlyWiki-based app in the App Store.
Risks
The major risk to this project is Apple’s capricious review process. I know some iOS app developers, and they all report frequent frustration. Apple can be unpredictable, suddenly refusing to approve a minor update to an app that has already been updated dozens of times in the past.
One good thing is that there is nothing that the TiddlyWiki app needs to do that isn’t already done by major apps that are already in the App Store.
I think that overall, the best mitigation to this risk is to get a minimal app into the App Store as quickly as possible to surface any problems, and then proceed to iterate on it.
Next Steps
The immediate next step is to get the app into a slightly more usable state, and then we can use Apple’s TestFlight service to offer a free beta so that the community can start using it, and we can start getting feedback.
TestFlight makes things very easy: there will be a link that opens an invitation in the TestFlight app that you can download from Apple. When you accept, the app downloads, and you’re able to use it as usual. There are no charges for TestFlight apps. You will also get any updates in the beta period.
TestFlight allows for up to 10,000 users. I am hoping that the success of the TestFlight campaign will give us a good insight into whether this project is commercially viable.
I would like to wait until MWS is implemented before starting the TestFlight because that will give users a much better idea of the functionality to expect in the full product.
FAQs
- Can I choose where to place the wiki folder? No, the location of the wiki folder is fixed, and resides on the local storage of the device (“On My iPad/iPhone” in the Files app)
- What if I want to store my wiki folder in Dropbox? The difficulty is that on iOS file apps like Dropbox do not provide ordinary file storage that can be accessed from other apps. Instead, there is a relatively complex API to allow files to be requested, and if necessary downloaded from the cloud. So the best we can offer will be the ability to synchronise tiddlers to remote storage like Dropbox
- What about an Android version of the app? It would be great to have an Android app using the same architecture of embedding Node.js with a WebView. However, I think that would need to be a separate project. The app that I am planning would get a lot of its value from it being written specifically with Apple frameworks, and able to take advantage of Apple’s proprietary features and tightly integrating with the operating system
- But couldn’t you use Cordova to create a cross-platform app that works on iOS and Android? I’ve experimented with Cordova a few times. The end user experience is not great because Cordova apps do not feel like a proper native app
- So why are you choosing to restrict the app to privileged Apple users? I’m an Apple user myself, but a more interesting reason is that conventional wisdom has it that Apple users spend more money on apps and services than users of other platforms. There’s a chance that the simplest, most accessible path to a sustainable revenue model for TiddlyWiki development is for it to be subsidised by wealthy Apple users. It is not that different from the current model where my work on TiddlyWiki development is subsidised by companies that want to invest in TiddlyWiki
Get Involved
TiddlyWiki benefits enormously from being a community effort, and I hope the TiddlyWiki app for Apple will be the same. One important way that you can help is to share your thoughts; there are some questions below, but I’m interested in all perspectives.
Developers can participate in the development on GitHub:
Questions
This project has been moving quite quickly, and I’d welcome your thoughts, questions and suggestions. Feel free to bring up anything, but some questions that might be interesting to discuss include:
- Would you be interested in a TiddlyWiki app?
- What would you use the app for?
- How much would you pay per year/month for a TiddlyWiki application that works on all your devices?
- What areas of functionality are important to you?
- What apps do you already pay for? What makes them good value for money?
- Do you prefer upfront or subscription pricing?
- Do you see any risks or downsides with exploring this opportunity?