A proof-of-concept for demonstrating that Swift can be used to write mobile applications for all platforms (iOS, Android, etc) and distributed as a web application. This project mostly serves to prove-out that SwiftWASM can be used to leverage knowledge of Swift and SwiftUI development while still benefitting from platform independence. There are plenty of areas left unexplored and work to be done to make this more resuable.
This project can be built on any platform that has a Swift compiler (including macOS and Linux) and was primarily developed on a RaspberryPi. While Xcode can be used to build and run the web server portion of the project, SwiftWASM (used by the application portion) does require the use of an alternate SDK and is easier to setup and use from the command line. Follow the links below to install Swift, the necessary SDKs, and additional optional tools for development.
After the project is built, it can be deployed to a container environment (like Docker or macOS's container) and this container does not need the swift development tools.
The project is structured as a server, which is a standard web server written in Swift using Hummingbird, which acts as both the delivery mechanism for the app, as well as the API server for the app's file browser capability. There are 2 different app implementations: a basic implementation that uses a minimumal dependency set to show off the functionality but with no fancy UI styling, and a "fancy" version that uses the Framework7 component library to demonstrate the functionality can be presented as nearly native-looking application.
Here is a short demo of the app being served from a RaspberryPi server and running in an iPhone simulator.
The easiest way to build this project is to use the Makefile to build, in turn, the server and each of the apps.
Once the requisite software is installed on your dev machine (Swift compiler and SDKs), use:
make server
make apps
make runThis will build the server and then each of the apps and then run the server on the local machine.
The project can be built into a deployable container with:
make containerNotes:
https://www.swift.org/install/ 
https://book.swiftwasm.org/getting-started/setup.html
https://framework7.io/ 
https://github.com/watchexec/watchexec 
https://browsersync.io/docs
Images used by the "basic" version of the app are from FlatIcon 
Folder icons created by Freepik - Flaticon 
Download icons created by Freepik - Flaticon 
Fire icons created by Freepik - Flaticon 
Back icons created by Freepik - Flaticon 
Synchronization icons created by Freepik - Flaticon 
