by hamsterbase on 1/7/24, 4:32 PM with 0 comments
All these versions share the same codebase.
VSCF: I extracted part of the source code from VS Code and developed a framework called VSCF. It includes commands, themes, dependency injection, key bindings, IPC.
https://github.com/hamsterbase/vscf
Backend: hamsterbase will run the nodejs server backend locally. Based on vscf, I developed the underlying business logic, Such as file IO, SQLite, HTTP Server.
Frontend: Based on vscf, I used React for front-end development.
Referring to vs code, I use different communication channels for my frontend and backend on different platforms. For example, electron uses electron-ipc, the other side uses websocket.
To run nodejs on my phone, I use the nodejs-mobile, This is an open-source project that allows me to use Node.js on mobile devices.
https://github.com/nodejs-mobile
Here's how to stitch the modules together into an application
Self-hosted version = local server + frontend, using WebSocket for communication.
Desktop version = (Electron + local server + frontend ) + Self-hosted version
Mobile version = (nodejs-mobile + self-hosted version + webview) , Users use webview to access the UI. It looks just like a native application. They can even use their phones as servers to access data on their phones from a computer.