iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
TinyJS lets you build a small desktop app with HTML, CSS and JavaScript, then package it for macOS, Windows or Linux. The shortest reliable path is to create the plain starter, keep the page in the frontend, put persistence or other privileged work in the JavaScript backend, run tinyjs dev while you iterate, and finish with tinyjs build on each operating system you plan to ship. This guide follows the official notebook example and explains the setup, project layout, security boundary and distribution details that matter after the first window appears.
What do you need before building a TinyJS app?
You need a supported operating system, a terminal, and a clear decision about where the app will run. TinyJS currently targets desktop systems rather than phones: macOS, Windows and Linux are the documented targets. Check the official installation requirements immediately before setup because platform prerequisites can change.
| Platform | Documented requirement | Additional runtime detail |
|---|---|---|
| macOS | macOS 15 or later; Apple silicon or Intel | Build on macOS for a macOS release |
| Windows | Windows 10 or 11; x86_64 or arm64 | WebView2 is required and is described as preinstalled on Windows 11 |
| Linux | x86_64 or arm64; glibc 2.35 or later | WebKitGTK 4.1 is required |
On macOS or Linux, the install page currently shows:
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →curl -fsSL https://tinyjs.app/install | sh
In PowerShell on Windows, it shows:
irm https://tinyjs.app/install.ps1 | iex
Review a downloaded installer before running it if your organization’s security policy requires that. After installation, open a new terminal and confirm that the tinyjs command is available. If the shell reports that the command is not found, restart the terminal so its PATH is refreshed, then check the installation instructions for your platform.
Popular on Amazon
- 【90 Degree Full Function USB C Adapter】Supports the latest USB4 standard for up to 40Gbps of bandwidth, 8K video support, and up to 240W Fast charging; Support USB PD 3.1 Extended Power Range (EPR) including 140W, 180W and 240W. Your productivity is easily doubled. *Warm Tip: For the best fit, please make sure the USB-C port is fully exposed; thick or bulky cases may affect compatibility.
- 【Reliable Quality】Made from high-quality, scratch-resistant aluminum alloy, delicate metal frame. get excellent wear resistance and heat dissipation. Non-Slip Design for easier insertion and removal.
- 【Small and portable】Ultra thin size, ultra compact design, a petite physique that matches the minimalist design of your modern laptops. Coming with a slim figure that won't block the port next to the one it's plugged into.
- 【Compatibility】Widely work with most usb c, thunderbolt 4/3 devices. Compatibilit for ROG Ally, Steam Deck, Switch, MacBook Pro, Quest 3 VR headset, Surface Book 2, iPhone 18/17/16/15, Samsung Galaxy S23/S22/S21, Note 20/10, Google Pixel, ChromeBook, etc.
- 【Excellence Customer Support】If you experience any issues or cable failure, simply reach out to our dedicated customer service team. We provide a prompt response within 18 hours, providing you with the necessary technical support to resolve any concerns.
How does TinyJS divide a desktop app into frontend and backend?
A TinyJS application has two cooperating parts. The frontend is the page rendered in the operating system’s webview; the backend is JavaScript running on txiki.js. A private socket connects the backend and the native launcher, and the frontend calls approved backend functions through the tiny bridge. The architecture documentation describes this design in detail.
- Frontend: HTML, CSS and browser-side JavaScript for controls, layout, validation and interaction.
- Backend: JavaScript for local files, persistence, processes, networking and other operations that should not be exposed directly to page code.
- Bridge: the narrow API between them. Treat it as an application boundary, not as a shortcut to unrestricted operating-system access.
For a notebook, the frontend can render the note editor and list, while the backend performs the save, load and delete operations. This arrangement keeps the interface easy to change and gives you one place to validate data and handle failures.
How do you scaffold a plain TinyJS project?
The plain template is the best starting point for a tiny first app: the official tutorial uses no framework and no packages to install. Create the project from a terminal:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitches- Choose the parent directory in which you keep source projects.
- Run
tinyjs new notes. - Enter the new directory with
cd notes.
tinyjs new notes
cd notes
The generated project gives you the files needed to open a window and load a frontend. Before making a release, open tinyjs.json and set the app identifier. The first-app tutorial uses that identifier as the folder name for saved notes, so choose it deliberately and keep it stable. Changing it later can make an existing installation appear to have lost its local data because the app may look in a different storage location.
A typical plain project separates responsibilities like this:
notes/
├─ tinyjs.json
└─ src/
├─ frontend/
│ ├─ index.html
│ ├─ style.css
│ └─ app.js
└─ backend/
└─ main.js
The generated names can vary with the TinyJS release, so use the paths created by your scaffold as the source of truth. The important rule is that page assets live under src/frontend/ and backend code lives in src/backend/main.js.
How do you turn the starter into a small notebook?
Build the notebook in vertical slices: first show a page, then connect one operation, then add persistence and error handling. The official first-app tutorial demonstrates a notebook that can save, edit, delete and retain notes between launches.
Also popular on Amazon
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
1. Create the interface in the frontend
Put the markup, styles and browser-side event handlers in src/frontend/. Give the page a text area or input for the title, an editor for the body, buttons for save and delete, and a list or navigation area for existing notes. Keep DOM updates here; the frontend should ask the backend to perform storage rather than writing files itself.
Start with ordinary web code. For example, your page can attach a click handler to a Save button, read the current fields, validate that the title is not empty, and then call the backend operation exposed through the tiny API. Use the exact bridge and store-call syntax shown in the tutorial for your installed TinyJS version rather than copying an API signature from an older example.
2. Put persistence in src/backend/main.js
The backend should own the notebook’s data operations. Define small functions for listing notes, reading one note, saving a note and deleting a note. Validate the incoming identifier and text before writing, return structured success or error information, and avoid exposing a general-purpose “run any file operation” function to the page.
TinyJS’s store API is intended for this local, persisted data. Follow the notebook tutorial’s store example for initialization, reads, writes and deletes. Use the identifier from tinyjs.json consistently so a later launch resolves the same data directory. If you change the data shape, add a simple migration or version field rather than assuming every existing note has the newest fields.
Free tools Windows power users keep installed
One-click scans. No signup required.
3. Connect the two sides through a small API
Expose only the operations the interface needs. A useful contract is:
| Operation | Input | Result the frontend needs |
|---|---|---|
| List notes | None | Identifiers, titles and updated times |
| Read note | One validated identifier | Title and body, or a not-found error |
| Save note | Identifier (optional for a new note), title and body | Canonical identifier and saved record |
| Delete note | One validated identifier | Confirmation or a clear error |
Show a busy state while a call is in flight, disable duplicate submits, and display a useful message when the backend rejects a request. The backend remains authoritative: frontend validation improves the user experience, but it must not be the only validation.
How do you run and iterate on the app?
From the project directory, run:
tinyjs dev
The CLI’s development command opens the app and supports hot reload behavior documented in the CLI reference. Keep this process running while editing the frontend and backend. When a change does not appear, check the terminal for a syntax error, save all files, and restart the development command if the reload process did not recover.
Also popular on Amazon
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
A practical development loop is:
- Change one frontend or backend behavior.
- Let the development window reload.
- Exercise the affected path, including an empty input and a missing note.
- Inspect the terminal for backend errors and the page for a visible error state.
- Repeat before adding the next feature.
Test persistence manually by saving a note, closing the window, running tinyjs dev again and confirming that the note is still present. This is a development check, not a claim about performance or compatibility; the official tutorial is the source for the notebook’s persistence flow.
Should you use plain JavaScript or a frontend framework?
Use the plain template when the app is small and you want the fewest moving parts. Choose a framework when your team already has one, the interface has many reusable views, or you need its established state-management and component conventions.
| Choice | Use it when | What changes |
|---|---|---|
| Plain template | A utility has a few screens and modest state | No framework or package installation is needed for the official first-app path |
| Framework template | The team already works in a component framework or the UI is growing | You install the project’s packages and run its frontend build before packaging |
The CLI documents templates for React, Vue, Svelte, Solid, Preact, Lit and Alpine, with TypeScript variants for most of them. Start a framework project only when its benefits outweigh the extra dependency and build steps. Regardless of template, retain the same boundary: UI code in the frontend and privileged or persistent work behind narrow backend functions.
How do you build a TinyJS app for distribution?
When the development version works, run:
tinyjs build
TinyJS places the generated application under dist/. The command builds for the operating system on which it runs, so build separately on every operating system you intend to ship. Do not assume that a build made on one platform is a universal installer.
The CLI documents additional build options, including macOS architecture selection and creation of a disk image. Use tinyjs build --help in the installed CLI to see the options supported by your version, then choose an architecture and packaging format that match your distribution plan.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11What must you do before sharing the build on each operating system?
Packaging is only part of distribution. The official tutorial calls out different requirements for each target.
macOS
The generated app is ad-hoc signed, which is suitable for the builder’s own Mac. Distribution to other users requires Apple Developer ID signing and notarization to avoid Gatekeeper blocking the app. Plan those credentials and the notarization workflow before promising a public download.
Also popular on Amazon
- Portable and powerful USB-C HUB: BENFEI USB Type-C HUB, with super-soft and knot-free silicone woven design cable, meets most mobile office needs. Compact, lightweight, stylish, and powerful portable USB C Hub equipped with 1 x HDMI port, 1 x 100W charging, and 3 x USB ports. 18-month warranty, 24-hour response, to ensure you feel at ease when using our product.
- Design centered on comfort and reliability: Thanks to BENFEI's end-to-end in-house cable production capability, in-house PCBA and assembly capability, using the industry's most advanced silicone woven design and process, 20cm cable in length, no knots, super-soft, the HUB is easy to use in all scenarios: laptop, tablet, stand etc. Super-soft, 25000+ life cycles, to meet your daily carrying and office needs.
- 100W Charging: Support up to 90W USB C pass-through charging via Type-C port to keep your laptop powered. 10W is reserved for other interface operations. No data and video function on the Type-C port.
- 4K HDMI Display: The HDMI port supports media display at resolutions up to 4K 30Hz, keeping every incredible moment detailed and ultra vivid. Please note that the C port of the Host device needs to support video output.
- Transfer Files in Seconds: Transfer files and from your laptop at speeds up to 10 Gbps with USB A 3.2 port. Extra 2 USB A 2.0 ports are perfectly for your keyboards and mouse.
Windows
Send the complete dist/ folder, not just the executable; the executable depends on adjacent files. An unsigned build can trigger a warning the first time someone opens it. Code signing and a predictable installer are separate release decisions from the TinyJS build itself.
Linux
Send the complete output folder and tell recipients that WebKitGTK 4.1 is required. The install documentation gives package-installation examples for Ubuntu/Debian and openSUSE; adapt those to the distribution you support and verify the dependency is available before distributing instructions.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Record the exact TinyJS version, target architecture and operating system used for each build. That information makes it easier to reproduce a release and diagnose a report that a build will not launch.
How do you safely wrap a hosted website with TinyJS?
A locally authored frontend and a hosted page have different trust assumptions. TinyJS warns that the tiny bridge is injected into every page; if an unrestricted hosted page receives it, third-party JavaScript could call backend capabilities such as file or process access.
If your app loads a remote URL or uses tinyjs wrap:
- Configure an origin or capability gate as described in the configuration guide.
- Allow only the specific origin you control.
- Grant only the backend calls that page needs.
- Keep file paths, process execution and network access validated in the backend.
- Revisit the allowlist whenever the hosted site’s origin, scripts or required features change.
Do not treat an HTTPS URL alone as permission to expose the full backend. A remote page can change independently of your desktop binary, so least-privilege capability design is essential.
What are the common TinyJS setup and build problems?
The command is missing after installation
Open a fresh terminal so the installer can update PATH. On Windows, use PowerShell as documented; on macOS or Linux, verify that the shell initialization file includes the install location. If the problem persists, rerun the platform-specific steps on the install page rather than mixing commands from another operating system.
Also popular on Amazon
- 【Read before You Buy】 Note: This adapter is USB 2.0 version and cannot transmit HDM, VGA, or other video signals. Nevertheless, they are fully capable of charging devices,duplicating files, and can be seamlessly integrated with USB-C earphones, wireless network adapters, and SD card adapters.
- 【Easy to Use and Safe】Thanks to modern manufacturing techniques, we've made these adapters sufficiently compact so that they can remain inserted in your device without noticeable protrusion or inconvenience. This means you don't have to constantly plug and unplug them, reducing the likelihood of wear and misalignment, and making them more convenient to carry around.
- 【Reliable Quality】Engineered for enhanced durability, durable aluminum alloy shell material,get excellent wear resistance and heat dissipation,the male USB C and female USB connectors & the male USB and female USB C connectors are designed to be plugged and unplugged up to 20000 times. Provides data transfer, device charging, memory space expansion, and additional computer peripherals.
- 【Think more for you】Do you need to connect a USB-C-enabled device to an odd device that only has USB-A ports? Then these USB-A male to USB-C female adapters are made for you.Simply insert the adapter into the USB-A port on the device, and you can instantly connect your USB-C device to the device that originally didn't have the correct connection port.
- 【Trusted xiwxi Quality and Service】As a responsible brand seller, you will receive xiwxi's 12-month Quality assurance and lifetime friendly customer service, you're not just buying a product,you're investing in peace of mind with all-round quality and exceptional customer service.
The app opens but does not retain notes
Check that the backend is using the TinyJS store API, that the app identifier in tinyjs.json has not changed, and that save calls report errors to the frontend. A changed identifier can point the app at a new storage folder, making old notes appear absent.
A frontend change is not visible
Confirm the edited file is inside src/frontend/, save it, and watch the tinyjs dev terminal for a compile or reload error. Restart the development process if the current reload session is stuck.
The built app works on the developer’s machine but not another one
Check that the entire dist/ output was copied, that the target architecture matches the recipient’s system, and that platform dependencies are installed. Windows needs the WebView2 runtime, while Linux needs WebKitGTK 4.1. macOS users may also be stopped by Gatekeeper when the app is not Developer ID signed and notarized.
A wrapped site can access too much
Add the origin and capability gate before shipping, then reduce the bridge to the minimum operations required. If you cannot identify every backend call a hosted page needs, do not expose privileged capabilities to that page.
What is the simplest release checklist?
- Install TinyJS using the current instructions for the target operating system.
- Scaffold with
tinyjs newand set a stable identifier intinyjs.json. - Keep interface code under
src/frontend/and persistence or privileged work insrc/backend/main.js. - Use the store API for local notebook data and handle backend errors visibly.
- Run
tinyjs devthrough save, edit, delete, restart and empty-input scenarios. - Build with
tinyjs buildon every operating system you will distribute. - Ship the complete
dist/output and document WebView2 or WebKitGTK requirements where applicable. - Sign and notarize macOS releases intended for other users.
- Apply an origin and capability gate when loading hosted content.
This workflow follows TinyJS’s documented first-app path while leaving room to replace the notebook with another small utility once the frontend-backend boundary is working.
How did this guide choose the implementation path?
The plain starter is used because the official first-app tutorial demonstrates a complete persisted notebook without a framework or package installation. The file split, development command, build command and platform caveats come from TinyJS’s official tutorial and CLI documentation. Frameworks are included as an alternative because the CLI documents templates for common frontend stacks, not because a framework is required for a tiny utility.
Frequently Asked Questions
Can TinyJS apps run on iPhone or Android?
The project documentation describes macOS, Windows and Linux as its desktop targets and says phones are not on the roadmap. If mobile delivery is a requirement, choose a separate mobile framework instead of assuming the desktop webview package will produce a phone build.
Recommended Free Tools
Where should a TinyJS app store user data?
For a small local utility, use TinyJS’s store API from the backend and keep the app identifier stable. Avoid writing directly from page code; centralizing storage in backend functions gives you one place to validate records and handle migrations.
Do users need TinyJS installed to run my finished app?
A built application is placed in the project’s dist/ directory, but recipients still need the platform details documented for that build. Windows and Linux releases in particular depend on adjacent output files and their respective webview runtime requirements.
Can I load an external URL instead of bundling HTML files?
TinyJS can wrap a hosted site, but the injected bridge means the page must be treated as untrusted. Configure an origin and capability gate and expose only the backend calls that the hosted page actually needs.

